private void AccountsList_AccountRemoved(Account item) { if (this.IsLoggedIn == true && this.m_blEventsEnabled == true && this.Game != null) { this.Game.SendRequest("procon.account.onDeleted", item.Name); //this.send(new Packet(true, false, this.AcquireSequenceNumber, new List<string>() { "procon.account.onDeleted", item.Name })); } }
private void AccountsList_AccountAdded(Account item) { this.m_prcClient.Layer.AccountPrivileges[item.Name].AccountPrivilegesChanged += new AccountPrivilege.AccountPrivilegesChangedHandler(CPRoConLayerClient_AccountPrivilegesChanged); if (this.IsLoggedIn == true && this.m_blEventsEnabled == true && this.Game != null) { this.Game.SendRequest("procon.account.onCreated", item.Name); //this.send(new Packet(true, false, this.AcquireSequenceNumber, new List<string>() { "procon.account.onCreated", item.Name })); } }
void AccountsList_AccountRemoved(Account item) { item.AccountPasswordChanged -= new Account.AccountPasswordChangedHandler(acAccount_AccountPasswordChanged); if (this.lsvLayerAccounts.Items.ContainsKey(item.Name) == true) { //foreach (KeyValuePair<string, CPRoConLayerClient> kvpConnection in this.m_dicLayerClients) { // kvpConnection.Value.OnAccountDeleted(e.AccountName); //} this.lsvLayerAccounts.Items.Remove(this.lsvLayerAccounts.Items[item.Name]); } }
void AccountsList_AccountAdded(Account item) { item.AccountPasswordChanged += new Account.AccountPasswordChangedHandler(acAccount_AccountPasswordChanged); if (this.lsvLayerAccounts.Items.ContainsKey(item.Name) == false) { ListViewItem lviNewAccount = new ListViewItem(item.Name); lviNewAccount.Name = item.Name; lviNewAccount.Tag = item.Password; lviNewAccount.ImageKey = "status_offline.png"; ListViewItem.ListViewSubItem lsviNewSubitem = new ListViewItem.ListViewSubItem(); //lsviNewSubitem.Text = "none"; lsviNewSubitem.Name = "rconaccess"; lsviNewSubitem.Tag = new CPrivileges(); lviNewAccount.SubItems.Add(lsviNewSubitem); lsviNewSubitem = new ListViewItem.ListViewSubItem(); //lsviNewSubitem.Text = "none"; lsviNewSubitem.Name = "localaccess"; lviNewAccount.SubItems.Add(lsviNewSubitem); lsviNewSubitem = new ListViewItem.ListViewSubItem(); lsviNewSubitem.Text = String.Empty; lsviNewSubitem.Name = "ip"; lviNewAccount.SubItems.Add(lsviNewSubitem); this.lsvLayerAccounts.Items.Add(lviNewAccount); //foreach (KeyValuePair<string, CPRoConLayerClient> kvpConnection in this.m_dicLayerClients) { // kvpConnection.Value.OnAccountCreated(e.AccountName); //} this.RefreshLayerPrivilegesPanel(); } }
public void ProconProtectedLayerSetPrivileges(Account account, CPrivileges sprvPrivileges) { if (this.Layer.AccountPrivileges.Contains(account.Name) == true) { this.Layer.AccountPrivileges[account.Name].SetPrivileges(sprvPrivileges); } else { this.Layer.AccountPrivileges.Add(new AccountPrivilege(account, sprvPrivileges)); } }
void acAccount_AccountPasswordChanged(Account item) { if (this.lsvLayerAccounts.Items.ContainsKey(item.Name) == true) { this.lsvLayerAccounts.Items[item.Name].Tag = item.Password; } }
private void AccountsList_AccountAdded(Account item) { if (this.lstAccounts.Items.ContainsKey(item.Name) == false) { ListViewItem lviNewAccount = new ListViewItem(item.Name); lviNewAccount.Tag = item.Password; lviNewAccount.Name = item.Name; lviNewAccount.ImageIndex = 0; this.lstAccounts.Items.Add(lviNewAccount); } }
private void AccountsList_AccountRemoved(Account item) { if (this.lstAccounts.Items.ContainsKey(item.Name) == true) { this.lstAccounts.Items.Remove(this.lstAccounts.Items[item.Name]); } }
private void item_AccountPasswordChanged(Account item) { this.ForcefullyDisconnectAccount(item.Name); }
private void AccountsList_AccountRemoved(Account item) { item.AccountPasswordChanged -= new Account.AccountPasswordChangedHandler(item_AccountPasswordChanged); this.AccountPrivileges[item.Name].AccountPrivilegesChanged -= new AccountPrivilege.AccountPrivilegesChangedHandler(apPrivs_AccountPrivilegesChanged); this.AccountPrivileges.Remove(item.Name); this.ForcefullyDisconnectAccount(item.Name); }
private void AccountsList_AccountAdded(Account item) { AccountPrivilege apPrivs = new AccountPrivilege(item, new CPrivileges()); this.AccountPrivileges.Add(apPrivs); item.AccountPasswordChanged += new Account.AccountPasswordChangedHandler(item_AccountPasswordChanged); apPrivs.AccountPrivilegesChanged += new AccountPrivilege.AccountPrivilegesChangedHandler(apPrivs_AccountPrivilegesChanged); }
private void accAccount_AccountPasswordChanged(Account item) { this.SaveAccountsConfig(); }
private void AccountsList_AccountAdded(Account item) { item.AccountPasswordChanged += new Account.AccountPasswordChangedHandler(accAccount_AccountPasswordChanged); this.SaveAccountsConfig(); }