Esempio n. 1
0
        private void StopRecording()
        {
            if (!IsRecording)
                throw new InvalidOperationException("Not recording.");

            recorder.Dispose();
            recorder = null;

            recordingTimer.Change(0, 0);

            IsRecording = false;
            HasLastScreencast = true;

            WindowState = WindowState.Normal;
        }
Esempio n. 2
0
        private void StartRecording()
        {
            if (IsRecording)
                throw new InvalidOperationException("Already recording.");

            if (minimizeOnStart)
                WindowState = WindowState.Minimized;

            Elapsed = "00:00";
            HasLastScreencast = false;
            IsRecording = true;

            recordingStartTime = DateTime.Now;
            recordingTimer.Change(1000, 1000);

            lastFileName = System.IO.Path.Combine(outputFolder, DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".avi");
            var bitRate = Mp3AudioEncoderLame.SupportedBitRates.OrderBy(br => br).ElementAt(audioQuality);
            recorder = new Recorder(lastFileName,
                encoder, encodingQuality,
                audioSourceIndex, audioWaveFormat, encodeAudio, bitRate);
        }