public Jx3ToolClass()
        {
            serbiglist.Clear();
            aslist.Clear();
            string[] temp = Jx3OpenTell.GetSerIni();
            foreach (var item in temp)
            {
                string[] additem = item.Split('\t');
                if (additem.Length > 9)
                {
                    try
                    {
                        serbiglist.Add(additem[1], additem[10].Replace("双线", ""));
                        aslist.Add(additem[1], additem[0]);
                    }
                    catch
                    {
                        continue;
                    }
                }
            }

            var petDic    = ToolClass.fileToString("petfu.txt");
            var petDicstr = petDic.GetMidStrings(@"'", @"'")[0];

            PetServerList = Newtonsoft.Json.JsonConvert.DeserializeObject <Dictionary <string, int> >(petDicstr);
        }
예제 #2
0
        public static string[,] GetSerList()
        {
            string[] serIni = Jx3OpenTell.GetSerIni();
            string[,] array = new string[serIni.Length, 5];
            string[] array2 = new string[5];
            int      num    = 0;

            string[] array3 = serIni;
            for (int i = 0; i < array3.Length; i++)
            {
                string text = array3[i];
                array2 = text.Split(new char[]
                {
                    '\t'
                });
                array[num, 0] = array2[0];
                array[num, 1] = array2[1];
                array[num, 2] = array2[3];
                array[num, 3] = "0";
                array[num, 4] = "List";
                num++;
            }
            return(array);
        }