Пример #1
0
        private void imageClick(object sender, RoutedEventArgs e)
        {
            Button btn = (Button)sender;

            btn.BorderBrush = new SolidColorBrush(Colors.LightGreen);
            int index = int.Parse(btn.Tag.ToString());

            imgCapture.Source = imageHistory[index];

            Utility_Classes.SourcetoImage srcImage = new Utility_Classes.SourcetoImage();
            CapturedImage = srcImage.Convert_NoRotate((BitmapSource)imgCapture.Source);
        }
Пример #2
0
        public void btnSnap_Click(object sender, RoutedEventArgs e)
        {
            if (imgStream.Source == null)
            {
                MessageBox.Show("Unable to take snapshot when no video stream is active.");
            }
            else if (imgStream.Source != null)
            {
                Utility_Classes.SourcetoImage srcImage = new Utility_Classes.SourcetoImage();
                CapturedImage = srcImage.Convert((BitmapSource)imgStream.Source);

                imgCapture.Source = CapturedImage;
                statusList.Insert(0, DateTime.Now.ToString("hh:mm:ss") + " - Snapshot Taken.");

                imageHistory.Add((BitmapImage)imgCapture.Source);

                updateImageHistory();
            }
        }