private void RunClick(object sender, RoutedEventArgs e) { var dia = new ScreenSelection(); if (dia.ShowDialog() == true) { if (vm.PowerPointVersion != null) { Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Office\" + vm.PowerPointVersion + @"\PowerPoint\Options", "DisplayMonitor", vm.ScoreBoardScreen); } sb = new ScoreBoard(); sb.Show(); WindowExt.MaximizeToSpecificMonitor(sb, vm.ScoreBoardScreen); } }
private void WebPlayClick(object sender, RoutedEventArgs e) { try { if (vm.CurrentQuestion.Link != "") { wb = new WebBrowser(); wb.Navigate(vm.CurrentQuestion.Link); wb.Show(); WindowExt.MaximizeToSpecificMonitor(wb, vm.ScoreBoardScreen); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ImageShowClick(object sender, RoutedEventArgs e) { if (File.Exists(vm.CurrentQuestion.ImagePath)) { var uri = new Uri("file://" + vm.CurrentQuestion.ImagePath); try { var bitmap = new BitmapImage(uri); iv.Image.Source = bitmap; iv.Show(); WindowExt.MaximizeToSpecificMonitor(iv, vm.ScoreBoardScreen); } catch { MessageBox.Show("Kein gültiges Bild Format!"); } } else if (!string.IsNullOrWhiteSpace(vm.CurrentQuestion.ImagePath)) { MessageBox.Show("Datei existiert nicht!"); } }