public void Notes() { var dialog = new NotesDialog(); dialog.Owner = System.Windows.Application.Current.MainWindow; dialog.ShowDialog(); }
private void OpenNotesDialog(object sender) { if (!(sender is RequestItemViewModel)) { return; } var requestModel = sender as RequestItemViewModel; if (!requestModel.RequestId.HasValue) { return; } var model = new NoteDialogViewModel(_requestService, requestModel.RequestId.Value); var view = new NotesDialog(); model.SetView(view); view.Owner = _view; view.DataContext = model; view.ShowDialog(); }
private void OnEditTaskNote(object parameter) { Log.Instance.LogInfo(string.Format("DataGridViewModel.OnEditTaskNote {0}", parameter)); if (parameter is DataGridRow) { int r = (parameter as DataGridRow).GetIndex(); if (r >= 0) { Log.Instance.LogDebug(string.Format("DataGridViewModel.OnDeleteTask - editing note for task {0}", r)); NotesDialog d = new NotesDialog(r, TaskListGroup.GetTaskNote(CurrentTaskList, r), OnChangeNote); d.ShowDialog(); } } else { Log.Instance.LogError("DataGridViewModel.OnDeleteTask - parameter is not a DataGridRow"); } }