/// <summary> /// when we click on the button, this function happen. /// in our case- the choose itrm remove from the list /// </summary> /// <param name="obj"></param> private void OnRemove(object obj) { if (chooseItem != null) { DataInfo remove = new DataInfo(CommandEnum.CloseCommand, this.chooseItem); TcpClientConnection client = TcpClientConnection.Instance; client.WriteToServer(remove.toJson()); this.chooseItem = null; } }
/// <summary> /// the function send request from the server to the set config /// </summary> public void getFirstConfi() { DataInfo msg = new DataInfo(CommandEnum.GetConfigCommand, null); clientConnection.WriteToServer(msg.toJson()); }