private void Window_Activated(object sender, EventArgs e) { if (_zeroAccounts) { // Il ne faut pas avertir à chaque affichage de la fenêtre _zeroAccounts = false; if (MessageBox.Show(CIV.strings.Dashboard_ZeroAccountPrompt, strings.Dashboard_Information, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes) { _accountManagerForm = new AccountManager(); _accountManagerForm.Owner = this; Nullable<bool> dialogResult = _accountManagerForm.ShowDialog(); _accountManagerForm = null; if (dialogResult != null && dialogResult == true) RefreshAccount(true); } } if (_emptyToken) { // Il ne faut pas avertir à chaque affichage de la fenêtre _emptyToken = false; if (MessageBox.Show(CIV.strings.Dashboard_TokenAlert, strings.Dashboard_Information, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes) { _accountManagerForm = new AccountManager(); _accountManagerForm.Owner = this; Nullable<bool> dialogResult = _accountManagerForm.ShowDialog(); _accountManagerForm = null; if (dialogResult != null && dialogResult == true) RefreshAccount(true); } } }
private void miAccountManager_Click(object sender, RoutedEventArgs e) { _accountManagerForm = new AccountManager(); _accountManagerForm.Owner = this; Nullable<bool> dialogResult = _accountManagerForm.ShowDialog(); _accountManagerForm = null; if (dialogResult != null && dialogResult == true) { RefreshAccount(true); } }