public ConfirmDialogViewModel() { Result = ConfirmResult.Cancel; YesCommand = new RelayCommand(() => Result = ConfirmResult.Yes); CancelCommand = new RelayCommand(() => Result = ConfirmResult.Cancel); SaveCommand = new RelayCommand(() => Result = ConfirmResult.Save); }
public Project() { Figures = new BindingList<GeometryFigure>(); scale = 1f; WasNeverSaved = true; Name = "Untitled"; RemoveCommand = new RelayCommand(OnRemovingRequested); }
private MainViewModel() { NewCommand = new RelayCommand(CreateNew); OpenCommand = new RelayCommand(Open); SaveCommand = new RelayCommand(Save, CanSave); SaveAsCommand = new RelayCommand(SaveAs, CanSave); ExportCommand = new RelayCommand(Export, CanSave); UndoCommand = new RelayCommand(Undo, CanUndo); RedoCommand = new RelayCommand(Redo, CanRedo); OpenProjects = new BindingList<Project>(); EditorModes = new BindingList<EditorMode> { EditorMode.Cursor, EditorMode.Line, EditorMode.Arc, EditorMode.Bezier, EditorMode.Spline, }; currentEditorMode = EditorModes.First(); }