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); } } } }
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); } } } }
private void Remove_OnClick(Gump g) { this.m_Account.Server.RemoveAccount(this.m_Account); Profiles.Save(); Engine.UpdateSmartLoginMenu(); this.Close(); }
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(); }
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(); }
private void Okay_OnClick(Gump g) { this.m_Account.Title = this.m_Title.String; this.m_Account.Username = this.m_Username.String; this.m_Account.Password = this.m_Password.String; if ((this.m_Account.Menu != null) && (this.m_Account.Menu != this.m_Account.Server.Menu)) { this.m_Account.Menu.Text = this.m_Account.Title; } new ServerSync(this.m_Account.Server, this.m_Account, null); Profiles.Save(); this.Close(); }