private void sendCommandButton_Click(object sender, EventArgs e) { string command = this.inputTxtBox.Text; if (!string.IsNullOrEmpty(command)) { command = command.Trim(); string reponse = C50Communication.SendRequestAndWaitReply(command); this.outputTxtBox.Text = reponse; } }
public static string SetAnyProperty(string prop, string value, int theUnitID) { if ((value.Contains("UNKNOWN")) || (value == "0")) { //we shouldn't try and set this value... return(""); } string command = SETANYPROPERTY.Replace("PSCUNIT", theUnitID.ToString()); string toSet = prop + "=\"" + value + "\""; command = command.Replace("PSCTOSET", toSet); return(C50Communication.SendRequestAndWaitReply(command)); }
public static string GetAllStatus(int unitID) { string command = GETALLSTATUS.Replace("PSCUNIT", unitID.ToString()); return(C50Communication.SendRequestAndWaitReply(command)); }