// FIXME: Edit and sort functionality should be moved to commands in a wrapper view model // of the EventTypeTimelineVM since the logic could be different depending on the view void OnEditProperties(EventType eventType) { EditCategoryDialog dialog = new EditCategoryDialog(Project.Model, eventType, this.Toplevel as Window); dialog.Run(); dialog.Destroy(); }
private void Edit() { logger.Info("Displaying edit category dialog"); EditCategoryViewModel vm = new EditCategoryViewModel(this); EditCategoryDialog dialog = new EditCategoryDialog(vm); dialog.Show(); }
protected override void InvokeAction(Livet.Messaging.InteractionMessage m) { ////このアクションが対応するメッセージに変換します。 var confirmMessage = m as DialogMessage; if (confirmMessage == null) { return; } Window dialog = null; if (confirmMessage.ViewModel is EditCategoryDialogViewModel) { dialog = new EditCategoryDialog(); } else if (confirmMessage.ViewModel is VersionDialogViewModel) { dialog = new VersionDialog(); } else { LOG.Warn("サポートしていない形式のダイアログボックスを表示しようとしました。"); } // ダイアログの表示 if (dialog != null) { dialog.DataContext = confirmMessage.ViewModel; dialog.Owner = ApplicationContext.MainWindow; dialog.ShowDialog(); } }
protected virtual void OnEditProperties(EventType eventType) { EditCategoryDialog dialog = new EditCategoryDialog(project, eventType, this.Toplevel as Window); dialog.Run(); dialog.Destroy(); }
protected override void EditSelected() { EditCategoryDialog dialog = new EditCategoryDialog(); dialog.Category = selected[0]; dialog.HotKeysList = hkList; dialog.TransientFor = (Gtk.Window)Toplevel; dialog.Run(); dialog.Destroy(); Edited = true; }
protected virtual void OnEditProperties(TimeNode tNode, object val) { EditCategoryDialog dialog = new EditCategoryDialog(); dialog.Category = tNode as Category; dialog.Project = project; dialog.Run(); dialog.Destroy(); if (TimeNodeChanged != null) { TimeNodeChanged(tNode, tNode.Name); } }
private void OnAddClick(object sender, EventArgs e) { var transaction = SupportFragmentManager.BeginTransaction(); var old = SupportFragmentManager.FindFragmentByTag("add_dialog"); if (old != null) { transaction.Remove(old); } transaction.AddToBackStack(null); _addDialog = new EditCategoryDialog(Resource.String.add, AddDialogPositive, AddDialogNegative); _addDialog.Show(transaction, "add_dialog"); }
private void OnRenameClick(object item, int position) { var transaction = SupportFragmentManager.BeginTransaction(); var old = SupportFragmentManager.FindFragmentByTag("rename_dialog"); if (old != null) { transaction.Remove(old); } transaction.AddToBackStack(null); var name = _categorySource.Categories[position].Name; _renameDialog = new EditCategoryDialog(Resource.String.rename, RenameDialogPositive, RenameDialogNegative, name); _renameDialog.Show(transaction, "rename_dialog"); _renamePosition = position; }