ProcInstruction(interfaceEngine argu) { list = argu; if (list.PickUpFeasibility() != null) { while (true) { buffer = list.Dequeue().Substring('|'); Console.WriteLine(buffer); } } }
public UserWeb(interfaceEngine ListOfChat) { String MysqlCon = "Server=localhost; Database=UserWeb; Uid=root; Pwd=IOT123;"; conn = new MySqlConnection(MysqlCon); try { tmp1 = ListOfChat; ListOfChat.Enqueue("Connecting to Mysql.."); conn.Open(); } catch (Exception ex) { ListOfChat.Enqueue(ex.ToString()); } ListOfChat.Enqueue("Done."); }
private void Form1_Load(object sender, EventArgs e) { List <string> listOfCOM = GetConnectComDevice(); foreach (string COM in listOfCOM) { Port_COM.Items.Add(COM); } MsgEngine = new interfaceEngine(500); InsEngine = new interfaceEngine(500); Sender = new Protocol(); Proto = new string[5]; Proto[0] = "LTemp"; Proto[1] = "LHumi"; Proto[2] = "BTemp"; Proto[3] = "BHumi"; Proto[4] = "Parking"; Mysql = new UserWeb(MsgEngine); isOnDB = true; DBLabel.Text = "DB ON"; }