示例#1
0
 ///
 /// <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();
 }
示例#2
0
 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());
     }
 }
示例#3
0
        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;
        }
示例#4
0
        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());
            }
        }