alielie
2025-11-25 006c98e5650b530e5220f279c1e803fefe69d40d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using Plugin.TestResult.Util;
using Plugin.TestResult_WPF.Model;
using System;
 
namespace Plugin.TestResult_WPF.Util
{
    public class CommonCodeParser: ICodeParser
    {
        public CellInfo GetCellInfoByCode(string code)
        {
            string[] arr = code.Split('-');
            if (arr == null || arr.Length != 3)
            {
                throw new Exception("扫码格式异常");
            }
            return new CellInfo()
            {
                MachineName = arr[0],
                OvenName = arr[1],
                Index = int.Parse(arr[2]) - 1,
            };
        }
    }
}