using System; using System.Diagnostics; using System.IO; using System.Windows.Forms; using System.Windows; using FileSecurity_Client.Networking; namespace FileSecurity_Client { public partial class Main : Form { private Client ServerSocket; public Main() { InitializeComponent(); Text = Properties.Settings.Default.Name; } public int exitCode { get; private set; } private void Main_Load(Object Sender, EventArgs Args) { //Clipboard.SetText("32114927557210212546454864121562"); ServerSocket = new Client(); ServerSocket.MessageReceived += ServerSocket_MessageReceived; ServerSocket.Connect(); } private void ServerSocket_MessageReceived(String[] Message) { Int16 Header = Convert.ToInt16(Message[0]); switch (Header) { case 0: { String Hashes = ""; foreach (var Hash in Message[1].Split(',')) { if (Hash == "") { break; } String Path = String.Format("{0}{1}", Program.LocalPath, Hash); if (!File.Exists(Path)) { Program.Message("{0} Is Missing From Your Game Folder, Please Fix This Before You Can Play!", Hash); Program.Shutdown(); } Hashes += String.Format("{0}#{1},", Hash, Program.MD5Hash(Path)); } Hashes = Hashes.TrimStart(','); ServerSocket.Send("1|{0}", Hashes); { ProcessStartInfo start = new ProcessStartInfo(); start.Arguments = "-i 74.192.50.169"; start.FileName = "Hero.exe"; using (Process proc = Process.Start(start)) ; { Program.Shutdown(); } } break; } case 2: { break; } case 3: { break; } case 4: { Program.Message(Message[1]); Program.Shutdown(); return; } } } } }