Exemplo n.º 1
0
        public void GetGumpCode(TMQueryPage page)
        {
            //page.AddTitle(@"Main Menu:", "Control");
            page.AddIcon(2245, "Control");
            IEnumerator enu = QueryPageHelper.GumpNames.GetEnumerator();            //list.GetEnumerator();
            //IEnumerator enu = enu1.GetEnumerator();
            ArrayList sortList = new ArrayList();

            while (enu.MoveNext())
            {
                string current = (string)((KeyValuePair <string, string>)enu.Current).Value;
                sortList.Add(current);
            }
            sortList.Sort(new AlphaCompare());
            enu = sortList.GetEnumerator();
            int pageNum = 0;
            int i       = 0;

            while (enu.MoveNext())
            {
                SkillSettings.DoTell2("" + enu.Current);
                string current = (string)enu.Current;
                if (current != "Main Menu" && !current.Contains("TMSS")) //Removes the Main Menu and the SkillStat gumps from the list.
                {
                    if (i % 8 == 0)                                      //if it's at 10, stop. Counts 1-10. (Same as 0-9)
                    {
                        pageNum++;
                        page.AddPage(pageNum);
                        page.SetupPage(@"Main Menu: ", (i == 0), (sortList.Count - (pageNum * 10)) <= 8 ? true : false, pageNum);
                    }
                    //string pluginName = (string)QueryPageHelper.GumpCalls[current];
                    int pluginID = -1;
                    try
                    {
                        pluginID = (int)QueryPageHelper.GumpIDs[current] + 1;
                    }
                    catch (Exception e) { SkillSettings.DoTell("BLAH! " + e); }
                    SkillSettings.DoTell2("Current Plugin: " + current);
                    page.AddEntryButton(0, i, sk.genericSelectUp, sk.genericSelectDn, pluginID, GumpButtonType.Reply, 0, current, "", "");
                    i++;
                }
            }
        }
Exemplo n.º 2
0
		public void GetGumpCode(TMQueryPage page)
		{
			//page.AddTitle(@"Main Menu:", "Control");
			page.AddIcon(2245, "Control");
			IEnumerator enu = QueryPageHelper.GumpNames.GetEnumerator();//list.GetEnumerator();
			//IEnumerator enu = enu1.GetEnumerator();
			ArrayList sortList = new ArrayList();
			while (enu.MoveNext())
			{
				string current = (string)((KeyValuePair<string, string>)enu.Current).Value;
				sortList.Add(current);
			}
			sortList.Sort(new AlphaCompare());
			enu = sortList.GetEnumerator();
			int pageNum = 0;
			int i = 0;
			while (enu.MoveNext())
			{
				SkillSettings.DoTell2("" + enu.Current);
				string current = (string)enu.Current;
				if (current != "Main Menu" && !current.Contains("TMSS"))//Removes the Main Menu and the SkillStat gumps from the list.
				{
					if (i % 8 == 0) //if it's at 10, stop. Counts 1-10. (Same as 0-9)
					{
						pageNum++;
						page.AddPage(pageNum);
						page.SetupPage(@"Main Menu: ", (i == 0), (sortList.Count - (pageNum * 10)) <= 8 ? true : false, pageNum);
					}
					//string pluginName = (string)QueryPageHelper.GumpCalls[current];
					int pluginID = -1;
					try
					{
						pluginID = (int)QueryPageHelper.GumpIDs[current] + 1;
					}
					catch (Exception e) { SkillSettings.DoTell("BLAH! " + e); }
					SkillSettings.DoTell2("Current Plugin: " + current);
					page.AddEntryButton(0, i, sk.genericSelectUp, sk.genericSelectDn, pluginID, GumpButtonType.Reply, 0, current, "", "");
					i++;
				}
			}
		}