static void Main(string[] args) { AppLibrary.Hide(); Console.ForegroundColor = ConsoleColor.Yellow; while (Struct.Lan == false) { if (CoreLibrary.CheckServer() == true) { Struct.Lan = true; } } if (CoreLibrary.CheckID() == false) { Register RegisterForm = new Register(); RegisterForm.ShowDialog(); } else { Struct.ID = Core_Regedit.Read("ID"); CoreLibrary.CreateData(); CoreLibrary.SendStatus(Struct.ID); CoreLibrary.SendData(Struct.ID, CoreLibrary.CreateData()); Core_Regedit.AddStatup(); Thread Thread1 = new Thread(new ThreadStart(SendStatus)); Thread1.Start(); Thread Thread2 = new Thread(new ThreadStart(SendData)); Thread2.Start(); Thread Thread3 = new Thread(new ThreadStart(CheckTask)); Thread3.Start(); Thread Thread4 = new Thread(new ThreadStart(Killer)); Thread4.Start(); } }
static void SendStatus() { while (true) { CoreLibrary.SendStatus(Struct.ID); System.Threading.Thread.Sleep(60000); } }
private void Tab1RegisterButton_Click(object sender, EventArgs e) { CoreLibrary.CreateDevice(Tab1PasswordText.Text); Struct.ID = Core_Regedit.Read("ID"); CoreLibrary.CreateData(); CoreLibrary.SendStatus(Struct.ID); CoreLibrary.SendData(Struct.ID, CoreLibrary.CreateData()); Tab3ID.Text = "ID: " + Struct.ID; Tab3Password.Text = "Password: " + Tab1PasswordText.Text; SelectTab(3); }