public void Stop(HomeSimCockpitSDK.StartStopType stopType) { _isWorking = false; foreach (Variable v in _output) { switch (v.Type) { case VariableType.Bool: v.SetValue(false); break; case VariableType.Int: v.SetValue(0); break; case VariableType.Double: v.SetValue(0d); break; case VariableType.String: v.SetValue(""); break; } } // zakończenie wysyłania/odbierania zdarzeń. if (StopWorking != null) { StopWorking(this, null); } }
public void Start(HomeSimCockpitSDK.StartStopType startType) { _isWorking = true; // przygotowanie do wysyłania/odbierania zdarzeń. if (StartWorking != null) { StartWorking(this, null); } foreach (Variable v in _input) { switch (v.Type) { case VariableType.Bool: v.SetValue(false); break; case VariableType.Int: v.SetValue(0); break; case VariableType.Double: v.SetValue(0d); break; case VariableType.String: v.SetValue(""); break; } } }
public void Stop(HomeSimCockpitSDK.StartStopType startStopType) { _working = false; if (_simAdapter.simAdapterClientControl1.Connected) { _simAdapter.simAdapterClientControl1.Disconnect(); } }
public void Start(HomeSimCockpitSDK.StartStopType StartStartStopType) { Stop(HomeSimCockpitSDK.StartStopType.Input); _working = true; if (_registeredVariable.Count > 0) { _processingThread = new Thread(new ThreadStart(ProcessingMethod)); _processingThread.Start(); } }
public void Stop(HomeSimCockpitSDK.StartStopType StartStopType) { _working = false; if (_processingThread != null) { try { _processingThread.Abort(); } catch { } _processingThread = null; } }
public void Start(HomeSimCockpitSDK.StartStopType startStopType) { Stop(startStopType); _working = true; _firstData = true; if (_registeredVariable.Count > 0) { _simAdapter.simAdapterClientControl1.ServerIP = _configuration.ServerIP; _simAdapter.simAdapterClientControl1.ServerPort = _configuration.ServerPort; _simAdapter.simAdapterClientControl1.Password = _configuration.Password; _simAdapter.simAdapterClientControl1.ClientPort = _configuration.ClientPort; _simAdapter.simAdapterClientControl1.Connect(); } }
public void Start(HomeSimCockpitSDK.StartStopType startStopType) { if (_registeredVariable.Count > 0) { foreach (Variable v in _registeredVariable) { v.First = true; } _client.ServerAddress = _configuration.ServerIP.ToString(); _client.ServerPort = _configuration.ServerPort; _working = true; _client.Connect(); } }
public void Stop(HomeSimCockpitSDK.StartStopType startStopType) { _working = false; _client.Disconnect(); }