private void updateUI(String message) { Func <int> del = delegate() { String infMes = ">>>>" + message + "\n"; fm2.setText(infMes); return(0); }; fm2.Invoke(del); }
public void updateUI(string message, Boolean isConsole) { Func <int> del = delegate() { fm2.setText(message + System.Environment.NewLine); if (!isConsole) { sc.incomingMessageSwitcher(message); if (message.Contains("#")) { if (message.Split('#')[0].Equals("si")) { changeStr(conn, message.Split('#')[1]); } if (message.Split('#')[0].Equals("ex")) { removeClientAndName(message.Split('#')[1]); } if (message.Split('#')[0].Equals("kli")) { if (message.Split('#')[1].Equals("aç")) { fm2.klimaAcmaTalebi(nameList[connessioniServer.IndexOf(sonMesajGonderen)], sonMesajGonderen); } else { fm2.klimaKapamaTalebi(nameList[connessioniServer.IndexOf(sonMesajGonderen)], sonMesajGonderen); } } } else { fm2.setText("Gelen sıcaklık: " + message + "\n"); } } return(0); }; fm2.Invoke(del); }
private void updateUI(String message) { Func<int> del = delegate () { if(message.Equals("ac")) { fm2.startingFan(true); } else if(message.Equals("kapa")) { fm2.startingFan(false); } else fm2.editTemp(message); return 0; }; fm2.Invoke(del); }