Exemplo n.º 1
0
        public void DeActivate()
        {
            if (!IsActive)
                return;

            telemetryReceiver.TelemetryReceived -= telemetryReceiver_TelemetryReceived;
            telemetryReceiver.Deactivate();
            telemetryReceiver.Dispose();
            telemetryReceiver = null;
            IsActive = false;
        }
Exemplo n.º 2
0
        public void Activate()
        {
            if (IsActive)
                return;

            telemetryReceiver = new Models.TelemetryReceiver(Properties.Settings.Default.TelemetryPort);
            telemetryReceiver.TelemetryReceived += new EventHandler<Models.TelemetryReceivedEventArgs>(telemetryReceiver_TelemetryReceived);
            telemetryReceiver.Activate();
            IsActive = true;
        }