示例#1
0
        public void RepairJzxSm(Jzx jzx)
        {
            List <string> list  = new List <string>();
            List <string> jzxSm = jzx.getJzxSm();
            int           num   = this.findJzDh(jzxSm, "J1-");

            for (int i = num; i < jzxSm.Count; i++)
            {
                list.Add(jzxSm[i]);
            }
            for (int i = 0; i < num; i++)
            {
                list.Add(jzxSm[i]);
            }
            jzx.setJzxSm(list);
        }
示例#2
0
        public void MergeJzx(Jzx jzx)
        {
            List <string> list = new List <string>();

            string[]      array = new string[3];
            List <string> jzxSm = jzx.getJzxSm();

            for (int i = 0; i < jzxSm.Count; i++)
            {
                string   text   = jzxSm[i];
                string[] array2 = text.Split(this.jzxCh);
                if (array2.Length != 3 && !text.Equals("partition"))
                {
                    return;
                }
                if (text.Equals("partition") || (array[2] != null && !array[2].Equals(array2[2])))
                {
                    array[1] = jzxSm[i - 1].Split(this.jzxCh)[1];
                    list.Add(string.Concat(new string[]
                    {
                        array[0],
                        "-",
                        array[1],
                        "_",
                        array[2]
                    }));
                    array = new string[3];
                    if (!text.Equals("partition"))
                    {
                        array[0] = array2[0];
                        array[1] = array2[1];
                        array[2] = array2[2];
                    }
                }
                else if (array[0] == null)
                {
                    array[0] = array2[0];
                    array[1] = array2[1];
                    array[2] = array2[2];
                }
            }
            jzx.setJzxSm(list);
        }
示例#3
0
        public void MergeJzx2(Jzx jzx)
        {
            List <string> list = new List <string>();

            string[]      array = new string[3];
            List <string> jzxSm = jzx.getJzxSm();

            string[] array2 = jzxSm[0].Split(this.jzxCh);
            for (int i = 0; i < jzxSm.Count - 1; i++)
            {
                string[] array3 = jzxSm[i + 1].Split(this.jzxCh);
                if (array3.Length == 3)
                {
                    if (!array2[2].Equals(array3[2]))
                    {
                        list.Add(string.Concat(new string[]
                        {
                            array2[0],
                            "_",
                            array3[0],
                            "_",
                            array2[2]
                        }));
                        array2[0] = array3[0];
                        array2[2] = array3[2];
                        if (i == jzxSm.Count - 2)
                        {
                            list.Add(string.Concat(new string[]
                            {
                                array3[0],
                                "_",
                                array3[1],
                                "_",
                                array3[2]
                            }));
                        }
                    }
                    else if (i == jzxSm.Count - 2 && list.Count != 0)
                    {
                        list.Add(string.Concat(new string[]
                        {
                            array2[0],
                            "_",
                            array3[1],
                            "_",
                            array2[2]
                        }));
                    }
                    if (i == jzxSm.Count - 2 && list.Count == 0)
                    {
                        list.Add(string.Concat(new string[]
                        {
                            array2[0],
                            "_",
                            array3[0],
                            "_",
                            array2[2]
                        }));
                        list.Add(string.Concat(new string[]
                        {
                            array3[0],
                            "_",
                            array3[1],
                            "_",
                            array3[2]
                        }));
                    }
                }
            }
            jzx.setJzxSm(list);
        }