예제 #1
0
        public RecordingArea(Window mainWindow, ScreenCaptureUtilities screenCaptureUtils)
        {
            InitializeComponent();

            this.mainWindow         = mainWindow;
            this.screenCaptureUtils = screenCaptureUtils;

            windowEventInitialized = false;
            lockedCollider         = "";
            setNonRecording();
            updateScreenCaptureUtils();
        }
예제 #2
0
        public ScreenRecorder(ScreenCaptureUtilities screenCaptureUtils)
        {
            this.screenCaptureUtils = screenCaptureUtils;
            stopwatch = new Stopwatch();

            oldTime          = 0;
            timeDelta        = 0;
            frameTime        = 20;
            averageFramerate = 0;
            framerateBuffer  = 0;
            framerateBufferInitialization = true;
            videoWriterFlag = true;

            recordingThread = new Thread(recordThread);
            recordingThread.IsBackground = true;
            recordingThread.Start();
        }
예제 #3
0
        public MainWindow(Application currentApplication)
        {
            this.currentApplication = currentApplication;
            InitializeComponent();

            //initialize global recording properties
            MainWindow.recording = false;
            MainWindow.currentRecordingFramerate = 0;

            //initialize local recording and misc properties
            currentFrameRateLabel.Content = "";
            currentTargetFramerate        = 50;
            galleryShowFlag = false;

            //buffer recording button images
            recordActiveButtonImage          = new System.Windows.Controls.Image();
            recordActiveButtonImage.Source   = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/Resources/omc_record_inactive.png"));
            recordInActiveButtonImage.Width  = 63;
            recordInActiveButtonImage.Height = 15;

            //initialize recording area and docking position
            recordingAreaOffset       = new System.Windows.Point(5, 0);
            leftDock                  = false;
            leftLockButton.IsEnabled  = true;
            rightLockButton.IsEnabled = false;

            //initialize the recorder
            screenCaptureUtils = new CopyScreenCapture();
            recordingArea      = new RecordingArea(this, screenCaptureUtils);
            screenRecorder     = new ScreenRecorder(screenCaptureUtils);

            //initialize recording gallery
            recordingGallery = new RecordingGallery();

            //initialize thread to update the current framerate
            updateCurrentFramerateThread = new Thread(updateCurrentFramerate);
            updateCurrentFramerateThread.Start();

            defaultFrameRateLabels();
        }