Exemplo n.º 1
0
        public ScreenshotMetaWindow(Bitmap screenshot)
        {
            InitializeComponent();

            db = new LoggyDB("loggy.db");

            BmpScreenshot = screenshot;

            // Taken from
            // http://stackoverflow.com/a/1069509
            using (MemoryStream memory = new MemoryStream())
            {
                BmpScreenshot.Save(memory, System.Drawing.Imaging.ImageFormat.Bmp);
                memory.Position = 0;
                BitmapImage bitmapImage = new BitmapImage();
                bitmapImage.BeginInit();
                bitmapImage.StreamSource = memory;
                bitmapImage.CacheOption = BitmapCacheOption.OnLoad;
                bitmapImage.EndInit();

                imgScreenshot.Source = bitmapImage;
            }
        }
Exemplo n.º 2
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     db = new LoggyDB("loggy.db");
     loadScreenshots(calDropdown.SelectedDate);
 }