Start() public method

public Start ( ) : void
return void
Ejemplo n.º 1
0
        public static void Start(System.Windows.Forms.Panel enginePanel)
        {
            if (mProcess != null)
            {
                throw new InvalidOperationException("Engine process already running");
            }

            ProcessInfo info;

            if (!PrepareProcessInfo(out info))
                throw new Exception("User aborted");

            if (!info.mExternalProcess)
            {
                LogService.Log("Starting engine");
                mProcess = new EngineProcess(info.mFileName, info.mWorkingDirectory, info.mSystemPath, enginePanel);
                mProcess.Start();
                LogService.Log("Engine started");
            }

            if (mNetworkService != null)
            {
                throw new InvalidOperationException("Network service running");
            }

            mNetworkService = new EngineNetworkService();

            mNetworkService.Connected += mNetworkService_Connected;

            mNetworkService.Start();
        }
Ejemplo n.º 2
0
        public static void Start(System.Windows.Forms.Panel enginePanel)
        {
            if (mProcess != null)
            {
                throw new InvalidOperationException("Engine process already running");
            }

            ProcessInfo info;

            if (!PrepareProcessInfo(out info))
            {
                throw new Exception("User aborted");
            }

            if (!info.mExternalProcess)
            {
                LogService.Log("Starting engine");
                mProcess = new EngineProcess(info.mFileName, info.mWorkingDirectory, info.mSystemPath, enginePanel);
                mProcess.Start();
                LogService.Log("Engine started");
            }

            if (mNetworkService != null)
            {
                throw new InvalidOperationException("Network service running");
            }

            mNetworkService = new EngineNetworkService();

            mNetworkService.Connected += mNetworkService_Connected;

            mNetworkService.Start();
        }