/// /// <param name="parentModel"></param> public override void Initialize(ISSUIViewModel parentModel) { MenuViewModel?.InitializeMenu(ExecuteMenuCommand, CanExecuteManuCommand); //KeyboardSystem?.StartSystem(); //MouseSystem?.StartSystem(); //PluginSystem?.StartSystem(); ScreenShotSystem?.StartSystem(); ScreenShots = new ObservableCollection<ISSScreenShotViewModel>(); SubscribeInteractionProviders(); }
private void MakeScreenShot() { try { InternalWindow.WindowState = WindowState.Minimized; var screen = ScreenShotSystem.GetScreenshot(); InternalWindow.WindowState = WindowState.Normal; AddScreenShot(screen); MouseSystem.ResetCurrentAction(); } catch (Exception ex) { Logger.Error(ex.ToString()); } }
private void OnSelectionWindow(SSPayload<bool> ssPayload) { MouseSystem.ResetCurrentAction(); if (ssPayload.Value) { var selectedWindow = MouseSystem.GetSelectedWindow(); System.Diagnostics.Debug.WriteLine(string.Format("SelectedWindow: {0}", selectedWindow)); var activeWnd = ScreenShotSystem.GetScreenshtOfSelectedWindow(selectedWindow); AddScreenShot(activeWnd); } else { System.Diagnostics.Debug.WriteLine(string.Format("SelectedWindow was canceled...")); } InternalWindow.WindowState = WindowState.Normal; }
private void OnSelectionArea(SSPayload<bool> result) { try { if (result.Value) { var region = MouseSystem.GetSelectedArea(); var selectedArea = ScreenShotSystem.GetScreenshotOfSelectedArea( new System.Drawing.Point((int)region.Item1.X, (int)region.Item1.Y), new System.Drawing.Point((int)region.Item2.X, (int)region.Item2.Y)); AddScreenShot(selectedArea); } InternalWindow.WindowState = WindowState.Normal; MouseSystem.ResetCurrentAction(); } catch (Exception ex) { Logger.Error(ex.ToString()); } }