Exemple #1
0
        private void opacitySlider_DragCompleted(object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e)
        {
            opacity = (float)opacitySlider.Value;
            MosaicEngine engine = new MosaicEngine(mosaicDirectory, baseImage);

            engine.ChangeOpacityOfMosaicFromFiles(opacity);
            finalMosaic.Source = ImageLoader("final mosaic.png");
            dragStarted        = false;
        }
Exemple #2
0
 private void opacitySlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
 {
     if (!dragStarted)
     {
         opacity = (float)opacitySlider.Value;
         MosaicEngine engine = new MosaicEngine(mosaicDirectory, baseImage);
         engine.ChangeOpacityOfMosaicFromFiles(opacity);
         finalMosaic.Source = ImageLoader("final mosaic.png");
     }
 }
Exemple #3
0
 private void bw_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         while (!bw.CancellationPending)
         {
             MosaicEngine engine = new MosaicEngine(mosaicDirectory, baseImage);
             engine.CreateMosaicWithBaseImageOverlay(opacity, bw);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Please enter a valid path.");
         bw.CancelAsync();
     }
 }