/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel() { ViewportManager = new ViewportManager(); LayersManager = new LayersManager(ViewportManager); ToolsManager = new ToolsManager(LayersManager, ViewportManager); if (!IsInDesignMode) { ToolsManager.InitInstance(); } RestoreWindowCommand = new RelayCommand(SetWindowActive); DisplaySettings = new RelayCommand(() => { var sw = new SettingsWindow(); sw.Show(); }); CloseAppCommand = new RelayCommand(() => { Application.Current.Shutdown(); }); StartUsingToolCommand = new RelayCommand(() => ToolsManager.ActivateTool()); EndUsingToolCommand = new RelayCommand(() => ToolsManager.DeactivateTool()); MoveMoveCommand = new RelayCommand(() => ToolsManager.ReactOnMouseMove()); }