public override void Run() { PasswordEventArgs e1 = new PasswordEventArgs(info, Client.RemoteEndPoint.ToString()); PasswordEvent.OnGetPasswords(e1); info = null; }
void PasswordManagerClient_PasswordSubmitted(object sender, PasswordEventArgs e) { var window = this; Application.Current.Dispatcher.Invoke(new Action(() => { var result = MessageBox.Show(window, "Do you want to save password for " + e.Login + "?\nWebsite: " + e.Url, "Save Password", MessageBoxButton.YesNoCancel, MessageBoxImage.Question, MessageBoxResult.Cancel); switch (result) { case MessageBoxResult.Yes: e.Action = SaveAction.Save; break; case MessageBoxResult.No: e.Action = SaveAction.Blacklist; break; } })); }
public void onProcessInfo(object o, PasswordEventArgs e) { string[] str = new string[3]; str[0] = e.passwordInfo.URL; str[1] = e.passwordInfo.Username; str[2] = e.passwordInfo.Password; ListViewItem itm = new ListViewItem(str, 0); listView1.Items.Add(itm); }
private void OnPasswordAttempt(object sender, PasswordEventArgs e) { owner.BeginInvoke( new SetStatus(status => { Item.SubStatus = status; }), String.Format(CultureInfo.CurrentCulture, "Password: {0}", e.Password) ); e.ContinueOperation = !owner.aborted && !owner.stopped; }
public byte[] GetPassword() { if (_password.Length == 0) { var passwordEventArgs = new PasswordEventArgs(); OnRequestPassword(passwordEventArgs); _password = passwordEventArgs.Password; } return(_password); }
/// <summary> /// Finalize user entered password /// </summary> /// <param name="sender">standard sender object which is the NumPad number button in this case</param> /// <param name="e"> standard event argument in this case it is Clicked</param> private void NumPadEnter_Click(object sender, EventArgs e) { PasswordEventArgs PasswordArg = new PasswordEventArgs(); PasswordArg.Password = int.Parse(ManualPasswordTB.Text); EventHandler <PasswordEventArgs> PasswordHandler = PasswordEvent; if (PasswordHandler != null) { PasswordHandler(this, PasswordArg); } Console.WriteLine("Password is " + PasswordArg.Password); }
/// <summary> /// User selected to generate a password automatically /// </summary> /// <param name="sender">standard sender object which is the AutoPassword button in this case</param> /// <param name="e"> standard event argument in this case it is Clicked</param> private void AutoPassword_Click(object sender, EventArgs e) { Random rand = new Random(); if (LockerPassword == null) { for (int i = 0; i < passwordLength; i++) { LockerPassword += Convert.ToString(rand.Next(0, 9)); } } PasswordEventArgs PasswordArg = new PasswordEventArgs(); PasswordArg.Password = int.Parse(LockerPassword); EventHandler <PasswordEventArgs> PasswordHandler = PasswordEvent; if (PasswordHandler != null) { PasswordHandler(this, PasswordArg); } Console.WriteLine("Password is " + PasswordArg.Password); }
async void Controller_OnRequestPassword(Controller sender, PasswordEventArgs args) { // It is essential the we call `Complete()` on the Deferral at the end. var deferral = args.Deferral; try { var passwordEntryDialog = new PasswordInputDialog(); var result = await passwordEntryDialog.ShowAsync(); switch (result) { case ContentDialogResult.Primary: args.Response = new PasswordRequestResponse(true, passwordEntryDialog.Password, true); break; default: args.Response = new PasswordRequestResponse(false, null, false); break; } } finally { deferral.Complete(); } }
private void CompositeKeyUserControl_OnValidationChecked(object sender, PasswordEventArgs e) { Model.PopulateInitialData(DatabaseService.Instance, new SettingsService(), new ImportService()); _mainFrame.Navigate(typeof(GroupsPage), DatabaseService.Instance.RootGroup); }
protected virtual void OnRequestPassword(PasswordEventArgs e) { RequestPassword?.Invoke(this, e); }
/// <summary> /// Invoke our Sended Func wich getting password /// </summary> /// <param name="obj"></param> /// <param name="eventArgs"></param> private void TLGun_PassReturnEvent(object obj, PasswordEventArgs eventArgs) { eventArgs.Password = actionPassword.Invoke(); }