Esempio n. 1
0
        protected override void StartInternal()
        {
            Logger.LogInfo("EmulatorInputPin is starting ...");

            _service = new IPCRemoteControlHost("EmulatorInputPin");
            _service.OnPostRequest += new OnPostRequestHandler(_service_OnPostRequest);
            
            Logger.LogInfo("EmulatorInputPin has started succesfully ...");
        }
Esempio n. 2
0
        protected override void StopInternal()
        {
            Logger.LogInfo("EmulatorInputPin is stopping ...");

            _service.StopInternal();
            _service.OnPostRequest -= new OnPostRequestHandler(_service_OnPostRequest);
            _service = null;

            Logger.LogInfo("EmulatorInputPin has stopped succesfully ...");
        }
        protected override void DoInitialize(string appName)
        {
            base.DoInitialize(appName);

            _wcdReceiver = new WmCopyDataReceiver(appName);
            _wcdReceiver.DataReceived += new DataReceivedHandler(_wcdReceiver_DataReceived);

            _ipcReceiver = new IPCRemoteControlHost(appName);
            _ipcReceiver.OnSendRequest += new OnSendRequestHandler(_receiver_OnSendRequest);
            _ipcReceiver.OnPostRequest += new OnPostRequestHandler(_receiver_OnPostRequest);
        }
        protected override void DoTerminate()
        {
            if (_ipcReceiver != null)
            {
                _ipcReceiver.OnSendRequest -= new OnSendRequestHandler(_receiver_OnSendRequest);
            	_ipcReceiver = null;
            }

            if (_wcdReceiver != null)
            {
                _wcdReceiver.DataReceived -= new DataReceivedHandler(_wcdReceiver_DataReceived);
            	_wcdReceiver = null;
            }
            
            base.DoTerminate();
        }