public DistanceTool(StretchMode stretch, IScreenServiceHost host) : base(host) { this.StretchMode = stretch; this.screenshot = this.Host.CurrentScreen; this.InitializeComponent(); if (this.StretchMode == StretchMode.EastWest) { this.N.Visibility = Visibility.Collapsed; this.S.Visibility = Visibility.Collapsed; } else if (this.StretchMode == StretchMode.NorthSouth) { this.E.Visibility = Visibility.Collapsed; this.W.Visibility = Visibility.Collapsed; } #if !DEBUG this.Cursor = Cursors.None; #endif this.Dimensions.CloseClicked += delegate { this.CloseService(); }; this.Loaded += delegate { this.Update(); }; }
public Magnifier(IScreenServiceHost host) : base(host) { this.InitializeComponent(); new Dragger(this); this.Focusable = true; this.Scale = 8; DispatcherTimer timer = new DispatcherTimer() { Interval = TimeSpan.FromSeconds(.03), IsEnabled = true, }; timer.Tick += this.HandleTick; this.Loaded += delegate { this.Focus(); }; this.InputBindings.Add(new InputBinding(Magnifier.CopyCommand, new KeyGesture(Key.C, ModifierKeys.Control))); this.CommandBindings.Add(new CommandBinding(Magnifier.CopyCommand, this.CopyCommandExecuted)); this.InputBindings.Add(new InputBinding(Magnifier.SetBasePointCommand, new KeyGesture(Key.Enter))); this.CommandBindings.Add(new CommandBinding(Magnifier.SetBasePointCommand, this.SetBasePointExecuted)); }
public DistanceTool(StretchMode stretch, IScreenServiceHost host) : base(host) { StretchMode = stretch; screenshot = Host.CurrentScreen; InitializeComponent(); if (StretchMode == StretchMode.EastWest) { N.Visibility = Visibility.Collapsed; S.Visibility = Visibility.Collapsed; } else if (StretchMode == StretchMode.NorthSouth) { E.Visibility = Visibility.Collapsed; W.Visibility = Visibility.Collapsed; } #if !DEBUG this.Cursor = Cursors.None; #endif Dimensions.CloseClicked += delegate { CloseService(); OnDimensionsCloseClicked(new EventArgs()); }; Loaded += delegate { Update(); }; }
public Tool(IScreenServiceHost host) { this.Host = host; this.Focusable = true; this.HorizontalContentAlignment = HorizontalAlignment.Stretch; this.VerticalContentAlignment = VerticalAlignment.Stretch; this.Loaded += delegate { this.Focus(); }; }
public Tool(IScreenServiceHost host) { Host = host; Focusable = true; HorizontalContentAlignment = HorizontalAlignment.Stretch; VerticalContentAlignment = VerticalAlignment.Stretch; Loaded += delegate { Focus(); }; }
public BoundsTool(IScreenServiceHost host) : base(host) { this.screenshot = this.Host.CurrentScreen; InitializeComponent(); this.BoundsWidth.Width = new GridLength(0, GridUnitType.Pixel); this.BoundsHeight.Height = new GridLength(0, GridUnitType.Pixel); this.Dimensions.Visibility = Visibility.Collapsed; this.Dimensions.CloseClicked += delegate { this.CloseService(); }; }
public Settings(IScreenServiceHost host) : base(host) { this.InitializeComponent(); new Dragger(this); this.Focusable = true; this.ToleranceSlider.Value = ScreenCoordinates.ColorTolerance; this.ToleranceSlider.ValueChanged += delegate { ScreenCoordinates.ColorTolerance = this.ToleranceSlider.Value; }; }
public Capture(IScreenServiceHost host) : base(host) { InitializeComponent(); this.InputBindings.Add(new InputBinding(Capture.CopyCommand, new KeyGesture(Key.C, ModifierKeys.Control))); this.CommandBindings.Add(new CommandBinding(Capture.CopyCommand, this.HandleCopy)); this.BoundsWidth.Width = new GridLength(0, GridUnitType.Pixel); this.BoundsHeight.Height = new GridLength(0, GridUnitType.Pixel); this.Dimensions.Visibility = Visibility.Collapsed; this.Dimensions.CloseClicked += delegate { this.CloseService(); }; }
public FlyoutTool(IScreenServiceHost host) : base(host) { }