private string WriteCommand(string cmd, string value = null) { var s = cmd; if (value != null) { s += ' ' + value + "\n\n"; } #if DEBUG Debug.Write("WRITING COMMAND: " + s); #endif var result = _fuego.HandleCommand(s); return(result); }
public GtpResponse SendCommand(string command) { string res = _fuegoInstance.HandleCommand(command); bool success = false; if (res.StartsWith("= ")) { success = true; res = res.Substring(2); } if (res.StartsWith("? ")) { success = false; res = res.Substring(2); } return(new GtpResponse(success, res.Trim())); }