public void OnAddonEvent(AddonEventKind evt) { if (evt == AddonEventKind.InitializeAddon) { Current = this; DeviceCollection = ((App)App.Current).CollectionViewModel; m_hardwareManager = new HardwareManager(DeviceCollection, WindowsAudioFactory.Create(AudioDeviceKind.Playback)); // Monitor the EarTrumpet flyout so we don't show when the flyout is showing. _flyoutViewModel = (FlyoutViewModel)((App)Application.Current).FlyoutWindow.DataContext; _flyoutViewModel.StateChanged += OnFlyoutViewModelStateChanged; // Create a window to use as OSD. _osdWindowViewModel = new OSDWindowViewModel(); _osdWindow = new OSDWindow(_osdWindowViewModel); _osdWindow.Initialize(); // Listen to events and then present the active ViewModel to the OSD window. PlaybackDataModelHost.Current.AppPropertyChanged += OnAppPropertyChanged; PlaybackDataModelHost.Current.DevicePropertyChanged += OnDevicePropertyChanged; } }
public void printEntity(string entityName) { OSDWindow window = new OSDWindow(entityName); windows.Add(entityName, window); }
public void printEntity(string entityName) { OSDWindow window = new OSDWindow (entityName); windows.Add (entityName, window); }