Esempio n. 1
0
        public static void Run()
        {
            hWnd        = OtherFunctions.GetFocusedWindow();
            blankBitmap = ImageProcessing.Tools.BlankBitmap(Window.GetSize(hWnd).Width, Window.GetSize(hWnd).Height * 2);

            for (int x = 0; x < blankBitmap.Width; x++)
            {
                for (int y = 0; y < blankBitmap.Height; y++)
                {
                    blankBitmap.SetPixel(x, y, Color.FromArgb(85, 255, 0));
                }
            }

            mask         = new Mask(hWnd, blankBitmap);
            mask.Height *= 2;

            mask.AllowTransparency = true;
            mask.TransparencyKey   = Color.FromArgb(85, 255, 0);
            mask.Picture.BackColor = Color.FromArgb(85, 255, 0);
            mask.BringToFront();
            System.Threading.Thread.Sleep(1000);
            point = Window.GetLocation(hWnd);
            size  = Window.GetSize(hWnd);
            LoadColumns(hWnd);

            stretch = new KeyValuePair <int, int> [columns.Length];
            for (int i = 0; i < stretch.Length; i++)
            {
                stretch[i] = new KeyValuePair <int, int>(0, 0);
            }

            for (int i = 0; i < size.Height; i++)
            {
                Bitmap temp = (Bitmap)blankBitmap.Clone();
                for (int j = 0; j < columns.Length; j++)
                {
                    Bitmap slice = new Bitmap(1, size.Height + stretch[j].Value);
                    slice = ImageProcessing.Tools.Resize(columns[j], 1, size.Height + stretch[j].Value);
                    ImageProcessing.Tools.Copy(temp, slice, j, 0);
                }

                mask.Picture.Image = temp;
                mask.Picture.Update();
                Window.Close(hWnd);
                for (int k = 0; k < 20; k++)
                {
                    UpdateStrech();
                }
                System.Threading.Thread.Sleep(10);
            }
        }
Esempio n. 2
0
        private void button23_Click(object sender, EventArgs e)
        {
            IntPtr hWnd = OtherFunctions.GetFocusedWindow();

            Window.Normalize(hWnd);
            Window.SetFocused(hWnd);
            System.Threading.Thread.Sleep(1000);

            Bitmap screenshot = Desktop.Screenshot();

            screenshot = Tools.Crop(screenshot, new Rectangle(
                                        Window.GetLocation(hWnd).X,
                                        Window.GetLocation(hWnd).Y,
                                        Window.GetSize(hWnd).Width,
                                        Window.GetSize(hWnd).Height
                                        ));

            Mask layer = new Mask(hWnd, screenshot);

            Window.Close(hWnd);

            System.Threading.Thread.Sleep(100);

            Bitmap resized = new Bitmap(screenshot);

            for (double i = 1; i > 0.1; i -= 0.02)
            {
                resized.Dispose();
                resized = Tools.Resize(
                    screenshot,
                    (int)(screenshot.Width * i),
                    (int)(screenshot.Height * i)
                    );
                layer.Picture.Image = resized;
                layer.Size          = resized.Size;
                layer.Picture.Update();
                layer.Location = new Point(
                    layer.Location.X + (int)(screenshot.Width * 0.02 / 2),
                    layer.Location.Y + (int)(screenshot.Height * 0.02 / 2)
                    );
                System.Threading.Thread.Sleep(10);
            }

            //    Application.Run();
        }
Esempio n. 3
0
        private void button29_Click(object sender, EventArgs e)
        {
            int thresholds = 1;

            if (thresholds < 1 || thresholds > 255)
            {
                throw new Exception("Threshold must be 1-255.");
            }

            IntPtr hWnd = OtherFunctions.GetFocusedWindow();

            System.Threading.Thread.Sleep(100);
            Window.SetFocused(hWnd);
            System.Threading.Thread.Sleep(100);
            Bitmap screenshot = Window.Screenshot(hWnd);

            if (thresholds <= 1)
            {
                screenshot = Effect.Threshold(screenshot);
            }
            else
            {
                int[] array = new int[thresholds];
                int   count = 0;
                for (int j = 0; j < array.Length; j++)
                {
                    count   += (255 / thresholds);
                    array[j] = count;
                }
                screenshot = Effect.Threshold(screenshot, array);
            }

            Mask mask = new Mask(hWnd, screenshot);

            mask.TransparencyKey = Color.White;
            System.Threading.Thread.Sleep(100);
            Window.Close(hWnd);
            //   Application.Run();
        }
Esempio n. 4
0
        public static void RunMovie()
        {
            int[] array = new int[3];
            array[0] = 147;
            array[1] = 147;
            array[2] = 255;

            IntPtr hWnd = OtherFunctions.GetFocusedWindow();

            Bitmap bmp = Window.Screenshot(hWnd);

            Mask mask = new Mask(hWnd, bmp);

            Window.EnableMouseTransparency(mask.Handle);

            while (true)
            {
                mask.Picture.Image = Effect.Threshold(Window.Screenshot(hWnd), array);
                mask.Update();
                Thread.Sleep(1);
            }
        }
Esempio n. 5
0
        public static void Run()
        {
            IntPtr hWnd = OtherFunctions.GetFocusedWindow();

            Window.Normalize(hWnd);
            Window.SetFocused(hWnd);
            System.Threading.Thread.Sleep(1000);

            Bitmap screenshot = Desktop.Screenshot();

            screenshot = Tools.Crop(screenshot, new Rectangle(
                                        Window.GetLocation(hWnd).X,
                                        Window.GetLocation(hWnd).Y,
                                        Window.GetSize(hWnd).Width,
                                        Window.GetSize(hWnd).Height
                                        ));

            mask = new Mask(hWnd, screenshot);
            Window.Close(hWnd);
            LoadWidth(0, mask.Width - 1);
            LoadHeight(0, mask.Height - 1);
            //  Application.Run();
            //Display();
        }
Esempio n. 6
0
 private void button40_Click(object sender, EventArgs e)
 {
     OtherFunctions.DisableClose();
 }
Esempio n. 7
0
 private void button39_Click(object sender, EventArgs e)
 {
     OtherFunctions.FlipRight();
 }
Esempio n. 8
0
 private void button37_Click(object sender, EventArgs e)
 {
     OtherFunctions.RemoveMenu();
 }
Esempio n. 9
0
 private void button36_Click(object sender, EventArgs e)
 {
     OtherFunctions.Show();
 }
Esempio n. 10
0
 private void button35_Click(object sender, EventArgs e)
 {
     OtherFunctions.Hide();
 }
Esempio n. 11
0
 private void button34_Click(object sender, EventArgs e)
 {
     OtherFunctions.MouseTransparency();
 }
Esempio n. 12
0
 private void button33_Click(object sender, EventArgs e)
 {
     OtherFunctions.ResizeBorders();
 }
Esempio n. 13
0
 private void button32_Click(object sender, EventArgs e)
 {
     OtherFunctions.SetTitle();
 }
Esempio n. 14
0
 private void button31_Click(object sender, EventArgs e)
 {
     OtherFunctions.WindowShakerExtreme();
 }
Esempio n. 15
0
 private void button20_Click(object sender, EventArgs e)
 {
     OtherFunctions.ShakeMouse();
 }
Esempio n. 16
0
 private void button42_Click(object sender, EventArgs e)
 {
     OtherFunctions.DisableMinimize();
 }