public void ExecuteNextFile(bool blnUseHistory = false) { string strPath; if (_chkClosePrevious.Checked) { ClosePreviousProcess(); } try { strPath = _objFileCycler.GetNextFilePath(blnUseHistory); if (strPath != String.Empty) { //start proces making sure it is started, or exited. _objProcess = RifleUtils.StartProcessSafe(strPath, true, 2000, _chkMaximizeWindow.Checked, _txtArguments.Text); if (_chkShiftFocus.Checked == false) { RifleUtils.ForceWindowFocus(this); } SetCurrentFilePathInfo(strPath); } } catch (Exception ex) { } }
public void WaitForProgramIdle() { RifleUtils.WaitForTrue(() => { return(ProgramStatus == ProgramStatus.Ok); }, FileCache.GetGatherTimeout()); }