Example #1
0
		public void save()
		{
			bool doneId = NewbieModel.getDoneId(this.id);
			if (!doneId)
			{
				string text = FileMgr.loadString(FileMgr.TYPE_NEWBIE, "n");
				bool flag = text == "";
				if (flag)
				{
					text = this.id.ToString();
				}
				else
				{
					text = text + "," + this.id;
				}
				FileMgr.saveString(FileMgr.TYPE_NEWBIE, "n", text);
			}
		}
Example #2
0
        public void save()
        {
            if (NewbieModel.getDoneId(id))
            {
                return;
            }
            string str = FileMgr.loadString(FileMgr.TYPE_NEWBIE, "n");

            if (str == "")
            {
                str = id.ToString();
            }
            else
            {
                str += "," + id;
            }
            FileMgr.saveString(FileMgr.TYPE_NEWBIE, "n", str);
        }
Example #3
0
        public void initNewbieData()
        {
            bool flag = this.inited;

            if (!flag)
            {
                string text  = FileMgr.loadString(FileMgr.TYPE_NEWBIE, "n");
                bool   flag2 = text != "";
                if (flag2)
                {
                    string[] array = text.Split(new char[]
                    {
                        ','
                    });
                    for (int i = 0; i < array.Length; i++)
                    {
                        NewbieModel.doneId[int.Parse(array[i])] = 1;
                    }
                }
                this.inited = true;
                List <SXML> sXMLList = XMLMgr.instance.GetSXMLList("newbie.n", "");
                bool        flag3    = sXMLList != null;
                if (flag3)
                {
                    foreach (SXML current in sXMLList)
                    {
                        int  @int  = current.getInt("id");
                        bool flag4 = NewbieModel.getDoneId(@int);
                        if (!flag4)
                        {
                            NewbieTeachMgr.getInstance().add(current.getString("p"), @int);
                        }
                    }
                }
            }
        }