示例#1
0
        // Remote computers queries

        internal void GetWsusClientID(List <int> indexes, WPP.Security.Credential credential)
        {
            foreach (int index in indexes)
            {
                WppComputer remoteComputer = this._computersTable.Rows[index].Field <WppComputer>(this._localization.GetLocalizedString("ComputerObj"));
                this._computersTable.Rows[index].SetField <String>(this._localization.GetLocalizedString("WsusClientID"), remoteComputer.GetWsusClientID(credential));
            }
        }
 private void btnEditCredentials_Click(object sender, EventArgs e)
 {
     try
     {
         FrmEditCredentialsSettings credentialEditor = new FrmEditCredentialsSettings(this.txtBxCredentials.Text);
         if (credentialEditor.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             this.txtBxCredentials.Text      = credentialEditor.Credential.Username;
             this.txtBxCredentials.BackColor = SystemColors.Control;
             this._credential = credentialEditor.Credential;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(this._localization.GetLocalizedString("AnErrorOccursWhileEditingCredentials") + "\r\n" + ex.Message);
     }
 }