예제 #1
0
파일: KSyscalls.cs 프로젝트: tmbx/etkwm
        /// <summary>
        /// This method is called in the context of the UI thread when the
        /// worker thread has completed.
        /// </summary>
        public void OnCompletion(int exitCode)
        {
            m_thread = null;

            // The caller has already terminated the process. Bail out.
            if (!m_runningFlag) return;

            m_runningFlag = false;
            if (ProcessEnd != null) ProcessEnd(this, new ProcEndEventArgs(exitCode));
        }
예제 #2
0
파일: KSyscalls.cs 프로젝트: tmbx/etkwm
 /// <summary>
 /// Start the process.
 /// </summary>
 public void Start()
 {
     Debug.Assert(m_runningFlag == false);
     ProcessInfo = new KSyscalls.PROCESS_INFORMATION();
     CreateProcess(null, CommandLine, InheritHandles, CreationFlags, ref StartupInfo, out ProcessInfo);
     m_runningFlag = true;
     m_thread = new KProcessThread(this);
     m_thread.Start();
 }