Advertisement
Guest User

Untitled

a guest
Jan 17th, 2013
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.18 KB | None | 0 0
  1. using Microsoft.VisualBasic;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Data;
  6. using System.Diagnostics;
  7. using System.Net;
  8. public class Form1
  9. {
  10.     private void PictureBox1_Click(object sender, EventArgs e)
  11.     {
  12.         try
  13.         {
  14.             Process.Start(My.Application.Info.DirectoryPath.ToString + "\\***.exe");
  15.             Application.Exit();
  16.         }
  17.         catch (Exception ex)
  18.         {
  19.             Interaction.MsgBox("CANNOT FIND ***.exe PLEASE CHECK FILE DIRECTORY!", MsgBoxStyle.Critical);
  20.         }
  21.  
  22.  
  23.         try
  24.         {
  25.             My.Computer.FileSystem.WriteAllText(My.Application.Info.DirectoryPath.ToString + "\\Data\\enUS\\realmlist.wtf", "*******", false);
  26.             Interaction.MsgBox("Realmlist is changed!", MsgBoxStyle.Information);
  27.         }
  28.         catch (Exception ex)
  29.         {
  30.             Interaction.MsgBox("Cannot find realmlist, please contact administrator for more help", MsgBoxStyle.Critical);
  31.  
  32.         }
  33.  
  34.         if (My.Computer.FileSystem.DirectoryExists(My.Application.Info.DirectoryPath.ToString + "\\Cache"))
  35.         {
  36.             try
  37.             {
  38.                 My.Computer.FileSystem.DeleteDirectory(My.Application.Info.DirectoryPath.ToString + "\\Cache", Microsoft.VisualBasic.FileIO.DeleteDirectoryOption.DeleteAllContents);
  39.                 Interaction.MsgBox("Cache Cleared!", MsgBoxStyle.Information);
  40.             }
  41.             catch (Exception ex)
  42.             {
  43.                 Interaction.MsgBox("CANNOT FIND CACHE PLEASE CHECK FILE DIRECTORY!", MsgBoxStyle.Critical);
  44.             }
  45.         }
  46.     }
  47.  
  48.     private void PictureBox1_MouseEnter(object sender, EventArgs e)
  49.     {
  50.         PictureBox1.BackgroundImage = My.Resources.Play_hover;
  51.     }
  52.  
  53.     private void PictureBox1_MouseLeave(object sender, EventArgs e)
  54.     {
  55.         PictureBox1.BackgroundImage = My.Resources.Play_nonclick;
  56.     }
  57.  
  58.     private void PictureBox4_Click(object sender, EventArgs e)
  59.     {
  60.         System.Diagnostics.Process.Start("http://immortal-wow.com/");
  61.     }
  62.  
  63.     private void PictureBox4_MouseEnter(object sender, EventArgs e)
  64.     {
  65.         PictureBox4.BackgroundImage = My.Resources.home_hover;
  66.     }
  67.  
  68.     private void PictureBox4_MouseLeave(object sender, EventArgs e)
  69.     {
  70.         PictureBox4.BackgroundImage = My.Resources.Home_nonclick;
  71.     }
  72.  
  73.     private void PictureBox5_Click(object sender, EventArgs e)
  74.     {
  75.         System.Diagnostics.Process.Start("******");
  76.     }
  77.  
  78.     private void PictureBox5_MouseEnter(object sender, EventArgs e)
  79.     {
  80.         PictureBox5.BackgroundImage = My.Resources.Donate_hover;
  81.     }
  82.  
  83.     private void PictureBox5_MouseLeave(object sender, EventArgs e)
  84.     {
  85.         PictureBox5.BackgroundImage = My.Resources.Donate_nonclick;
  86.     }
  87.  
  88.  
  89.  
  90.     private void CheckForUpdateToolStripMenuItem_Click(object sender, EventArgs e)
  91.     {
  92.         CheckForUpdates();
  93.     }
  94.  
  95.  
  96.     public void CheckForUpdates()
  97.     {
  98.  
  99.     }
  100.  
  101.     private void Form1_Load(object sender, EventArgs e)
  102.     {
  103.         System.Net.HttpWebRequest request = System.Net.HttpWebRequest.Create("******");
  104.  
  105.         System.Net.HttpWebResponse response = request.GetResponse();
  106.         System.IO.StreamReader sr = new System.IO.StreamReader(response.GetResponseStream());
  107.         string newestversion = sr.ReadToEnd();
  108.         string currentversion = Application.ProductVersion;
  109.  
  110.         if (newestversion.Contains(currentversion))
  111.         {
  112.         }
  113.         else
  114.         {
  115.             Interaction.MsgBox("There is a new update we will download it now for you.");
  116.             System.Diagnostics.Process.Start("******");
  117.         }
  118.     }
  119.  
  120.     private void PictureBox6_Click(object sender, EventArgs e)
  121.     {
  122.         this.Close();
  123.     }
  124.  
  125.     private void PictureBox6_MouseEnter(object sender, EventArgs e)
  126.     {
  127.         PictureBox6.BackgroundImage = My.Resources.x_button_Hover;
  128.     }
  129.  
  130.     private void PictureBox6_MouseLeave(object sender, EventArgs e)
  131.     {
  132.         PictureBox6.BackgroundImage = My.Resources.x_button_nonclick;
  133.     }
  134.  
  135.  
  136.     private void PictureBox3_Click(object sender, EventArgs e)
  137.     {
  138.     }
  139.     public Form1()
  140.     {
  141.         Load += Form1_Load;
  142.     }
  143. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement