mRemoteNG.Tools.ExternalTool.Start C# (CSharp) Method

Start() public method

public Start ( ConnectionInfo startConnectionInfo = null ) : void
startConnectionInfo ConnectionInfo
return void
        public void Start(ConnectionInfo startConnectionInfo = null)
        {
            try
            {
                if (string.IsNullOrEmpty(FileName))
                {
                    Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "ExternalApp.Start() failed: FileName cannot be blank.");
                    return;
                }

                ConnectionInfo = startConnectionInfo;

                if (TryIntegrate)
                    StartIntegrated();
                else
                    StartExternalProcess();
            }
            catch (Exception ex)
            {
                Runtime.MessageCollector.AddExceptionMessage("ExternalApp.Start() failed.", ex);
            }
        }

Usage Example

 private void StartExternalApp(ExternalTool externalTool)
 {
     try
     {
         if (SelectedNode.GetTreeNodeType() == TreeNodeType.Connection | SelectedNode.GetTreeNodeType() == TreeNodeType.PuttySession)
             externalTool.Start(SelectedNode);
     }
     catch (Exception ex)
     {
         Runtime.MessageCollector.AddExceptionStackTrace("cMenTreeToolsExternalAppsEntry_Click failed (UI.Window.ConnectionTreeWindow)", ex);
     }
 }
All Usage Examples Of mRemoteNG.Tools.ExternalTool::Start