Пример #1
0
 public void Start_Slideshow(object obj, RoutedEventArgs e)
 {
     if (images.Count > 0)
     {
         System.Windows.Controls.Button item = e.Source as System.Windows.Controls.Button;
         ImageSlideshow.Window1         w1   = new ImageSlideshow.Window1(images, (int)item.Tag, Typy);
         w1.ShowDialog();
     }
     else
     {
         System.Windows.MessageBox.Show("The selected folder does not contain any image to start slideshow!", "An error occured", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
Пример #2
0
 public void Effect_Click(object obj, RoutedEventArgs e)
 {
     if (images.Count > 0)
     {
         System.Windows.Controls.MenuItem item = e.OriginalSource as System.Windows.Controls.MenuItem;
         string nazwa = item.Header as string;
         int    i     = 0;
         foreach (var a in Combo_Item)
         {
             if (a == nazwa)
             {
                 break;
             }
             i++;
         }
         ImageSlideshow.Window1 w1 = new ImageSlideshow.Window1(images, i, Typy);
         w1.ShowDialog();
     }
     else
     {
         System.Windows.MessageBox.Show("The selected folder does not contain any image to start slideshow!", "An error occured", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }