private void Window_Loaded(object sender, RoutedEventArgs e) { if (_hideBackButton) { BackButton.Visibility = Visibility.Collapsed; } SystemEvents.PowerModeChanged += System_PowerModeChanged; #region DPI var source = PresentationSource.FromVisual(Application.Current.MainWindow); if (source?.CompositionTarget != null) { _scale = source.CompositionTarget.TransformToDevice.M11; } #endregion #region Window Offset //Gets the window chrome offset _offsetX = (int)Math.Round((ActualWidth - ((Grid)Content).ActualWidth) / 2); _offsetY = (int)Math.Round((ActualHeight - ((Grid)Content).ActualHeight) - _offsetX); #endregion _loadDel = LoadVideoDevices; _loadDel.BeginInvoke(LoadCallBack, null); }
private void Window_Loaded(object sender, RoutedEventArgs e) { //TODO: What if users changes the screen? (That uses a different dpi) #region DPI var source = PresentationSource.FromVisual(Application.Current.MainWindow); if (source != null) { if (source.CompositionTarget != null) { _dpi = source.CompositionTarget.TransformToDevice.M11; } } #endregion #region Window Offset //Gets the window chrome offset _offsetX = (int)Math.Round((ActualWidth - ((Grid)Content).ActualWidth) / 2); _offsetY = (int)Math.Round((ActualHeight - ((Grid)Content).ActualHeight) - _offsetX); #endregion _loadDel = LoadVideoDevices; _loadDel.BeginInvoke(LoadCallBack, null); }
private void Window_Loaded(object sender, RoutedEventArgs e) { SystemEvents.PowerModeChanged += System_PowerModeChanged; Arguments.ClearAutomationArgs(); #region DPI var source = PresentationSource.FromVisual(this); if (source?.CompositionTarget != null) { _scale = source.CompositionTarget.TransformToDevice.M11; } #endregion #region Window Offset //Gets the window chrome offset _offsetX = (int)Math.Round((ActualWidth - ((Grid)Content).ActualWidth) / 2); _offsetY = (int)Math.Round((ActualHeight - ((Grid)Content).ActualHeight) - _offsetX); #endregion _loadDel = LoadVideoDevices; _loadDel.BeginInvoke(LoadCallBack, null); }
private void CheckVideoDevices_Executed(object sender, ExecutedRoutedEventArgs e) { RecordPauseButton.IsEnabled = false; VideoDevicesComboBox.ItemsSource = null; //Check again for video devices. _loadDel = LoadVideoDevices; _loadDel.BeginInvoke(LoadCallBack, null); }
private void Window_Loaded(object sender, RoutedEventArgs e) { _loadDel = LoadVideoDevices; _loadDel.BeginInvoke(LoadCallBack, null); }
private void CheckVideoDevices_Executed(object sender, ExecutedRoutedEventArgs e) { RecordPauseButton.IsEnabled = false; StopButton.IsEnabled = false; VideoDevicesComboBox.Items.Clear(); //Check again for video devices. _loadDel = LoadVideoDevices; _loadDel.BeginInvoke(LoadCallBack, null); }
private void Window_Loaded(object sender, RoutedEventArgs e) { //TODO: What if users changes the screen? (That uses a different dpi) #region DPI var source = PresentationSource.FromVisual(Application.Current.MainWindow); if (source != null) if (source.CompositionTarget != null) _dpi = source.CompositionTarget.TransformToDevice.M11; #endregion #region Window Offset //Gets the window chrome offset _offsetX = (int)Math.Round((ActualWidth - ((Grid)Content).ActualWidth) / 2); _offsetY = (int)Math.Round((ActualHeight - ((Grid)Content).ActualHeight) - _offsetX); #endregion _loadDel = LoadVideoDevices; _loadDel.BeginInvoke(LoadCallBack, null); }