Exemplo n.º 1
0
 private void runBatchPasswordChangerWorker(IPasswordChangerService passwordChangerService)
 {
     Debug.WriteLine("runBatchPasswordChangerWorker");
     this.pwChangerWorker.SaveDatabaseAfterEachUpdate = true;
     this.pwChangerWorker.Changed   += new PasswordChangedEventHandler(batchPasswordChangerWorkerChanged);
     this.pwChangerWorker.Error     += new PasswordChangeErrorEventHandler(batchPasswordChangerWorkerError);
     this.pwChangerWorker.Completed += new PasswordChangeCompletedEventHandler(batchPasswordChangerWorkerCompleted);
     this.pwChangerWorker.Run();
 }
Exemplo n.º 2
0
        public FormPasswordChanger(IHostPwEntry hostPwEntry, IPasswordChangerService pwChangerService)
        {
            InitializeComponent();

            this.hostPwEntry      = hostPwEntry;
            this.pwChangerService = pwChangerService;

            this.Text = this.Text.Replace("{}", String.Format("{0}@{1}", hostPwEntry.GetUsername(), hostPwEntry.IPAddress));

            this.maskedTextBoxNewPassword.TextChanged       += new EventHandler(checkPasswords);
            this.maskedTextBoxRepeatNewPassword.TextChanged += new EventHandler(checkPasswords);
            this.maskedTextBoxNewPassword.TextChanged       += new EventHandler(checkControls);
            this.maskedTextBoxRepeatNewPassword.TextChanged += new EventHandler(checkControls);
            this.buttonChangePassword.Enabled = false;

            this.FormClosing += new FormClosingEventHandler(formClosing);
            this.KeyDown     += new KeyEventHandler(form_KeyPress);
        }
 public BatchPasswordChangerWorker(IPasswordChangerService service, ICollection <IHostPwEntry> entries, String newPassword)
 {
     this.service     = service;
     this.entries     = new List <IHostPwEntry>(entries);
     this.newPassword = newPassword;
 }