コード例 #1
0
        private void CreateWidgets()
        {
            ConfigService.Load();
            Application.Current.Dispatcher.Invoke(() =>
            {
                this.notificationsWidget = new NotificationsWidget();
                this.comboMeterWidget    = new ComboMeterWidget();

                Overlay.RegisterWidget(this.notificationsWidget);
                Overlay.RegisterWidget(this.comboMeterWidget);
            });
        }
コード例 #2
0
        private void DestroyWidgets()
        {
            Application.Current.Dispatcher.Invoke(() =>
            {
                Overlay.UnregisterWidget(comboMeterWidget);
                Overlay.UnregisterWidget(notificationsWidget);
                this.comboMeterWidget.Close();
                this.notificationsWidget.Close();

                this.comboMeterWidget    = null;
                this.notificationsWidget = null;
            });
        }