private void RecordPause()
{
Extras.CreateTemp(_pathTemp);
switch (Stage)
{
case Stage.Stopped:
#region To Record
_capture = new Timer {Interval = 1000/(int) FpsNumericUpDown.Value};
_snapDelay = null;
ListFrames = new List<FrameInfo>();
HeightTextBox.IsEnabled = false;
WidthTextBox.IsEnabled = false;
FpsNumericUpDown.IsEnabled = false;
IsRecording(true);
Topmost = true;
FrameRate.Start(_capture.Interval);
#region Start
if (!Settings.Default.Snapshot)
{
#region Normal Recording
_capture.Tick += Normal_Elapsed;
//Normal_Elapsed(null, null);
_capture.Start();
Stage = Stage.Recording;
AutoFitButtons();
#endregion
}
else
{
#region SnapShot Recording
Stage = Stage.Snapping;
Title = "Board Recorder - " + Properties.Resources.Con_SnapshotMode;
AutoFitButtons();
#endregion
}
break;
#endregion
#endregion
case Stage.Recording:
#region To Pause
Stage = Stage.Paused;
Title = FindResource("Recorder.Paused").ToString();
AutoFitButtons();
_capture.Stop();
FrameRate.Stop();
break;
#endregion
case Stage.Paused:
#region To Record Again
Stage = Stage.Recording;
Title = "Board Recorder";
AutoFitButtons();
FrameRate.Start(_capture.Interval);
_capture.Start();
break;
#endregion
case Stage.Snapping:
#region Take Screenshot (All possibles types)
_snapDelay = Settings.Default.SnapshotDefaultDelay;
Normal_Elapsed(null, null);
break;
#endregion
}
}