alielie
2026-06-15 f08871fe7d148d667f2f11f80f64de71a0d9504c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Plugin.TestResult.Util;
using Plugin.TestResult_WPF.Model;
using System;
 
namespace Plugin.TestResult_WPF.Util
{
    public class JKCodeParser : ICodeParser
    {
        public CellInfo GetCellInfoByCode(string code)
        {
            string[] arr = code.Split('-');
            if (arr == null || arr.Length != 3)
            {
                throw new Exception("扫码格式异常");
            }
            int row = int.Parse(arr[1]);
            int index = int.Parse(arr[2]);
 
            return new CellInfo()
            {
                OriginCode = code,
                OvenName = arr[0],
                Index = (row - 1) * 4 + (index - 1),
            };
        }
 
        public CellInfo GetCellInfoByCode(string model, int columns, int rows, string code)
        {
            return GetCellInfoByCode(code);
        }
    }
}