public string getArguments(IQCredentials iqc) { var arguments = ""; if (Product != "") { arguments += "-product " + Product + " "; } if (Version != "") { arguments += "-version " + Version + " "; } if (iqc.LoginId != "") { arguments += "-login " + iqc.LoginId + " "; } if (iqc.Password != "") { arguments += "-password " + iqc.Password + " "; } if (iqc.SaveCredentials) { arguments += "-savelogininfo "; } if (iqc.AutoConnect) { arguments += "-autoconnect"; } arguments.TrimEnd(' '); return(arguments); }
public bool Launch(IQCredentials iqc = null, string arguments = null, int pauseMilliseconds = 6000) { if (iqc == null) { iqc = getCredentials(); } if (iqc == null) { iqc = new IQCredentials(); } if (arguments == null) { arguments = getArguments(iqc); } var psi = new ProcessStartInfo("IQConnect.exe", arguments) { UseShellExecute = true }; Process.Start(psi); Thread.Sleep(pauseMilliseconds); return(true); }