/// <summary> /// Method to lock and unlock account list. /// </summary> public async void LockUnlockForm() { if (!Locked) { Locked = true; AccountsList.Clear(); } else { Locked = false; await OpenAccountList(); } }
/// <summary> /// Open dialog for a new simple account locker file with DialogViewModel and DialogService. /// </summary> public void NewSALFile() { var viewModel = new DialogViewModel(true); IDialog result = dialogService.ShowDialog(viewModel); if (result != null) { if (result.ShowDialog().Value == true) { // Accepted // MessageBox.Show("Accepted " + (string)result.Content); settings.saveFileLocation = (string)result.Content; SaveSettings(); // await OpenAccountList(); AccountsList.Clear(); SaveAccountList(); } else { // MessageBox.Show("False"); } } }
protected override void ClearData() { AccountsList.Clear(); }