private void HandleSettingsClick(object sender, RoutedEventArgs e) { JiraSettingsWindow jiraSettingsWindow = new JiraSettingsWindow { Owner = this, InitialSettings = _jiraSettingsStorage.Get() }; if (jiraSettingsWindow.ShowDialog() == true) { _jiraSettingsStorage.Set(jiraSettingsWindow.ProvidedSettings); } }
private void InvokeJiraApiClientDependentAction(Action <JiraApiClient> action) { JiraApiClient client = _jiraApiClientFacade.TryToGetClientWithPreviouslyProvidedSettings(); if (client == null) { JiraSettingsWindow jiraSettingsWindow = new JiraSettingsWindow { Owner = this }; if (jiraSettingsWindow.ShowDialog() == true) { client = _jiraApiClientFacade.GetClientWithNewSettings(jiraSettingsWindow.ProvidedSettings); } } if (client != null) { action(client); } }
private void InvokeJiraApiClientDependentAction(Action<JiraApiClient> action) { JiraApiClient client = _jiraApiClientFacade.TryToGetClientWithPreviouslyProvidedSettings(); if (client == null) { JiraSettingsWindow jiraSettingsWindow = new JiraSettingsWindow { Owner = this }; if (jiraSettingsWindow.ShowDialog() == true) { client = _jiraApiClientFacade.GetClientWithNewSettings(jiraSettingsWindow.ProvidedSettings); } } if (client != null) { action(client); } }