/// <summary> /// Handle SettingsView from the Explorer window /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnButtonClick(object sender, RoutedEventArgs e) { switch (((Button)sender).Name) { case "buttonSettings": { try { if (!new SettingsViewControl().ShowDialog() == true) { break; } Model = new ViewModel(MingleSettings.Host, MingleSettings.Login, MingleSettings.Password); Cursor = Cursors.Wait; BindProjectList(); ClearTrees(); } catch (Exception ex) { TraceLog.Exception(new StackFrame().GetMethod().Name, ex); AlertUser(ex); } finally { Cursor = Cursors.Arrow; } break; } case "buttonRefresh": { try { Cursor = Cursors.Wait; BindAll(); } catch (Exception ex) { TraceLog.Exception(new StackFrame().GetMethod().Name, ex); AlertUser(ex); } finally { Cursor = Cursors.Arrow; } break; } case "buttonFeedback": { var feedback = new FeedbackViewControl(); feedback.ShowDialog(); feedback.Dispose(); break; } case "buttonNewCard": { try { ShowCardViewToolWindow(Model.CreateCard(cardTypes.SelectedValue.ToString(), "new card")); } catch (Exception ex) { TraceLog.Exception(new StackFrame().GetMethod().Name, ex); AlertUser(ex); } break; } case "buttonGetCard": { if (!string.IsNullOrEmpty(card.Text) && Convert.ToInt32(card.Text, CultureInfo.CurrentCulture) > 0) { ShowCardViewToolWindow(Convert.ToInt32(card.Text, CultureInfo.CurrentCulture)); } break; } case "buttonOpenMurmurWindow": { _murmurs = ShowMurmurWindow(); break; } } }
/// <summary> /// Handle SettingsView from the Explorer window /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnButtonClick(object sender, RoutedEventArgs e) { switch (((Button) sender).Name) { case "buttonSettings": { try { if (!new SettingsViewControl().ShowDialog() == true) break; Model = new ViewModel(MingleSettings.Host, MingleSettings.Login, MingleSettings.Password); Cursor = Cursors.Wait; BindProjectList(); ClearTrees(); } catch (Exception ex) { TraceLog.Exception(new StackFrame().GetMethod().Name, ex); AlertUser(ex); } finally { Cursor = Cursors.Arrow; } break; } case "buttonRefresh": { try { Cursor = Cursors.Wait; BindAll(); } catch (Exception ex) { TraceLog.Exception(new StackFrame().GetMethod().Name, ex); AlertUser(ex); } finally { Cursor = Cursors.Arrow; } break; } case "buttonFeedback": { var feedback = new FeedbackViewControl(); feedback.ShowDialog(); feedback.Dispose(); break; } case "buttonNewCard": { try { ShowCardViewToolWindow(Model.CreateCard(cardTypes.SelectedValue.ToString(), "new card")); } catch (Exception ex) { TraceLog.Exception(new StackFrame().GetMethod().Name, ex); AlertUser(ex); } break; } case "buttonGetCard": { if (!string.IsNullOrEmpty(card.Text) && Convert.ToInt32(card.Text, CultureInfo.CurrentCulture) > 0) ShowCardViewToolWindow(Convert.ToInt32(card.Text, CultureInfo.CurrentCulture)); break; } case "buttonOpenMurmurWindow": { _murmurs = ShowMurmurWindow(); break; } } }