public static bool TryConnect(string command, out string result) { bool success; result = ""; try { IAgExecCmdResult cmdResult = Root.ExecuteCommand(command); if (cmdResult.Count > 0) { for (int i = 0; i < cmdResult.Count; i++) { result += string.IsNullOrEmpty(result) ? cmdResult[i] : Environment.NewLine + cmdResult[i]; } } success = cmdResult.IsSucceeded; } catch (Exception e) { result = e.Message.ToString(); success = false; } return(success); }
public RasterSearch(AgStkObjectRoot m_root) { root = m_root; AGI.STKUtil.IAgExecCmdResult result = m_root.ExecuteCommand("GetDirectory / STKHome"); installDir = result[0]; }
public GreatArcUpdate(AgStkObjectRoot m_root) { root = m_root; AGI.STKUtil.IAgExecCmdResult result = m_root.ExecuteCommand("GetDirectory / STKHome"); installDir = result[0]; }