private void OnAddClickHandler(object obj) { BlurbEditWindow window = new BlurbEditWindow(); window.DataContext = new BlurbEditWindowViewModel(dataRepository); window.ShowDialog(); UpdateSideBarTagList(); UpdateBlurbSideBarList(); }
private void OnEditClickHandler(object ob) { if (SelectedBlurb != null) { BlurbEditWindow window = new BlurbEditWindow(); window.DataContext = new BlurbEditWindowViewModel(dataRepository, SelectedBlurb); window.ShowDialog(); UpdateSideBarTagList(); UpdateBlurbSideBarList(); } }
private void OnCloseClickHandler(object obj) { if (currentBlurb.Id == 0) { dataRepository.CreateNewBlurb(currentBlurb); } BlurbEditWindow window = obj as BlurbEditWindow; if (window != null) { window.Close(); } }