Exemplo n.º 1
0
 public AccountPrivilege(Account accOwner, CPrivileges cpPrivileges) {
     this.Owner = accOwner;
     this.Privileges = cpPrivileges;
 }
Exemplo n.º 2
0
 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));
     }
 }
Exemplo n.º 3
0
 public AccountPrivilege(Account accOwner, CPrivileges cpPrivileges) {
     Owner = accOwner;
     Privileges = cpPrivileges;
 }
Exemplo n.º 4
0
        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();
            }
        }
Exemplo n.º 5
0
        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]);
            }
        }
Exemplo n.º 6
0
        void acAccount_AccountPasswordChanged(Account item) {

            if (this.lsvLayerAccounts.Items.ContainsKey(item.Name) == true) {
                this.lsvLayerAccounts.Items[item.Name].Tag = item.Password;
            }
        }