コード例 #1
0
 private void HandleSettingsClick(object sender, RoutedEventArgs e)
 {
     JiraSettingsWindow jiraSettingsWindow = new JiraSettingsWindow { Owner = this, InitialSettings = _jiraSettingsStorage.Get() };
      if (jiraSettingsWindow.ShowDialog() == true)
      {
     _jiraSettingsStorage.Set(jiraSettingsWindow.ProvidedSettings);
      }
 }
コード例 #2
0
      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);
         }
      }