Пример #1
0
        protected override ImageInfo Execute(TaskSettings taskSettings)
        {
            Rectangle rect      = CaptureHelpers.GetScreenWorkingArea();
            ImageInfo imageInfo = CreateImageInfo(rect);

            imageInfo.Image = TaskHelpers.GetScreenshot(taskSettings).CaptureFullscreen();
            return(imageInfo);
        }
Пример #2
0
        protected override TaskMetadata Execute(TaskSettings taskSettings)
        {
            Rectangle    rect     = CaptureHelpers.GetScreenWorkingArea();
            TaskMetadata metadata = CreateMetadata(rect);

            metadata.Image = TaskHelpers.GetScreenshot(taskSettings).CaptureFullscreen();
            return(metadata);
        }
Пример #3
0
        private void RunEasterEgg()
        {
            screenRect = CaptureHelpers.GetScreenWorkingArea();

            bounceTimer          = new Timer();
            bounceTimer.Interval = 20;
            bounceTimer.Tick    += bounceTimer_Tick;
            bounceTimer.Start();
        }
Пример #4
0
        public EasterEggBounce(Form form)
        {
            Form = form;

            timer          = new Timer();
            timer.Interval = 20;
            timer.Tick    += bounceTimer_Tick;

            BounceRectangle = CaptureHelpers.GetScreenWorkingArea();
        }
Пример #5
0
        public void Start()
        {
            if (!IsWorking)
            {
                IsWorking = true;

                screenRectangle = CaptureHelpers.GetScreenWorkingArea();
                bounceTimer.Start();
            }
        }
Пример #6
0
        public void Start()
        {
            if (!IsWorking)
            {
                IsWorking = true;

                screenRectangle = CaptureHelpers.GetScreenWorkingArea();
                velocity        = new Point(MathHelpers.RandomPick(-Speed, Speed), ApplyGravity ? GravityPower : MathHelpers.RandomPick(-Speed, Speed));
                timer.Start();
            }
        }
Пример #7
0
        private void UpdatePosition()
        {
            Rectangle rectScreen = CaptureHelpers.GetScreenWorkingArea();

            if (!Program.Settings.SimpleActionsFormPosition.IsEmpty && rectScreen.Contains(Program.Settings.SimpleActionsFormPosition))
            {
                Location = Program.Settings.SimpleActionsFormPosition;
            }
            else
            {
                Rectangle rectActiveScreen = CaptureHelpers.GetActiveScreenWorkingArea();

                if (Width < rectActiveScreen.Width)
                {
                    Location = new Point(rectActiveScreen.X + rectActiveScreen.Width - Width, rectActiveScreen.Y + rectActiveScreen.Height - Height);
                }
                else
                {
                    Location = rectActiveScreen.Location;
                }
            }
        }
Пример #8
0
        private void CheckToolbarPosition()
        {
            Rectangle rectToolbar = Bounds;
            Rectangle rectScreen  = CaptureHelpers.GetScreenWorkingArea();
            Point     pos         = rectToolbar.Location;

            if (rectToolbar.Width < rectScreen.Width)
            {
                if (rectToolbar.X < rectScreen.X)
                {
                    pos.X = rectScreen.X;
                }
                else if (rectToolbar.Right > rectScreen.Right)
                {
                    pos.X = rectScreen.Right - rectToolbar.Width;
                }
            }

            if (rectToolbar.Height < rectScreen.Height)
            {
                if (rectToolbar.Y < rectScreen.Y)
                {
                    pos.Y = rectScreen.Y;
                }
                else if (rectToolbar.Bottom > rectScreen.Bottom)
                {
                    pos.Y = rectScreen.Bottom - rectToolbar.Height;
                }
            }

            if (pos != rectToolbar.Location)
            {
                Location = pos;
            }

            Program.Settings.ActionsToolbarPosition = pos;
        }
Пример #9
0
 public CompanionCubesForm()
 {
     StartPosition = FormStartPosition.Manual;
     Bounds        = CaptureHelpers.GetScreenWorkingArea();
     Shown        += CompanionCubesForm_Shown;
 }