コード例 #1
0
        public void Update_OnTick(Timer t)
        {
            Profiles.Save();
            GMenuItem item = this.m_Shard.Menu;

            if (item == null)
            {
                Engine.UpdateSmartLoginMenu();
            }
            else
            {
                for (int i = 0; i < this.m_Shard.Characters.Length; i++)
                {
                    GMenuItem item2 = this.m_Shard.Characters[i].Menu;
                    if (item2 == null)
                    {
                        item.Add(this.m_Shard.Characters[i].Menu = item2 = new GPlayCharacterMenu(this.m_Shard.Characters[i]));
                    }
                    else
                    {
                        item2.Text = this.m_Shard.Characters[i].Name;
                    }
                }
                Gump[] gumpArray = item.Children.ToArray();
                for (int j = 0; j < gumpArray.Length; j++)
                {
                    GPlayCharacterMenu child = gumpArray[j] as GPlayCharacterMenu;
                    if ((child != null) && !this.m_Shard.Contains(child.Character))
                    {
                        item.Remove(child);
                    }
                }
            }
        }
コード例 #2
0
        public void Update_OnTick(Timer t)
        {
            Profiles.Save();
            GMenuItem item = this.m_Account.Menu;

            if ((item == null) || ((item == this.m_Server.Menu) && (this.m_Account.Shards.Length != 1)))
            {
                Engine.UpdateSmartLoginMenu();
            }
            else if (this.m_Account.Shards.Length > 1)
            {
                for (int i = 0; i < this.m_Account.Shards.Length; i++)
                {
                    GMenuItem item2 = this.m_Account.Shards[i].Menu;
                    if (item2 == null)
                    {
                        item.Add(this.m_Account.Shards[i].Menu = item2 = new GShardMenu(this.m_Account.Shards[i]));
                    }
                    else
                    {
                        item2.Text = this.m_Account.Shards[i].Name;
                    }
                }
                Gump[] gumpArray = item.Children.ToArray();
                for (int j = 0; j < gumpArray.Length; j++)
                {
                    GShardMenu child = gumpArray[j] as GShardMenu;
                    if ((child != null) && !this.m_Account.Contains(child.Shard))
                    {
                        item.Remove(child);
                    }
                }
            }
        }
コード例 #3
0
 private void Remove_OnClick(Gump g)
 {
     this.m_Account.Server.RemoveAccount(this.m_Account);
     Profiles.Save();
     Engine.UpdateSmartLoginMenu();
     this.Close();
 }
コード例 #4
0
        private void Okay_OnClick(Gump g)
        {
            string title   = this.m_Title.String;
            string address = this.m_Address.String;
            string str3    = this.m_Port.String;

            Profiles.AddServer(new ServerProfile(title, address, Convert.ToInt32(str3)));
            Profiles.Save();
            Engine.UpdateSmartLoginMenu();
            this.Close();
        }
コード例 #5
0
        private void Okay_OnClick(Gump g)
        {
            string         title    = this.m_Title.String;
            string         username = this.m_Username.String;
            string         password = this.m_Password.String;
            AccountProfile account  = new AccountProfile(this.m_Server, title, username, password);

            this.m_Server.AddAccount(account);
            new ServerSync(this.m_Server, account, null);
            Profiles.Save();
            Engine.UpdateSmartLoginMenu();
            this.Close();
        }