Exemplo n.º 1
0
        public override bool Run(bool bAppend = false)
        {
            if (!System.IO.File.Exists(FilePath))
            {
                return(false);
            }

            if (StrList == null)
            {
                StrList = new List <String>();
            }
            else
            {
                StrList.Clear();
            }

            using (StreamReader reader = System.IO.File.OpenText(FilePath))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    StrList.Add(line);
                }
            }
            return(true);
        }
Exemplo n.º 2
0
    public void Init()
    {
        m_DataChangeCallBackInfoPool.Init(null, null);
        StrList strlist = new StrList();

        strlist.Add(string.Empty);
        strlist.Sort((a, b) => a.CompareTo(b));
        List <int> intlist = new List <int>();

        intlist.Add(1);
        intlist.Sort((a, b) => a.CompareTo(b));
        int aa = null != strlist ? strlist.Count : intlist.Count;
    }
Exemplo n.º 3
0
 static public int Add(IntPtr l)
 {
     try {
         StrList       self = (StrList)checkSelf(l);
         System.String a1;
         checkType(l, 2, out a1);
         self.Add(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 4
0
    public void Init()
    {
        string[] items = { "全部", "进行中", "可接取", "已完成", "未获取" };
        m_DataChangeCallBackInfoPool.Init(32, () => { return(new DataChangeCallBackInfo()); }, v => { });
        StrList strlist = new StrList();

        strlist.Add(string.Empty);
        strlist.Sort((a, b) => a.CompareTo(b));
        List <int> intlist = new List <int>();

        intlist.Add(1);
        var sa = strlist[0];

        intlist.Sort((a, b) => a.CompareTo(b));
        int iaa = null != strlist ? strlist.Count : intlist.Count;

        int[] aa = new int[] { 1, 2, 3, 4, 5 };
        int[,] bb = new int[, ] {
            { 1, 2 }, { 3, 4 }, { 5, 6 }
        };
        var ia = bb[0, 1];

        foreach (var s in strlist)
        {
            Console.WriteLine(s);
        }
        foreach (var v in aa)
        {
            Console.WriteLine(v);
        }
        foreach (var v in bb)
        {
            Console.WriteLine(v);
        }
        var            act    = (Action)(() => { Console.Write(ia); });
        var            cc     = ToList(aa);
        List <Vector3> v3list = new List <Vector3>();

        v3list.Add(Vector3.zero);
        Vector3List nv3list = new Vector3List();

        nv3list.Add(Vector3.zero);
        var v3 = nv3list[0];

        nv3list[0] = v3;
        var vv3 = ToArray(nv3list)[0];

        ToArray(nv3list)[0] = vv3;
    }
Exemplo n.º 5
0
        public static StrList ConvertStringList(string vec)
        {
            StrList list = new StrList();

            try {
                string[] resut = vec.Split(s_ListSplitString, StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < resut.Length; ++i)
                {
                    string str = resut[i];
                    list.Add(str);
                }
                return(list);
            } catch (System.Exception ex) {
                LogSystem.Error("ConvertStringList {0} Exception:{1}/{2}", vec, ex.Message, ex.StackTrace);
                throw;
            }
        }
Exemplo n.º 6
0
    public void Init()
    {
        string[] items = { "全部", "进行中", "可接取", "已完成", "未获取" };
        m_DataChangeCallBackInfoPool.Init(null, null);
        StrList strlist = new StrList();

        strlist.Add(string.Empty);
        strlist.Sort((a, b) => a.CompareTo(b));
        List <int> intlist = new List <int>();

        intlist.Add(1);
        var sa = strlist[0];

        intlist.Sort((a, b) => a.CompareTo(b));
        int iaa = null != strlist ? strlist.Count : intlist.Count;

        int[] aa = new int[] { 1, 2, 3, 4, 5 };
        int[,] bb = new int[, ] {
            { 1, 2 }, { 3, 4 }, { 5, 6 }
        };
        var ia = bb[0, 1];

        foreach (var s in strlist)
        {
            Console.WriteLine(s);
        }
        foreach (var v in aa)
        {
            Console.WriteLine(v);
        }
        foreach (var v in bb)
        {
            Console.WriteLine(v);
        }
        var act = (Action)(() => { Console.Write(ia); });
        var cc  = ToList(aa);
    }