コード例 #1
0
        public void Capture()
        {
            this.m_current_cap_metadata = new CaptureMetaData();


            using (var bmp = capture_bitmap())
            {
                if (bmp != null)
                {
                    this.m_current_cap_metadata.Command        = this.m_settings.Command;
                    this.m_current_cap_metadata.BitmapCaptured = true;
                    this.m_current_cap_metadata.Index          = NumCaptured;
                    this.m_current_cap_metadata.TimeCaptured   = System.DateTimeOffset.Now;
                    NumCaptured++;

                    //
                    this.m_lastcapregion        = new LastCapRegion();
                    this.m_lastcapregion.Screen = this.m_current_cap_metadata.SourceScreen;
                    this.m_lastcapregion.Region = this.m_current_cap_metadata.SourceRect;

                    // Save to disk
                    handle_disk_output(bmp);

                    // put to clipboard
                    handle_clipboard_output(bmp);
                }
            }
        }
コード例 #2
0
 public void Reset()
 {
     this.NumCaptured            = 0;
     this.m_current_cap_metadata = null;
 }