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(); } }
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); }
static public bool CheckID() { string id = Core_Regedit.Read("ID"); if (id == null) { return(false); } else { if (id.Length == 3) { return(true); } else { return(false); } } }