Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        public ListenerConfiguration()
        {
            m_SocketStationListeners = null;
            m_Environment            = null;
            m_SettingsToStorage      = null;

            this.InitializeComponent();
        }
Ejemplo n.º 5
0
        public App()
        {
            InitializeComponent();

            m_Environment = new StationEnvironment();

            m_eMailing = new EmailSupport.eMailing();



            m_displayRequest    = new Windows.System.Display.DisplayRequest();
            m_displayRequestCnt = 0;
            // Deferred execution until used. Check https://msdn.microsoft.com/library/dd642331(v=vs.110).aspx for further info on Lazy<T> class.
            _activationService = new Lazy <ActivationService>(CreateActivationService);

            m_SettingsToStorage = new SettingsToStorage(this);



            this.Suspending += App_Suspending;
        }