コード例 #1
0
        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();
            };
        }
コード例 #2
0
ファイル: Magnifier.xaml.cs プロジェクト: RSchwoerer/rooler
        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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        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();
            };
        }
コード例 #5
0
ファイル: Tool.cs プロジェクト: zygissd/rooler
        public Tool(IScreenServiceHost host)
        {
            this.Host      = host;
            this.Focusable = true;

            this.HorizontalContentAlignment = HorizontalAlignment.Stretch;
            this.VerticalContentAlignment   = VerticalAlignment.Stretch;

            this.Loaded += delegate {
                this.Focus();
            };
        }
コード例 #6
0
ファイル: Tool.cs プロジェクト: RSchwoerer/rooler
        public Tool(IScreenServiceHost host)
        {
            this.Host = host;
            this.Focusable = true;

            this.HorizontalContentAlignment = HorizontalAlignment.Stretch;
            this.VerticalContentAlignment = VerticalAlignment.Stretch;

            this.Loaded += delegate {
                this.Focus();
            };
        }
コード例 #7
0
ファイル: Tool.cs プロジェクト: ericsmithalan/HvccPrototype
        public Tool(IScreenServiceHost host)
        {
            Host      = host;
            Focusable = true;

            HorizontalContentAlignment = HorizontalAlignment.Stretch;
            VerticalContentAlignment   = VerticalAlignment.Stretch;

            Loaded += delegate
            {
                Focus();
            };
        }
コード例 #8
0
        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();
            };
        }
コード例 #9
0
        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;
            };
        }
コード例 #10
0
ファイル: Capture.xaml.cs プロジェクト: zygissd/rooler
        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();
            };
        }
コード例 #11
0
ファイル: Capture.xaml.cs プロジェクト: RSchwoerer/rooler
        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();
            };
        }
コード例 #12
0
 public FlyoutTool(IScreenServiceHost host) : base(host)
 {
 }