Esempio n. 1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            // Reset list choice
            if (_serviceListBox != null)
            {
                _serviceListBox.SelectedIndex = -1;
            }

            // These must be initialized before the UI loads
            DeviceVm.Initialize(GlobalSettings.SelectedDevice);
            ServicesVm.Initialize(GlobalSettings.SelectedDevice.ServiceModels);

            // Complete remaining initialization without blocking this callback
            Utilities.RunFuncAsTask(GlobalSettings.SelectedDevice.RegisterNotificationsAsync);
        }
Esempio n. 2
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = new DeviceVm(new Device("TFS"));
 }