public FullWindowViewModel(DeviceCollectionViewModel mainViewModel) { Dialog = new ModalDialogViewModel(); _mainViewModel = mainViewModel; _mainViewModel.AppPopup += OnAppPopup; _mainViewModel.OnFullWindowOpened(); }
public FullWindowViewModel(DeviceCollectionViewModel mainViewModel) { Dialog = new ModalDialogViewModel(); _mainViewModel = mainViewModel; _mainViewModel.OnFullWindowOpened(); _mainViewModel.AllDevices.CollectionChanged += OnDevicesChanged; DisplaySettingsChanged = new RelayCommand(() => Dialog.IsVisible = false); }
public FlyoutViewModel(DeviceCollectionViewModel mainViewModel) { Dialog = new ModalDialogViewModel(); Devices = new ObservableCollection <DeviceViewModel>(); _mainViewModel = mainViewModel; _mainViewModel.DefaultChanged += OnDefaultPlaybackDeviceChanged; _mainViewModel.AllDevices.CollectionChanged += AllDevices_CollectionChanged; AllDevices_CollectionChanged(null, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); _hideTimer.Tick += HideTimer_Tick; }
public FlyoutViewModel(DeviceCollectionViewModel mainViewModel) { Dialog = new ModalDialogViewModel(); Devices = new ObservableCollection <DeviceViewModel>(); _mainViewModel = mainViewModel; _mainViewModel.DefaultChanged += OnDefaultPlaybackDeviceChanged; _mainViewModel.AllDevices.CollectionChanged += AllDevices_CollectionChanged; _mainViewModel.AppPopup += OnAppPopup; AllDevices_CollectionChanged(null, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); _hideTimer.Tick += HideTimer_Tick; ExpandCollapse = new RelayCommand(() => BeginClose(FlyoutViewModel.CloseReason.CloseThenOpen)); }
public FlyoutViewModel(DeviceCollectionViewModel mainViewModel, Action returnFocusToTray) { Dialog = new ModalDialogViewModel(); Devices = new ObservableCollection <DeviceViewModel>(); _returnFocusToTray = returnFocusToTray; _mainViewModel = mainViewModel; _mainViewModel.DefaultChanged += OnDefaultPlaybackDeviceChanged; _mainViewModel.AllDevices.CollectionChanged += AllDevices_CollectionChanged; AllDevices_CollectionChanged(null, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); _hideTimer.Tick += HideTimer_Tick; ExpandCollapse = new RelayCommand(() => { IsExpandingOrCollapsing = true; BeginClose(LastInput); }); }
public FlyoutViewModel(DeviceCollectionViewModel mainViewModel, Action returnFocusToTray) { Dialog = new ModalDialogViewModel(); Devices = new ObservableCollection <DeviceViewModel>(); _returnFocusToTray = returnFocusToTray; _mainViewModel = mainViewModel; _mainViewModel.DefaultChanged += OnDefaultPlaybackDeviceChanged; _mainViewModel.AllDevices.CollectionChanged += AllDevices_CollectionChanged; AllDevices_CollectionChanged(null, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); // This timer is used to enable clicking on the tray icon while the flyout is open, and not causing a // rapid hide and show cycle. This time represents the minimum time between which the flyout may be opened. _deBounceTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(300) }; _deBounceTimer.Tick += OnDeBounceTimerTick; ExpandCollapse = new RelayCommand(() => { IsExpandingOrCollapsing = true; BeginClose(LastInput); }); DisplaySettingsChanged = new RelayCommand(() => BeginClose(InputType.Command)); }