Ejemplo n.º 1
0
        void load_data()
        {
            //var m = my.explode("\n", CC.data);
            listIndex = new List <int>();
            var m = CC.data.Trim().Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);

            listData = new List <string>(m);
            for (int i = 0, max_i = m.Length; i < max_i; i++)
            {
                if (m[i].ToString().Trim().IndexOf("M6T") == 0)
                {
                    listIndex.Add(i);
                }
                if (!my.is_istring_like(my.strtoupper(m[i].Trim()), "M6T"))
                {
                    if (CC.m_data.Count == 0)
                    {
                        CC.m_data.Add(m[i] + "\n");
                    }
                    else
                    {
                        CC.m_data[CC.m_data.Count - 1] += m[i] + "\n";
                    }
                }
                else
                {
                    CC.m_data[CC.m_data.Count - 1] = CC.m_data[CC.m_data.Count - 1].Trim();
                    CC.m_data.Add("");
                }
            }

            //MessageBox.Show(string.Join<string>("#######", CC.m_data));

            //MessageBox.Show(CC.m_data.Count.ToString()); 3 -> 4
            //載入畫面
            save_btn.Visible = true;
            load_ui();
        }