protected override void OnNavigatedTo(NavigationEventArgs e) { if (e.Parameter is FillingLevelApp.App) { FillingLevelApp.App AppEnvironment = e.Parameter as FillingLevelApp.App; if (AppEnvironment != null) { m_Environment = AppEnvironment.Environment; if (m_Environment != null) { this.m_SocketStationListeners = m_Environment.StationSocketListeners; for (int i = 0; i < this.m_SocketStationListeners.SocketListeners.Count; i++) { StationLib.StationSocketListener plistener = this.m_SocketStationListeners.SocketListeners[i]; plistener.StationSensors.SensorValues.VectorChanged += SensorValues_VectorChanged; } if (m_SocketStationListeners.SelectedIndex == -1) { m_SocketStationListeners.SelectedIndex = 0; } } this.startProcessing(); } } base.OnNavigatedTo(e); }
protected override void OnNavigatedTo(NavigationEventArgs e) { if (e.Parameter is FillingLevelApp.App) { FillingLevelApp.App AppEnvironment = e.Parameter as FillingLevelApp.App; if (AppEnvironment != null) { m_Environment = AppEnvironment.Environment; if (m_Environment != null) { m_SettingsToStorage = AppEnvironment.SettingsToStorage; this.m_SocketStationListeners = m_Environment.StationSocketListeners; // für alle Listeners Processing stoppen this.m_SocketStationListeners.DeInitialization(); if (m_SocketStationListeners.SelectedIndex == -1) { m_SocketStationListeners.SelectedIndex = 0; } } } } base.OnNavigatedTo(e); }
protected override void OnNavigatedTo(NavigationEventArgs e) { if (e.Parameter is FillingLevelApp.App) { FillingLevelApp.App AppEnvironment = e.Parameter as FillingLevelApp.App; if (AppEnvironment != null) { m_Environment = AppEnvironment.Environment; this.StationListeners = m_Environment.getWeatherStationListeners(); for (int i = 0; i < StationListeners.SocketListeners.Count; i++) { StationLib.StationSocketListener plistener = m_StationListeners.SocketListeners[i]; plistener.MainFrame = this.Frame; plistener.Update += Plistener_Update; } if (m_StationListeners.SelectedIndex == -1) { m_StationListeners.SelectedIndex = 0; } } this.startProcessing(); } base.OnNavigatedTo(e); }
public ListenerConfiguration() { m_SocketStationListeners = null; m_Environment = null; m_SettingsToStorage = null; this.InitializeComponent(); }