资源简介
用aforge开发的桌面录屏软件
代码片段和文件信息
namespace MiniScreenRecorder
{
using System;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using AForge.Video;
using AForge.Video.FFMPEG;
///
/// MiniScreenRecorder is recording the screen in video file.
///
public partial class MiniScreenRecorder : Form
{
#region Fields
private const int DEFAULT_frame_RATE = 10;
private int screenWidth;
private int screenHight;
private int bitRate;
private int frameRate;
private bool isRecording;
private int framesCount;
private string fileName;
private Stopwatch stopWatch;
private Rectangle screenArea;
private VideoFileWriter videoWriter;
private ScreenCaptureStream videoStreamer;
private FolderBrowserDialog folderBrowser;
private VideoCodec videoCodec;
#endregion
public MiniScreenRecorder()
{
InitializeComponent();
this.screenWidth = SystemInformation.VirtualScreen.Width;
this.screenHight = SystemInformation.VirtualScreen.Height;
this.frameRate = DEFAULT_frame_RATE;
this.isRecording = false;
this.framesCount = default(int);
this.stopWatch = new Stopwatch();
this.screenArea = Rectangle.Empty;
this.videoWriter = new VideoFileWriter();
this.folderBrowser = new FolderBrowserDialog();
InitializeDropDownMenus();
}
//SaveFileDialog sd = new SaveFileDialog();
private void startButton_Click(object sender EventArgs e)
{
FileSave();
}
private void stopButton_Click(object sender EventArgs e)
{
this.isRecording = false;
stopWatch.Reset();
videoStreamer.Stop();
videoWriter.Close();
//sd.FileName = null;
}
//private void selectFolderButton_Click(object sender EventArgs e)
//{
// if (this.folderBrowser.ShowDialog() == DialogResult.OK)
// {
// this.pathTextBox.Text = this.folderBrowser.SelectedPath;
// }
//}
private void MiniScreenRecorder_FormClosing(object sender FormClosingEventArgs e)
{
if (isRecording)
{
if (MessageBox.Show(“Do you want to exit? Video will be saved!“ “Mini Screen Recorder“
MessageBoxButtons.YesNo) == DialogResult.Yes)
{
stopWatch.Reset();
videoStreamer.Stop();
videoWriter.Close();
e.Cancel = false;
}
else
{
e.Cancel = true;
}
}
}
private
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-09-08 15:23 Mini-Screen-Recorder-master\
文件 3742 2016-02-02 01:59 Mini-Screen-Recorder-master\.gitignore
目录 0 2016-09-08 15:23 Mini-Screen-Recorder-master\.vs\
目录 0 2016-09-08 15:23 Mini-Screen-Recorder-master\.vs\MiniScreenRecorder\
目录 0 2016-09-08 15:23 Mini-Screen-Recorder-master\.vs\MiniScreenRecorder\v14\
文件 91136 2016-09-08 15:23 Mini-Screen-Recorder-master\.vs\MiniScreenRecorder\v14\.suo
目录 0 2016-09-08 15:23 Mini-Screen-Recorder-master\MiniScreenRecorder\
文件 225 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\App.config
目录 0 2016-09-08 15:23 Mini-Screen-Recorder-master\MiniScreenRecorder\Icons\
文件 844 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\Icons\folder.png
文件 432254 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\Icons\recorder.ico
文件 5459 2016-09-07 09:59 Mini-Screen-Recorder-master\MiniScreenRecorder\MainForm.Designer.cs
文件 7442 2016-09-08 15:10 Mini-Screen-Recorder-master\MiniScreenRecorder\MainForm.cs
文件 654503 2016-09-07 09:59 Mini-Screen-Recorder-master\MiniScreenRecorder\MainForm.resx
文件 464 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\MiniScreenRecorder.cs
文件 5052 2016-09-08 09:41 Mini-Screen-Recorder-master\MiniScreenRecorder\MiniScreenRecorder.csproj
目录 0 2016-09-08 15:23 Mini-Screen-Recorder-master\MiniScreenRecorder\Properties\
文件 1412 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\Properties\AssemblyInfo.cs
文件 2795 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\Properties\Resources.Designer.cs
文件 5496 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\Properties\Resources.resx
文件 1075 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\Properties\Settings.Designer.cs
文件 242 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\Properties\Settings.settings
目录 0 2016-09-08 15:23 Mini-Screen-Recorder-master\MiniScreenRecorder\bin\
目录 0 2016-09-08 15:23 Mini-Screen-Recorder-master\MiniScreenRecorder\bin\Debug\
文件 61952 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\bin\Debug\AForge.Video.FFMPEG.dll
文件 235983 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\bin\Debug\AForge.Video.FFMPEG.xm
文件 20992 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\bin\Debug\AForge.Video.dll
文件 52085 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\bin\Debug\AForge.Video.xm
文件 17920 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\bin\Debug\AForge.dll
文件 76580 2016-02-02 01:59 Mini-Screen-Recorder-master\MiniScreenRecorder\bin\Debug\AForge.xm
文件 445440 2016-09-08 15:10 Mini-Screen-Recorder-master\MiniScreenRecorder\bin\Debug\MiniScreenRecorder.exe
............此处省略31个文件信息
- 上一篇:问卷调查系统c#
- 下一篇:wpf3D滑动切换图片
评论
共有 条评论