public AccountPrivilege(Account accOwner, CPrivileges cpPrivileges) { this.Owner = accOwner; this.Privileges = cpPrivileges; }
public void ProconProtectedLayerSetPrivileges(Account account, CPrivileges sprvPrivileges) { if (Layer.AccountPrivileges.Contains(account.Name) == true) { Layer.AccountPrivileges[account.Name].SetPrivileges(sprvPrivileges); } else { Layer.AccountPrivileges.Add(new AccountPrivilege(account, sprvPrivileges)); } }
public AccountPrivilege(Account accOwner, CPrivileges cpPrivileges) { Owner = accOwner; Privileges = cpPrivileges; }
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) { Name = item.Name, Tag = item.Password, ImageKey = @"status_offline.png" }; ListViewItem.ListViewSubItem lsviNewSubitem = new ListViewItem.ListViewSubItem { Name = @"rconaccess", Tag = new CPrivileges() }; lviNewAccount.SubItems.Add(lsviNewSubitem); lsviNewSubitem = new ListViewItem.ListViewSubItem { Name = @"localaccess" }; lviNewAccount.SubItems.Add(lsviNewSubitem); lsviNewSubitem = new ListViewItem.ListViewSubItem { Text = String.Empty, Name = @"ip" }; lviNewAccount.SubItems.Add(lsviNewSubitem); this.lsvLayerAccounts.Items.Add(lviNewAccount); this.RefreshLayerPrivilegesPanel(); } }
void AccountsList_AccountRemoved(Account item) { item.AccountPasswordChanged -= new Account.AccountPasswordChangedHandler(acAccount_AccountPasswordChanged); if (this.lsvLayerAccounts.Items.ContainsKey(item.Name) == true) { this.lsvLayerAccounts.Items.Remove(this.lsvLayerAccounts.Items[item.Name]); } }
void acAccount_AccountPasswordChanged(Account item) { if (this.lsvLayerAccounts.Items.ContainsKey(item.Name) == true) { this.lsvLayerAccounts.Items[item.Name].Tag = item.Password; } }