Ejemplo n.º 1
0
        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 }));
            }
        }
Ejemplo n.º 2
0
        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 }));
            }
        }
Ejemplo n.º 3
0
        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]);
            }
        }
Ejemplo 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);
                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();
            }
        }
Ejemplo n.º 5
0
        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));
                
            }
        }
Ejemplo n.º 6
0
        void acAccount_AccountPasswordChanged(Account item) {

            if (this.lsvLayerAccounts.Items.ContainsKey(item.Name) == true) {
                this.lsvLayerAccounts.Items[item.Name].Tag = item.Password;
            }
        }
Ejemplo n.º 7
0
        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);
            }
        }
Ejemplo n.º 8
0
 private void AccountsList_AccountRemoved(Account item) {
     if (this.lstAccounts.Items.ContainsKey(item.Name) == true) {
         this.lstAccounts.Items.Remove(this.lstAccounts.Items[item.Name]);
     }
 }
Ejemplo n.º 9
0
 private void item_AccountPasswordChanged(Account item)
 {
     this.ForcefullyDisconnectAccount(item.Name);
 }
Ejemplo n.º 10
0
        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);
        }
Ejemplo n.º 11
0
        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);
        }
Ejemplo n.º 12
0
 private void accAccount_AccountPasswordChanged(Account item) {
     this.SaveAccountsConfig();
 }
Ejemplo n.º 13
0
        private void AccountsList_AccountAdded(Account item) {
            item.AccountPasswordChanged += new Account.AccountPasswordChangedHandler(accAccount_AccountPasswordChanged);

            this.SaveAccountsConfig();
        }