Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 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!");
     }
 }