├── .gitignore
├── .tfignore
├── .travis.yml
├── Images
└── OpenRecorder.png
├── LICENSE.txt
├── README.md
├── ScreenRecorder.sln
├── ScreenRecorder
├── About
│ ├── AboutBox.Designer.cs
│ ├── AboutBox.cs
│ ├── AboutBox.resx
│ └── FfMpeg.txt
├── App.config
├── Codecs
│ ├── Avi
│ │ ├── Avi.cs
│ │ └── AviManager.cs
│ ├── Gif
│ │ ├── AnimatedGifEncoder.cs
│ │ ├── GifDecoder.cs
│ │ ├── GifFormat.txt
│ │ ├── LZWEncoder.cs
│ │ └── NeuQuant.cs
│ └── ffmpeg
│ │ ├── GNULicense.txt
│ │ ├── avcodec-55.dll
│ │ ├── avdevice-55.dll
│ │ ├── avfilter-4.dll
│ │ ├── avformat-55.dll
│ │ ├── avutil-52.dll
│ │ ├── ffmpeg.exe
│ │ ├── ffplay.exe
│ │ ├── ffprobe.exe
│ │ ├── postproc-52.dll
│ │ ├── swresample-0.dll
│ │ └── swscale-2.dll
├── ContentPages
│ ├── AppSettings.Designer.cs
│ ├── AppSettings.cs
│ ├── AppSettings.resx
│ ├── IContentPage.cs
│ ├── InformationCP.Designer.cs
│ ├── InformationCP.cs
│ ├── InformationCP.resx
│ ├── Settings.Designer.cs
│ ├── Settings.cs
│ └── Settings.resx
├── Extern
│ └── log4net.dll
├── Hooks
│ ├── GlobalKeyboardHook.cs
│ ├── HookData.cs
│ ├── HookParser.cs
│ └── ffmpeg.hook
├── MessageBox.Designer.cs
├── MessageBox.cs
├── MessageBox.resx
├── NotificationForm.Designer.cs
├── NotificationForm.cs
├── NotificationForm.resx
├── Program.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.es.Designer.cs
│ ├── Resources.es.resx
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Resources
│ ├── AVRecorder.ico
│ ├── AVRecorder.png
│ ├── Bug.png
│ ├── Bug_256.png
│ ├── Bug_32.png
│ ├── Close.png
│ ├── Comment.png
│ ├── EditPencil.png
│ ├── Email.png
│ ├── FfMpegLogo.png
│ ├── Help.png
│ ├── Information.png
│ ├── LeftSide.png
│ ├── Like.png
│ ├── MaximizeMinus.png
│ ├── MaximizePlus.png
│ ├── Minimize.png
│ ├── Pause.png
│ ├── Record.png
│ ├── Reset.png
│ ├── RightSide.png
│ ├── Search.png
│ ├── Settings.png
│ ├── Settings_Edit.png
│ ├── Stop.png
│ ├── Warning.png
│ └── Warning_32x.png
├── ScreenRecorder.Designer.cs
├── ScreenRecorder.cs
├── ScreenRecorder.csproj
├── ScreenRecorder.resx
├── VariablesParser.cs
└── Win32Api.cs
├── UML Modelling
├── ComponentView.uxf
├── DeploymentView.uxf
└── UseCases.uxf
└── WPF
├── CAM.Bootscreen
├── BootSplasher.cs
├── Bootscreen.xaml
├── Bootscreen.xaml.cs
├── BootscreenModule.cs
├── BootscreenViewModel.cs
├── CAM.Bootscreen.csproj
└── Properties
│ └── AssemblyInfo.cs
├── CAM.Common
├── AppExitEvent.cs
├── CAM.Common.csproj
├── ColorPalatte.cs
├── EncoderInfo.cs
├── Properties
│ └── AssemblyInfo.cs
├── RelayCommand.cs
├── Resources
│ ├── Bug.png
│ ├── Comment.png
│ ├── EditPencil.png
│ ├── Email.png
│ ├── FfMpegLogo.png
│ ├── Help.png
│ ├── Information.png
│ ├── LeftSide.png
│ ├── Like.png
│ ├── MaximizeMinus.png
│ ├── MaximizePlus.png
│ ├── Minimize.png
│ ├── RightSide.png
│ ├── Search.png
│ ├── Settings_Edit.png
│ └── Warning.png
├── ViewModelBase.cs
└── packages.config
├── CAM.Configuration
├── CAM.Configuration.csproj
├── Configuration.cs
├── ConfigurationModule.cs
├── Hook
│ ├── HookConfigurationSection.csd
│ ├── HookConfigurationSection.csd.config
│ ├── HookConfigurationSection.csd.cs
│ ├── HookConfigurationSection.csd.diagram
│ └── HookConfigurationSection.csd.xsd
├── Hooks.config
├── IConfiguration.cs
├── Properties
│ └── AssemblyInfo.cs
├── VariablesParser.cs
├── VideoSettings.cs
└── packages.config
├── CAM.Setup
├── CAM.Setup.isl
└── CAM.Setup.isproj
├── CAM.Starter
├── App.config
├── App.xaml
├── App.xaml.cs
├── Bootstrapper.cs
├── CAM.Starter.csproj
├── Extern
│ └── procdump.exe
├── Logger
│ └── Log4NetLogger.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Resources
│ ├── AVRecorder.ico
│ └── AVRecorder.png
├── ViewModel
│ └── UIContainerViewModel.cs
├── Views
│ ├── ExceptionViewer.xaml.cs
│ ├── UIContainerView.xaml
│ └── UIContainerView.xaml.cs
└── packages.config
├── CAM.Tools
├── BasicToolsModule.cs
├── CAM.Tools.csproj
├── Helper
│ ├── VisualTargetPresentationSource.cs
│ ├── VisualThreadedHelper.cs
│ └── VisualWrapper.cs
├── Model
│ └── ToolsModel.cs
├── Properties
│ └── AssemblyInfo.cs
├── Resources
│ ├── Close.png
│ ├── Pause.png
│ ├── Pin.png
│ ├── Record.png
│ ├── Reset.png
│ ├── Settings.png
│ └── Stop.png
├── ViewModel
│ └── ToolsViewModel.cs
├── Views
│ ├── SettingsView.xaml
│ ├── SettingsView.xaml.cs
│ ├── ToolsView.xaml
│ ├── ToolsView.xaml.cs
│ ├── TransparentView.xaml
│ └── TransparentView.xaml.cs
├── Win32
│ ├── Gdi32.cs
│ └── User32.cs
└── packages.config
├── CAM.VideoCodec.FFMPEG
├── CAM.VideoCodec.FFMPEG.csproj
├── Extern
│ ├── GNULicense.txt
│ ├── avcodec-55.dll
│ ├── avdevice-55.dll
│ ├── avfilter-4.dll
│ ├── avformat-55.dll
│ ├── avutil-52.dll
│ ├── ffmpeg.exe
│ ├── ffplay.exe
│ ├── ffprobe.exe
│ ├── postproc-52.dll
│ ├── swresample-0.dll
│ └── swscale-2.dll
├── FFMpegEncoder.cs
├── FFMpegModule.cs
├── Properties
│ └── AssemblyInfo.cs
└── packages.config
└── CAM.VideoCodec.Interfaces
├── CAM.VideoCodec.Interfaces.csproj
├── IFFMpegEncoder.cs
└── Properties
└── AssemblyInfo.cs
/.gitignore:
--------------------------------------------------------------------------------
1 | Thumbs.db
2 | *.obj
3 | ScreenRecorder.exe
4 | *.pdb
5 | *.user
6 | *.aps
7 | *.pch
8 | *.vspscc
9 | *_i.c
10 | *_p.c
11 | *.ncb
12 | *.suo
13 | *.sln.docstates
14 | *.tlb
15 | *.tlh
16 | *.bak
17 | *.cache
18 | *.ilk
19 | *.log
20 | [Bb]in
21 | [Dd]ebug*/
22 | *.lib
23 | *.sbr
24 | obj/
25 | [Rr]elease*/
26 | _ReSharper*/
27 | [Tt]est[Rr]esult*
28 | *.vssscc
29 | $tf*/
--------------------------------------------------------------------------------
/.tfignore:
--------------------------------------------------------------------------------
1 | \.git
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: csharp
2 |
3 | solution: ScreenRecorder.sln
4 |
5 | script:
6 | - xbuild /p:Configuration=Debug /p:Platform=x64 ScreenRecorder.sln
7 |
--------------------------------------------------------------------------------
/Images/OpenRecorder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/Images/OpenRecorder.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ScreenRecorder
2 | ==============
3 |
4 | Screen capture in C#
5 |
6 | 
7 |
--------------------------------------------------------------------------------
/ScreenRecorder/About/AboutBox.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 | using System.IO;
18 | using System.Reflection;
19 | using System.Windows.Forms;
20 |
21 | namespace ScreenRecorder.ContentPages
22 | {
23 | partial class AboutBox : Form
24 | {
25 | public AboutBox()
26 | {
27 | InitializeComponent();
28 | Text = String.Format("About {0}", AssemblyTitle);
29 | labelProductName.Text = AssemblyProduct;
30 | labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
31 | labelCopyright.Text = AssemblyCopyright;
32 | labelCompanyName.Text = AssemblyCompany;
33 | textBoxDescription.Text = AssemblyDescription;
34 | }
35 |
36 | #region Assembly Attribute Accessors
37 |
38 | public string AssemblyTitle
39 | {
40 | get
41 | {
42 | var attributes =
43 | Assembly.GetExecutingAssembly().GetCustomAttributes(typeof (AssemblyTitleAttribute), false);
44 | if (attributes.Length > 0)
45 | {
46 | var titleAttribute = (AssemblyTitleAttribute) attributes[0];
47 | if (titleAttribute.Title != "")
48 | {
49 | return titleAttribute.Title;
50 | }
51 | }
52 | return Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
53 | }
54 | }
55 |
56 | public string AssemblyVersion
57 | {
58 | get { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); }
59 | }
60 |
61 | public string AssemblyDescription
62 | {
63 | get
64 | {
65 | var attributes =
66 | Assembly.GetExecutingAssembly().GetCustomAttributes(typeof (AssemblyDescriptionAttribute), false);
67 | if (attributes.Length == 0)
68 | {
69 | return "";
70 | }
71 | return ((AssemblyDescriptionAttribute) attributes[0]).Description;
72 | }
73 | }
74 |
75 | public string AssemblyProduct
76 | {
77 | get
78 | {
79 | var attributes =
80 | Assembly.GetExecutingAssembly().GetCustomAttributes(typeof (AssemblyProductAttribute), false);
81 | if (attributes.Length == 0)
82 | {
83 | return "";
84 | }
85 | return ((AssemblyProductAttribute) attributes[0]).Product;
86 | }
87 | }
88 |
89 | public string AssemblyCopyright
90 | {
91 | get
92 | {
93 | var attributes =
94 | Assembly.GetExecutingAssembly().GetCustomAttributes(typeof (AssemblyCopyrightAttribute), false);
95 | if (attributes.Length == 0)
96 | {
97 | return "";
98 | }
99 | return ((AssemblyCopyrightAttribute) attributes[0]).Copyright;
100 | }
101 | }
102 |
103 | public string AssemblyCompany
104 | {
105 | get
106 | {
107 | var attributes =
108 | Assembly.GetExecutingAssembly().GetCustomAttributes(typeof (AssemblyCompanyAttribute), false);
109 | if (attributes.Length == 0)
110 | {
111 | return "";
112 | }
113 | return ((AssemblyCompanyAttribute) attributes[0]).Company;
114 | }
115 | }
116 |
117 | #endregion
118 |
119 | private void okButton_Click(object sender, EventArgs e)
120 | {
121 | Close();
122 | }
123 | }
124 | }
--------------------------------------------------------------------------------
/ScreenRecorder/About/FfMpeg.txt:
--------------------------------------------------------------------------------
1 | FFmpeg is a free software project that produces libraries and programs for handling multimedia data.
2 | FFmpeg includes libavcodec, an audio/video codec library used by several other projects, libavformat,
3 | an audio/video container mux and demux library, and the ffmpeg command line program for transcoding
4 | multimedia files.
5 |
6 |
7 | FFmpeg is published under the GNU Lesser General Public License 2.1+ or
8 | GNU General Public License 2+ (depending on which options are enabled).
9 |
10 |
11 | Legal status of codecs
12 | __________________________________________________________________________________________________
13 |
14 | FFmpeg contains more than 100 codecs, most of which do not just store uncompressed data. Most codecs
15 | that compress information could be claimed by patent holders. Such claims may be enforceable in
16 | countries like the United States which have implemented software patents, but are considered
17 | unenforceable or void in countries that have not implemented software patents. Furthermore,
18 | many of these codecs are only released under terms that forbid reverse engineering, even for
19 | purposes of interoperability. These terms of use are forbidden in certain countries.
20 |
21 | For example, some European Union nations have not implemented software patents and have laws expressly
22 | allowing reverse engineering for purposes of interoperability.
23 |
--------------------------------------------------------------------------------
/ScreenRecorder/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | 2
36 |
37 |
38 | 0.9
39 |
40 |
41 | D:\temp\samples_code\ScreenRecorder_v2.0\ScreenRecorder\bin\x64\Debug\Bitmaps
42 |
43 |
44 | en
45 |
46 |
47 |
48 |
49 |
50 | mp4
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/Avi/AviManager.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | namespace ScreenRecorder.Codecs
17 | {
18 | ///
19 | /// TODO: Update summary.
20 | ///
21 | public class AviManager
22 | {
23 | } // class AviManager
24 | } // namespace ScreenRecorder.Codecs.Avi
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/Gif/GifFormat.txt:
--------------------------------------------------------------------------------
1 | GIF format
2 | Byte Order: Little-endian
3 |
4 | GIF Header
5 | Offset Length Contents
6 | 0 3 bytes "GIF"
7 | 3 3 bytes "87a" or "89a"
8 | 6 2 bytes
9 | 8 2 bytes
10 | 10 1 byte bit 0: Global Color Table Flag (GCTF)
11 | bit 1..3: Color Resolution
12 | bit 4: Sort Flag to Global Color Table
13 | bit 5..7: Size of Global Color Table: 2^(1+n)
14 | 11 1 byte
15 | 12 1 byte
16 | 13 ? bytes
17 | ? bytes
18 | 1 bytes (0x3b)
19 |
20 |
21 | Image Block
22 | Offset Length Contents
23 | 0 1 byte Image Separator (0x2c)
24 | 1 2 bytes Image Left Position
25 | 3 2 bytes Image Top Position
26 | 5 2 bytes Image Width
27 | 7 2 bytes Image Height
28 | 8 1 byte bit 0: Local Color Table Flag (LCTF)
29 | bit 1: Interlace Flag
30 | bit 2: Sort Flag
31 | bit 2..3: Reserved
32 | bit 4..7: Size of Local Color Table: 2^(1+n)
33 | ? bytes Local Color Table(0..255 x 3 bytes) if LCTF is one
34 | 1 byte LZW Minimum Code Size
35 | [ // Blocks
36 | 1 byte Block Size (s)
37 | (s)bytes Image Data
38 | ]*
39 | 1 byte Block Terminator(0x00)
40 |
41 |
42 | Graphic Control Extension Block
43 | Offset Length Contents
44 | 0 1 byte Extension Introducer (0x21)
45 | 1 1 byte Graphic Control Label (0xf9)
46 | 2 1 byte Block Size (0x04)
47 | 3 1 byte bit 0..2: Reserved
48 | bit 3..5: Disposal Method
49 | bit 6: User Input Flag
50 | bit 7: Transparent Color Flag
51 | 4 2 bytes Delay Time (1/100ths of a second)
52 | 6 1 byte Transparent Color Index
53 | 7 1 byte Block Terminator(0x00)
54 |
55 |
56 | Comment Extension Block
57 | Offset Length Contents
58 | 0 1 byte Extension Introducer (0x21)
59 | 1 1 byte Comment Label (0xfe)
60 | [
61 | 1 byte Block Size (s)
62 | (s)bytes Comment Data
63 | ]*
64 | 1 byte Block Terminator(0x00)
65 |
66 |
67 | Plain Text Extension Block
68 | Offset Length Contents
69 | 0 1 byte Extension Introducer (0x21)
70 | 1 1 byte Plain Text Label (0x01)
71 | 2 1 byte Block Size (0x0c)
72 | 3 2 bytes Text Grid Left Position
73 | 5 2 bytes Text Grid Top Position
74 | 7 2 bytes Text Grid Width
75 | 9 2 bytes Text Grid Height
76 | 10 1 byte Character Cell Width(
77 | 11 1 byte Character Cell Height
78 | 12 1 byte Text Foreground Color Index(
79 | 13 1 byte Text Background Color Index(
80 | [
81 | 1 byte Block Size (s)
82 | (s)bytes Plain Text Data
83 | ]*
84 | 1 byte Block Terminator(0x00)
85 |
86 |
87 | Application Extension Block
88 | Offset Length Contents
89 | 0 1 byte Extension Introducer (0x21)
90 | 1 1 byte Application Label (0xff)
91 | 2 1 byte Block Size (0x0b)
92 | 3 8 bytes Application Identifire
93 | [
94 | 1 byte Block Size (s)
95 | (s)bytes Application Data
96 | ]*
97 | 1 byte Block Terminator(0x00)
98 |
99 |
100 | GIF87a:
101 |
102 | GIF Header
103 | Image Block
104 | Trailer
105 |
106 |
107 | GIF89a:
108 |
109 | GIF Header
110 | Graphic Control Extension
111 | Image Block
112 | Trailer
113 |
114 |
115 | GIF Animation
116 |
117 | GIF Header
118 | Application Extension
119 | [
120 | Graphic Control Extension
121 | Image Block
122 | ]*
123 | Trailer
124 |
125 |
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/ffmpeg/avcodec-55.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Codecs/ffmpeg/avcodec-55.dll
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/ffmpeg/avdevice-55.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Codecs/ffmpeg/avdevice-55.dll
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/ffmpeg/avfilter-4.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Codecs/ffmpeg/avfilter-4.dll
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/ffmpeg/avformat-55.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Codecs/ffmpeg/avformat-55.dll
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/ffmpeg/avutil-52.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Codecs/ffmpeg/avutil-52.dll
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/ffmpeg/ffmpeg.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Codecs/ffmpeg/ffmpeg.exe
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/ffmpeg/ffplay.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Codecs/ffmpeg/ffplay.exe
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/ffmpeg/ffprobe.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Codecs/ffmpeg/ffprobe.exe
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/ffmpeg/postproc-52.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Codecs/ffmpeg/postproc-52.dll
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/ffmpeg/swresample-0.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Codecs/ffmpeg/swresample-0.dll
--------------------------------------------------------------------------------
/ScreenRecorder/Codecs/ffmpeg/swscale-2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Codecs/ffmpeg/swscale-2.dll
--------------------------------------------------------------------------------
/ScreenRecorder/ContentPages/AppSettings.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | #region Using directives
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Windows.Forms;
21 | using ScreenRecorder.Hooks;
22 | using ScreenRecorder.Properties;
23 |
24 | #endregion
25 |
26 | namespace ScreenRecorder.ContentPages
27 | {
28 | ///
29 | /// App settings
30 | ///
31 | public partial class AppSettings : UserControl, IContentPage
32 | {
33 | ///
34 | /// Initializes a new instance of the AppSettings class.
35 | ///
36 | public AppSettings()
37 | {
38 | InitializeComponent();
39 | OpacityBar.Maximum = 10;
40 | OpacityBar.Minimum = 1;
41 | OpacityBar.Value = 9;
42 |
43 | ReadUserSettings();
44 | }
45 |
46 | ///
47 | /// Read config
48 | ///
49 | private void ReadUserSettings()
50 | {
51 | numericUpDown1.Value = Settings.Default.FramesPerSec;
52 | saveLocBox.Text = Settings.Default.BitmapTempLoc;
53 | langComboBox.SelectedItem = (string) Settings.Default.Language;
54 | voutLocBox.Text = Settings.Default.VideoLoc;
55 | videoTypeBox.Text = Settings.Default.VideoType;
56 |
57 | var parser = new HookParser();
58 | var data = parser.Parse();
59 |
60 | foreach (var item in data)
61 | {
62 | videoTypeBox.Items.Add(item.HookId);
63 | }
64 | }
65 |
66 | ///
67 | /// Opacity scroll
68 | ///
69 | /// Sender of the event
70 | /// Event arguments
71 | private void Opacity_Scroll(object sender, EventArgs e)
72 | {
73 | var v = OpacityBar.Value;
74 | }
75 |
76 | ///
77 | /// Save click
78 | ///
79 | /// Sender of the event
80 | /// Event arguments
81 | private void save_Click(object sender, EventArgs e)
82 | {
83 | Settings.Default.FramesPerSec = (int) numericUpDown1.Value;
84 | Settings.Default.BitmapTempLoc = saveLocBox.Text;
85 | Settings.Default.Language = langComboBox.SelectedItem as string;
86 | Settings.Default.VideoLoc = voutLocBox.Text;
87 | Settings.Default.VideoType = videoTypeBox.SelectedItem as string;
88 |
89 | //save all the user settings.
90 | Settings.Default.Save();
91 |
92 | //MessageBox.Show("Application must be restarted inorder to apply the changes", "Restart",
93 | // MessageBoxButtons.OKCancel, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1,
94 | // MessageBoxOptions.ServiceNotification);
95 | if (MessageBox.Show("Application must be restarted inorder to apply the changes", "Restart", "Cancel") ==
96 | YesNo.Yes)
97 | {
98 | Application.Restart();
99 | }
100 | //Settings.Default.Opacity = (decimal)OpacityBar.Value/10;
101 | }
102 |
103 | ///
104 | /// About us
105 | ///
106 | ///
107 | ///
108 | private void aboutusBtn_Click(object sender, EventArgs e)
109 | {
110 | var aboutUs = new AboutBox();
111 | aboutUs.ShowDialog();
112 | }
113 | } // class AppSettings
114 | } // namespace ScreenRecorder
--------------------------------------------------------------------------------
/ScreenRecorder/ContentPages/IContentPage.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | namespace ScreenRecorder.ContentPages
17 | {
18 | ///
19 | /// TODO: Update summary.
20 | ///
21 | public interface IContentPage
22 | {
23 | }
24 | } // namespace ScreenRecorder.ContentPages
--------------------------------------------------------------------------------
/ScreenRecorder/ContentPages/InformationCP.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 | using System.IO;
18 | using System.Windows.Forms;
19 |
20 | namespace ScreenRecorder.ContentPages
21 | {
22 | ///
23 | /// Information CP
24 | ///
25 | public partial class InformationCP : UserControl, IContentPage
26 | {
27 | ///
28 | /// Constructor CP
29 | ///
30 | public InformationCP()
31 | {
32 | InitializeComponent();
33 |
34 | //load the file contents
35 | aboutffmpegBox.LoadFile(
36 | Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "About\\FfMpeg.txt"),
37 | RichTextBoxStreamType.PlainText
38 | );
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/ScreenRecorder/ContentPages/Settings.cs:
--------------------------------------------------------------------------------
1 | #region File Header
2 | /*[ Compilation unit ----------------------------------------------------------
3 |
4 | Component : ScreenRecorderMP
5 |
6 | Name : Settings.cs
7 |
8 | Author : Sunil
9 |
10 | -----------------------------------------------------------------------------*/
11 | /*] END */
12 | #endregion
13 |
14 | #region Using directives
15 | using ScreenRecorder.ContentPages;
16 | using ScreenRecorder.Properties;
17 | using System;
18 | using System.Windows.Forms;
19 | using System.Collections.Generic;
20 | #endregion
21 |
22 | namespace ScreenRecorder
23 | {
24 | ///
25 | /// App settings
26 | ///
27 | public partial class AppSettings : UserControl, IContentPage
28 | {
29 | ///
30 | /// Initializes a new instance of the AppSettings class.
31 | ///
32 | public AppSettings()
33 | {
34 | InitializeComponent();
35 | OpacityBar.Maximum = 10;
36 | OpacityBar.Minimum = 1;
37 | OpacityBar.Value = 9;
38 | ReadUserSettings();
39 | }
40 |
41 | ///
42 | /// Read config
43 | ///
44 | private void ReadUserSettings()
45 | {
46 | numericUpDown1.Value = Settings.Default.FramesPerSec;
47 | saveLocBox.Text = Settings.Default.BitmapTempLoc;
48 | langComboBox.SelectedItem = (string)Settings.Default.Language;
49 | HookParser parser = new HookParser();
50 | List data = parser.Parse();
51 |
52 | foreach (HookData item in data)
53 | {
54 | videoTypeBox.Items.Add(item.HookID);
55 | }
56 | }
57 |
58 | ///
59 | /// Opacity scroll
60 | ///
61 | /// Sender of the event
62 | /// Event arguments
63 | private void Opacity_Scroll(object sender, EventArgs e)
64 | {
65 |
66 | }
67 |
68 | ///
69 | /// Save click
70 | ///
71 | /// Sender of the event
72 | /// Event arguments
73 | private void save_Click(object sender, EventArgs e)
74 | {
75 | Settings.Default.FramesPerSec = (int)numericUpDown1.Value;
76 | Settings.Default.BitmapTempLoc = saveLocBox.Text;
77 | Settings.Default.Language = langComboBox.SelectedItem as string;
78 | Settings.Default.VideoLoc = voutLocBox.Text;
79 | Settings.Default.VideoType = videoTypeBox.SelectedItem as string;
80 |
81 | //save all the user settings.
82 | Settings.Default.Save();
83 |
84 | //MessageBox.Show("Application must be restarted inorder to apply the changes", "Restart",
85 | // MessageBoxButtons.OKCancel, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1,
86 | // MessageBoxOptions.ServiceNotification);
87 | if (MessageBox.Show("Application must be restarted inorder to apply the changes", "Restart", "Cancel") == YesNo.Yes)
88 | {
89 | Application.Restart();
90 | }
91 | //Settings.Default.Opacity = (decimal)OpacityBar.Value/10;
92 | }
93 |
94 | ///
95 | /// About us
96 | ///
97 | ///
98 | ///
99 | private void aboutusBtn_Click(object sender, EventArgs e)
100 | {
101 | AboutBox aboutUs = new AboutBox();
102 | aboutUs.ShowDialog();
103 | }
104 | } // class AppSettings
105 | } // namespace ScreenRecorder
106 |
--------------------------------------------------------------------------------
/ScreenRecorder/Extern/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Extern/log4net.dll
--------------------------------------------------------------------------------
/ScreenRecorder/Hooks/GlobalKeyboardHook.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 | using System.Collections.Generic;
18 | using System.ComponentModel;
19 | using System.Runtime.InteropServices;
20 | using System.Windows.Forms;
21 | using log4net;
22 |
23 | namespace ScreenRecorder.Hooks
24 | {
25 | public class GlobalKeyboardHook
26 | {
27 | private static readonly ILog log = LogManager.GetLogger(typeof (GlobalKeyboardHook).Name);
28 |
29 | private static HookProc keyboardProcHook;
30 | public List HookedKeys = new List();
31 | private IntPtr keyboardHook = IntPtr.Zero;
32 |
33 | ///
34 | /// ctor
35 | ///
36 | public GlobalKeyboardHook()
37 | {
38 | Hook();
39 | }
40 |
41 | public event KeyEventHandler KeyDown;
42 | public event KeyEventHandler KeyUp;
43 |
44 | ///
45 | /// Keyboard hook proc
46 | ///
47 | ///
48 | ///
49 | ///
50 | ///
51 | private int KeyboardHookProc(int nCode, int wParam, keyboardHookStruct lParam)
52 | {
53 | if (nCode >= 0)
54 | {
55 | var key = (Keys) lParam.vkCode;
56 | if (HookedKeys.Contains(key))
57 | {
58 | var kArgs = new KeyEventArgs(key);
59 | if ((wParam == Win32Api.WM_KEYDOWN || wParam == Win32Api.WM_SYSKEYDOWN) && (KeyDown != null))
60 | {
61 | KeyDown(this, kArgs);
62 | }
63 | else if ((wParam == Win32Api.WM_KEYUP || wParam == Win32Api.WM_SYSKEYUP) && (KeyUp != null))
64 | {
65 | KeyUp(this, kArgs);
66 | }
67 | if (kArgs.Handled)
68 | return 1;
69 | }
70 | }
71 | return Win32Api.CallNextHookEx(keyboardHook, nCode, wParam, ref lParam);
72 | }
73 |
74 | ///
75 | /// subscribe for Keyboard hook
76 | ///
77 | public void Hook()
78 | {
79 | // Create an instance of HookProc.
80 | keyboardProcHook = new HookProc(KeyboardHookProc);
81 |
82 | var hInstance = Win32Api.LoadLibrary("User32");
83 |
84 | //install hook
85 | keyboardHook = Win32Api.SetWindowsHookEx(
86 | Win32Api.WH_KEYBOARD_LL,
87 | keyboardProcHook,
88 | hInstance,
89 | 0);
90 |
91 | //If SetWindowsHookEx fails.
92 | if (keyboardHook == IntPtr.Zero)
93 | {
94 | //Returns the error code returned by the last unmanaged function called using platform invoke that has the DllImportAttribute.SetLastError flag set.
95 | var errorCode = Marshal.GetLastWin32Error();
96 |
97 | log.Error("Unable to install keyboard hook.", new Win32Exception(errorCode));
98 | }
99 | }
100 |
101 | ///
102 | /// Unsubscribe for keyboard hook
103 | ///
104 | public void Unhook()
105 | {
106 | if (keyboardHook != IntPtr.Zero)
107 | {
108 | //uninstall hook
109 | var retKeyboard = Win32Api.UnhookWindowsHookEx(keyboardHook);
110 | //reset invalid handle
111 | keyboardHook = IntPtr.Zero;
112 | //if failed and exception must be thrown
113 | if (retKeyboard == 0)
114 | {
115 | //Returns the error code returned by the last unmanaged function called using platform invoke that has the DllImportAttribute.SetLastError flag set.
116 | var errorCode = Marshal.GetLastWin32Error();
117 | //Initializes and throws a new instance of the Win32Exception class with the specified error.
118 | log.Error("Error while uninstalling keyboard hook", new Win32Exception(errorCode));
119 | }
120 | }
121 | }
122 | }
123 | }
--------------------------------------------------------------------------------
/ScreenRecorder/Hooks/HookData.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | #region Using directives
17 |
18 | using System;
19 | using System.Diagnostics;
20 | using System.IO;
21 | using ScreenRecorder.Properties;
22 |
23 | #endregion
24 |
25 | namespace ScreenRecorder.Hooks
26 | {
27 | ///
28 | /// Hook Data
29 | ///
30 | public class HookData
31 | {
32 | ///
33 | /// Arguments
34 | ///
35 | public string Arguments;
36 |
37 | ///
38 | /// Executable
39 | ///
40 | public string Executable;
41 |
42 | ///
43 | /// Hook ID
44 | ///
45 | public string HookId;
46 |
47 | ///
48 | /// Mode
49 | ///
50 | public string Mode;
51 |
52 | ///
53 | /// Path
54 | ///
55 | public string WorkingDir;
56 |
57 | ///
58 | /// Execute
59 | ///
60 | public void Execute()
61 | {
62 | var avMaker = new Process(); //Audio-Video maker process
63 |
64 | avMaker.StartInfo.FileName = Path.Combine(WorkingDir, Executable);
65 |
66 | //TODO: ask If output.mp4 need to be overwritten?
67 |
68 | #if DEBUG
69 | avMaker.StartInfo.UseShellExecute = false;
70 | avMaker.StartInfo.CreateNoWindow = false;
71 | #else
72 | avMaker.StartInfo.UseShellExecute = false;
73 | avMaker.StartInfo.CreateNoWindow = true;
74 | #endif
75 |
76 | var outFile = GetOutputFile();
77 |
78 | //avMaker.StartInfo.Arguments = String.Format(@"-i bitmaps\{0} -vcodec huffyuv output.avi", pngLoc);
79 | //avMaker.StartInfo.Arguments = String.Format(@"-i bitmaps\{0} -r 20 output.mp4", pngLoc);
80 |
81 | avMaker.StartInfo.Arguments = VariablesParser.ExpandVariables(Arguments);
82 | // String.Format(@"-i {0} -r {2} -c:v libx264 -preset slow -crf 21 {1}", ifile, outFile, Settings.Default.FramesPerSec);
83 | // avMaker.StartInfo.Arguments = String.Format(@" -r 20 -i bitmaps\{0} -c:v libx264 -r 20 -pix_fmt yuv420p output.mp4", pngLoc);
84 |
85 | if (!avMaker.Start())
86 | {
87 | Console.WriteLine(Resources.AVError);
88 | return;
89 | }
90 |
91 | //output
92 | // log.Info(avMaker.StandardOutput.ReadToEnd());
93 | //errors
94 | //log.Error(avMaker.StandardError.ReadToEnd());
95 |
96 | avMaker.WaitForExit();
97 | avMaker.Close();
98 | }
99 |
100 | ///
101 | /// Get output file
102 | ///
103 | private string GetOutputFile()
104 | {
105 | var file = Path.Combine(
106 | Settings.Default.VideoLoc, "ScreenCapture"
107 | );
108 |
109 | if (File.Exists(file))
110 | {
111 | //create unique name
112 | var index = 1;
113 | while (true)
114 | {
115 | file = Path.Combine(
116 | Settings.Default.VideoLoc, string.Format("ScreenCapture({0})", index)
117 | );
118 |
119 | if (!File.Exists(file)) break;
120 | index++;
121 | }
122 | }
123 |
124 | if (string.IsNullOrEmpty(Path.GetExtension(file)))
125 | {
126 | file = Path.ChangeExtension(file, Settings.Default.VideoType.ToString());
127 | }
128 |
129 | VariablesParser.PushVariable("VIDEO_LOCATION", file);
130 |
131 | return file;
132 | }
133 | } // class HookData
134 | } // namespace ScreenRecorder
--------------------------------------------------------------------------------
/ScreenRecorder/Hooks/HookParser.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | #region Using directives
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.IO;
21 | using System.Linq;
22 | using System.Xml.Linq;
23 |
24 | #endregion
25 |
26 | namespace ScreenRecorder.Hooks
27 | {
28 | ///
29 | /// Parses all the hook files
30 | ///
31 | public class HookParser
32 | {
33 | private const string hookLocation = @"Hooks\";
34 |
35 | ///
36 | /// Parse
37 | ///
38 | ///
39 | public List Parse()
40 | {
41 | //get all hook files with extension *.hook
42 | var files = Directory.GetFiles(
43 | Path.Combine(AppDomain.CurrentDomain.BaseDirectory, hookLocation), "*.hook"
44 | );
45 |
46 | var data = new List();
47 |
48 | foreach (var hookFile in files)
49 | {
50 | var doc = XDocument.Load(hookFile);
51 | var query = from d in doc.Root.Descendants("Command") select d;
52 |
53 | foreach (var q in query)
54 | {
55 | var hook = new HookData();
56 |
57 | var exe = q.Element("Executable").Value;
58 | var path = q.Element("Path").Value;
59 | var arg = q.Element("Arguments").Value;
60 | var hookid = q.FirstAttribute.Value;
61 | var mode = q.LastAttribute.Value;
62 |
63 | hook.HookId = hookid;
64 | hook.WorkingDir = path;
65 | hook.Executable = exe;
66 | hook.Arguments = arg;
67 | hook.Mode = mode;
68 |
69 | data.Add(hook);
70 | }
71 | }
72 |
73 | return data;
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/ScreenRecorder/Hooks/ffmpeg.hook:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ffmpeg.exe
7 | Codecs\ffmpeg\
8 |
10 |
14 | -sn -i $BITMAPS$\img%d.png -r $FPS$ -c:v libx264 -preset slow -crf 21 $VIDEO_LOCATION$
15 |
16 |
17 |
18 |
19 | ffmpeg.exe
20 | Codecs\ffmpeg\
21 | -i $BITMAPS$\img%d.png -s 1024x768 -c:v mjpeg -qscale:v 0 $VIDEO_LOCATION$
22 |
23 |
24 |
25 | ffmpeg.exe
26 | Codecs\ffmpeg\
27 |
28 |
29 |
30 |
31 | ffmpeg.exe
32 | Codecs\ffmpeg\
33 |
34 |
35 |
36 |
37 | ffmpeg.exe
38 | Codecs\ffmpeg\
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/ScreenRecorder/MessageBox.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ScreenRecorder
2 | {
3 | partial class MessageBox
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.yesBtn = new System.Windows.Forms.Button();
32 | this.noBtn = new System.Windows.Forms.Button();
33 | this.userTextBox = new System.Windows.Forms.TextBox();
34 | this.SuspendLayout();
35 | //
36 | // yesBtn
37 | //
38 | this.yesBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
39 | this.yesBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
40 | this.yesBtn.Location = new System.Drawing.Point(154, 93);
41 | this.yesBtn.Name = "yesBtn";
42 | this.yesBtn.Size = new System.Drawing.Size(75, 23);
43 | this.yesBtn.TabIndex = 0;
44 | this.yesBtn.Text = "Yes";
45 | this.yesBtn.UseVisualStyleBackColor = true;
46 | this.yesBtn.Click += new System.EventHandler(this.restartBtn_Click);
47 | //
48 | // noBtn
49 | //
50 | this.noBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
51 | this.noBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
52 | this.noBtn.Location = new System.Drawing.Point(238, 93);
53 | this.noBtn.Name = "noBtn";
54 | this.noBtn.Size = new System.Drawing.Size(75, 23);
55 | this.noBtn.TabIndex = 1;
56 | this.noBtn.Text = "No";
57 | this.noBtn.UseVisualStyleBackColor = true;
58 | this.noBtn.Click += new System.EventHandler(this.cancelBtn_Click);
59 | //
60 | // userTextBox
61 | //
62 | this.userTextBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
63 | this.userTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
64 | this.userTextBox.Enabled = false;
65 | this.userTextBox.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
66 | this.userTextBox.ForeColor = System.Drawing.Color.Black;
67 | this.userTextBox.Location = new System.Drawing.Point(12, 12);
68 | this.userTextBox.Multiline = true;
69 | this.userTextBox.Name = "userTextBox";
70 | this.userTextBox.ReadOnly = true;
71 | this.userTextBox.Size = new System.Drawing.Size(301, 71);
72 | this.userTextBox.TabIndex = 2;
73 | //
74 | // MessageBox
75 | //
76 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
77 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
78 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
79 | this.ClientSize = new System.Drawing.Size(327, 128);
80 | this.Controls.Add(this.userTextBox);
81 | this.Controls.Add(this.noBtn);
82 | this.Controls.Add(this.yesBtn);
83 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
84 | this.Name = "MessageBox";
85 | this.Opacity = 0.9D;
86 | this.ShowInTaskbar = false;
87 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
88 | this.Text = "MessageBox";
89 | this.TopMost = true;
90 | this.ResumeLayout(false);
91 | this.PerformLayout();
92 |
93 | }
94 |
95 | #endregion
96 |
97 | private System.Windows.Forms.Button yesBtn;
98 | private System.Windows.Forms.Button noBtn;
99 | private System.Windows.Forms.TextBox userTextBox;
100 | }
101 | }
--------------------------------------------------------------------------------
/ScreenRecorder/MessageBox.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 | using System.Drawing;
18 | using System.Windows.Forms;
19 |
20 | namespace ScreenRecorder
21 | {
22 | ///
23 | /// yes no
24 | ///
25 | public enum YesNo
26 | {
27 | Yes,
28 | No
29 | };
30 |
31 | ///
32 | /// user message box
33 | ///
34 | public partial class MessageBox : Form
35 | {
36 | ///
37 | /// Yes no status
38 | ///
39 | private static YesNo yesno;
40 |
41 | ///
42 | /// userBox Singleton
43 | ///
44 | private static MessageBox userBox;
45 |
46 | ///
47 | /// Ctor
48 | ///
49 | private MessageBox()
50 | {
51 | InitializeComponent();
52 | }
53 |
54 | ///
55 | /// On paint
56 | ///
57 | ///
58 | protected override void OnPaint(PaintEventArgs e)
59 | {
60 | e.Graphics.DrawRectangle(new Pen(Brushes.Black), new Rectangle(DisplayRectangle.Location,
61 | new Size(DisplayRectangle.Size.Width - 1, DisplayRectangle.Size.Height - 1)));
62 | base.OnPaint(e);
63 | }
64 |
65 | ///
66 | /// on yes click
67 | ///
68 | ///
69 | ///
70 | private void restartBtn_Click(object sender, EventArgs e)
71 | {
72 | yesno = YesNo.Yes;
73 |
74 | Close();
75 | }
76 |
77 | ///
78 | /// On No click
79 | ///
80 | ///
81 | ///
82 | private void cancelBtn_Click(object sender, EventArgs e)
83 | {
84 | yesno = YesNo.No;
85 |
86 | Close();
87 | }
88 |
89 | ///
90 | /// Show user box
91 | ///
92 | ///
93 | ///
94 | ///
95 | ///
96 | public static YesNo Show(string message, string yes, string no)
97 | {
98 | if (userBox == null) userBox = new MessageBox();
99 |
100 | userBox.userTextBox.Text = message;
101 | userBox.yesBtn.Text = yes;
102 | userBox.noBtn.Text = no;
103 |
104 | userBox.ShowDialog();
105 |
106 | return yesno;
107 | }
108 | }
109 | }
--------------------------------------------------------------------------------
/ScreenRecorder/NotificationForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ScreenRecorder
2 | {
3 | partial class NotificationForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.userMsgBox = new System.Windows.Forms.Label();
32 | this.SuspendLayout();
33 | //
34 | // userMsgBox
35 | //
36 | this.userMsgBox.AutoSize = true;
37 | this.userMsgBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 19F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
38 | this.userMsgBox.ForeColor = System.Drawing.Color.DarkSlateBlue;
39 | this.userMsgBox.Location = new System.Drawing.Point(12, 19);
40 | this.userMsgBox.Name = "userMsgBox";
41 | this.userMsgBox.Size = new System.Drawing.Size(108, 30);
42 | this.userMsgBox.TabIndex = 0;
43 | this.userMsgBox.Text = "Dummy";
44 | //
45 | // NotificationForm
46 | //
47 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
48 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
49 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
50 | this.ClientSize = new System.Drawing.Size(376, 69);
51 | this.Controls.Add(this.userMsgBox);
52 | this.ForeColor = System.Drawing.Color.Transparent;
53 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
54 | this.Name = "NotificationForm";
55 | this.ShowInTaskbar = false;
56 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
57 | this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
58 | this.Text = "NotificationForm";
59 | this.TopMost = true;
60 | this.TransparencyKey = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
61 | this.ResumeLayout(false);
62 | this.PerformLayout();
63 |
64 | }
65 |
66 | #endregion
67 |
68 | private System.Windows.Forms.Label userMsgBox;
69 |
70 |
71 |
72 | }
73 | }
--------------------------------------------------------------------------------
/ScreenRecorder/NotificationForm.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | #region Using directives
17 |
18 | using System;
19 | using System.Windows.Forms;
20 |
21 | #endregion
22 |
23 | namespace ScreenRecorder
24 | {
25 | ///
26 | /// Notification form
27 | ///
28 | /// Form
29 | public partial class NotificationForm : Form
30 | {
31 | /////
32 | ///// Animation timer
33 | /////
34 | //Timer animationTimer;
35 |
36 | ///
37 | /// My appearing
38 | ///
39 | private bool myAppearing;
40 |
41 | ///
42 | /// Wait timer
43 | ///
44 | private Timer waitTimer;
45 |
46 | ///
47 | /// Initializes a new instance of the NotificationForm class.
48 | ///
49 | public NotificationForm()
50 | {
51 | InitializeComponent();
52 |
53 | ShowInTaskbar = false;
54 | Load += new EventHandler(OnNotifierLoad);
55 | }
56 |
57 | ///
58 | /// On notifier load
59 | ///
60 | /// Sender of the event
61 | /// Event arguments
62 | private void OnNotifierLoad(object sender, EventArgs e)
63 | {
64 | //Opacity = 0;
65 |
66 | //animationTimer = new Timer { Interval = 100 };
67 | myAppearing = true;
68 | //animationTimer.Tick += new EventHandler(animationTimer_Tick);
69 | //animationTimer.Start();
70 |
71 | waitTimer = new Timer {Interval = 700 /*wait for 0.7secs*/};
72 | waitTimer.Tick += new EventHandler(waitTimer_Tick);
73 | waitTimer.Start();
74 |
75 | Show();
76 | }
77 |
78 | ///
79 | /// Wait timer tick
80 | ///
81 | /// Sender of the event
82 | /// Event arguments
83 | private void waitTimer_Tick(object sender, EventArgs e)
84 | {
85 | waitTimer.Stop();
86 | myAppearing = false;
87 |
88 | Close();
89 | // animationTimer.Start();
90 | }
91 |
92 | ///
93 | /// Animation timer tick
94 | ///
95 | /// Sender of the event
96 | /// Event arguments
97 | private void animationTimer_Tick(object sender, EventArgs e)
98 | {
99 | if (myAppearing)
100 | {
101 | if (Opacity == 1)
102 | {
103 | //animationTimer.Stop();
104 | }
105 |
106 | Opacity += 0.05;
107 | }
108 | else
109 | {
110 | if (Opacity == 0)
111 | {
112 | Close();
113 | //this.Hide();
114 | }
115 |
116 | Opacity -= 0.05;
117 | }
118 | }
119 |
120 | ///
121 | /// Popup
122 | ///
123 | /// Message
124 | /// Location
125 | public void Popup(string message)
126 | {
127 | userMsgBox.Text = message;
128 | //this.Location = location;
129 |
130 | //this.Show();
131 | Application.Run(this);
132 |
133 | //animationTimer.Dispose();
134 | }
135 | } // class NotificationForm
136 | } // namespace ScreenRecorder
--------------------------------------------------------------------------------
/ScreenRecorder/Program.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 | using System.Globalization;
18 | using System.Threading;
19 | using System.Windows.Forms;
20 | using log4net;
21 | using ScreenRecorder.Properties;
22 |
23 | namespace ScreenRecorder
24 | {
25 | internal static class Program
26 | {
27 | private static readonly ILog log = LogManager.GetLogger(typeof (Program).Name);
28 |
29 | ///
30 | /// The main entry point for the application.
31 | ///
32 | [STAThread]
33 | private static void Main()
34 | {
35 | Setup();
36 |
37 | Application.EnableVisualStyles();
38 | Application.SetCompatibleTextRenderingDefault(false);
39 | Application.Run(new ScreenRecorderMP.ScreenRecorder());
40 | }
41 |
42 | ///
43 | /// initial setup
44 | ///
45 | private static void Setup()
46 | {
47 | var root = AppDomain.CurrentDomain;
48 | var setup = new AppDomainSetup
49 | {
50 | ApplicationBase = root.SetupInformation.ApplicationBase
51 | };
52 |
53 | log.Info("Setting the UI language to " + Settings.Default.Language);
54 | Thread.CurrentThread.CurrentUICulture = new CultureInfo(Settings.Default.Language);
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/ScreenRecorder/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System.Reflection;
17 | using System.Runtime.InteropServices;
18 | using log4net.Config;
19 |
20 | // General Information about an assembly is controlled through the following
21 | // set of attributes. Change these attribute values to modify the information
22 | // associated with an assembly.
23 |
24 | [assembly: AssemblyTitle("ScreenRecorder")]
25 | [assembly: AssemblyDescription("Screen capture")]
26 | [assembly: AssemblyConfiguration("")]
27 | [assembly: AssemblyProduct("ScreenRecorder")]
28 | [assembly: AssemblyCopyright("Copyright © Licence Owner 2014")]
29 | [assembly: XmlConfigurator(Watch = true)] //For log4net 1.2.10.0
30 |
31 | [assembly: AssemblyTrademark("")]
32 |
33 | // Setting ComVisible to false makes the types in this assembly not visible
34 | // to COM components. If you need to access a type in this assembly from
35 | // COM, set the ComVisible attribute to true on that type.
36 |
37 | [assembly: ComVisible(false)]
38 |
39 | // The following GUID is for the ID of the typelib if this project is exposed to COM
40 |
41 | [assembly: Guid("374eb3cf-e453-405a-9f3f-76d2f2391cb0")]
42 |
43 | // Version information for an assembly consists of the following four values:
44 | //
45 | // Major Version
46 | // Minor Version
47 | // Build Number
48 | // Revision
49 | //
50 | // You can specify all the values or you can default the Build and Revision Numbers
51 | // by using the '*' as shown below:
52 | // [assembly: AssemblyVersion("1.0.*")]
53 |
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
--------------------------------------------------------------------------------
/ScreenRecorder/Properties/Resources.es.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Properties/Resources.es.Designer.cs
--------------------------------------------------------------------------------
/ScreenRecorder/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.1022
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ScreenRecorder.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("2")]
29 | public int FramesPerSec {
30 | get {
31 | return ((int)(this["FramesPerSec"]));
32 | }
33 | set {
34 | this["FramesPerSec"] = value;
35 | }
36 | }
37 |
38 | [global::System.Configuration.UserScopedSettingAttribute()]
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.Configuration.DefaultSettingValueAttribute("0.9")]
41 | public decimal Opacity {
42 | get {
43 | return ((decimal)(this["Opacity"]));
44 | }
45 | set {
46 | this["Opacity"] = value;
47 | }
48 | }
49 |
50 | [global::System.Configuration.UserScopedSettingAttribute()]
51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
52 | [global::System.Configuration.DefaultSettingValueAttribute("D:\\temp\\samples_code\\ScreenRecorder_v2.0\\ScreenRecorder\\bin\\x64\\Debug\\Bitmaps")]
53 | public string BitmapTempLoc {
54 | get {
55 | return ((string)(this["BitmapTempLoc"]));
56 | }
57 | set {
58 | this["BitmapTempLoc"] = value;
59 | }
60 | }
61 |
62 | [global::System.Configuration.UserScopedSettingAttribute()]
63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
64 | [global::System.Configuration.DefaultSettingValueAttribute("en")]
65 | public string Language {
66 | get {
67 | return ((string)(this["Language"]));
68 | }
69 | set {
70 | this["Language"] = value;
71 | }
72 | }
73 |
74 | [global::System.Configuration.UserScopedSettingAttribute()]
75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
76 | [global::System.Configuration.DefaultSettingValueAttribute("")]
77 | public string VideoLoc {
78 | get {
79 | return ((string)(this["VideoLoc"]));
80 | }
81 | set {
82 | this["VideoLoc"] = value;
83 | }
84 | }
85 |
86 | [global::System.Configuration.UserScopedSettingAttribute()]
87 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
88 | [global::System.Configuration.DefaultSettingValueAttribute("mp4")]
89 | public string VideoType {
90 | get {
91 | return ((string)(this["VideoType"]));
92 | }
93 | set {
94 | this["VideoType"] = value;
95 | }
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/ScreenRecorder/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 2
7 |
8 |
9 | 0.9
10 |
11 |
12 | D:\temp\samples_code\ScreenRecorder_v2.0\ScreenRecorder\bin\x64\Debug\Bitmaps
13 |
14 |
15 | en
16 |
17 |
18 |
19 |
20 |
21 | mp4
22 |
23 |
24 |
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/AVRecorder.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/AVRecorder.ico
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/AVRecorder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/AVRecorder.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Bug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Bug.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Bug_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Bug_256.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Bug_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Bug_32.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Close.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Comment.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/EditPencil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/EditPencil.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Email.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/FfMpegLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/FfMpegLogo.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Help.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Information.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/LeftSide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/LeftSide.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Like.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/MaximizeMinus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/MaximizeMinus.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/MaximizePlus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/MaximizePlus.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Minimize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Minimize.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Pause.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Record.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Record.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Reset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Reset.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/RightSide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/RightSide.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Search.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Settings.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Settings_Edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Settings_Edit.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Stop.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Warning.png
--------------------------------------------------------------------------------
/ScreenRecorder/Resources/Warning_32x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sunhick/ScreenRecorder/e0ec6061adf27bfbcdde0402c91898602fd475f9/ScreenRecorder/Resources/Warning_32x.png
--------------------------------------------------------------------------------
/ScreenRecorder/VariablesParser.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 | using System.Collections;
18 | using log4net;
19 | using ScreenRecorder.Properties;
20 |
21 | namespace ScreenRecorder
22 | {
23 | ///
24 | /// Expand the environment varibles in the hooks files.
25 | ///
26 | public class VariablesParser
27 | {
28 | private static readonly ILog log = LogManager.GetLogger(typeof (VariablesParser).Name);
29 |
30 | ///
31 | /// application environment variables
32 | ///
33 | private static readonly Hashtable appVariables = new Hashtable()
34 | {
35 | {"BITMAPS", Settings.Default.BitmapTempLoc},
36 | {"FPS", Settings.Default.FramesPerSec}
37 | };
38 |
39 | ///
40 | /// Push App environment variable
41 | ///
42 | ///
43 | ///
44 | public static void PushVariable(string envName, object envValue)
45 | {
46 | if (string.IsNullOrEmpty(envName))
47 | throw new ArgumentNullException("envName", "Environment name cannot be null or empty");
48 |
49 | appVariables.Remove(envName);
50 | appVariables.Add(envName, envValue);
51 | }
52 |
53 |
54 | ///
55 | /// Expand relative path to absolute path
56 | ///
57 | ///
58 | ///
59 | public static string ExpandVariables(string content)
60 | {
61 | if (string.IsNullOrEmpty(content)) return content;
62 |
63 | log.Info("Before Expand contents: " + content);
64 |
65 | var expandedContent = content;
66 |
67 | foreach (DictionaryEntry anEntry in appVariables)
68 | {
69 | var oldString = "$" + ((string) (anEntry.Key)) + "$";
70 | var newString = (anEntry.Value != null) ? anEntry.Value.ToString() : null;
71 |
72 | // check whether Value is of type string and contains Key
73 | if (newString != null && newString.IndexOf(oldString, StringComparison.OrdinalIgnoreCase) < 0)
74 | {
75 | var startIndex = 0;
76 | while (startIndex < expandedContent.Length)
77 | {
78 | var beginIndexOfOldString = expandedContent.IndexOf(oldString, startIndex,
79 | StringComparison.OrdinalIgnoreCase);
80 | if (beginIndexOfOldString >= 0)
81 | {
82 | var oldStringLength = oldString.Length;
83 | var endIndexOfOldString = beginIndexOfOldString + oldStringLength - 1;
84 | expandedContent = expandedContent.Substring(0, beginIndexOfOldString) + newString +
85 | expandedContent.Substring(endIndexOfOldString + 1);
86 | startIndex = beginIndexOfOldString + newString.Length;
87 | }
88 | else
89 | {
90 | break;
91 | }
92 | }
93 | }
94 | }
95 |
96 | log.Info("After Expand contents: " + expandedContent);
97 | return expandedContent;
98 | }
99 | }
100 | }
--------------------------------------------------------------------------------
/ScreenRecorder/Win32Api.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 | using System.Runtime.InteropServices;
18 |
19 | namespace ScreenRecorder
20 | {
21 | ///
22 | /// Hook proc
23 | ///
24 | ///
25 | ///
26 | ///
27 | ///
28 | public delegate int HookProc(int nCode, int wParam, keyboardHookStruct lParam);
29 |
30 | ///
31 | /// Pcursor info
32 | ///
33 | [StructLayout(LayoutKind.Sequential)]
34 | public struct PCURSORINFO
35 | {
36 | public Int32 Size;
37 | public Int32 Flags;
38 | public IntPtr Cursor;
39 | public POINTAPI ScreenPos;
40 | }
41 |
42 | ///
43 | /// Point
44 | ///
45 | [StructLayout(LayoutKind.Sequential)]
46 | public struct POINTAPI
47 | {
48 | public int x;
49 | public int y;
50 | }
51 |
52 | ///
53 | /// keyboard hook struct
54 | ///
55 | public struct keyboardHookStruct
56 | {
57 | public int dwExtraInfo;
58 | public int flags;
59 | public int scanCode;
60 | public int time;
61 | public int vkCode;
62 | }
63 |
64 | ///
65 | /// Wrapper for windows 32 calls.
66 | ///
67 | public class Win32Api
68 | {
69 | public const Int32 CURSOR_SHOWING = 0x00000001;
70 | public const int WH_KEYBOARD_LL = 13;
71 | public const int WM_KEYDOWN = 0x100;
72 | public const int WM_KEYUP = 0x101;
73 | public const int WM_SYSKEYDOWN = 0x104;
74 | public const int WM_SYSKEYUP = 0x105;
75 |
76 | [DllImport("user32.dll")]
77 | public static extern bool GetCursorInfo(out PCURSORINFO cinfo);
78 |
79 | [DllImport("user32.dll")]
80 | public static extern bool DrawIcon(IntPtr hDC, int X, int Y, IntPtr hIcon);
81 |
82 | [DllImport("winmm.dll")]
83 | private static extern int mciSendString(string MciComando, string MciRetorno, int MciRetornoLeng, int CallBack);
84 |
85 | [DllImport("user32")]
86 | private static extern int GetKeyboardState(byte[] pbKeyState);
87 |
88 | [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
89 | private static extern short GetKeyState(int vKey);
90 |
91 | [DllImport("user32")]
92 | public static extern int ToAscii(
93 | int uVirtKey,
94 | int uScanCode,
95 | byte[] lpbKeyState,
96 | byte[] lpwTransKey,
97 | int fuState);
98 |
99 | [DllImport("user32.dll", CharSet = CharSet.Auto,
100 | CallingConvention = CallingConvention.StdCall)]
101 | public static extern int CallNextHookEx(
102 | IntPtr idHook,
103 | int nCode,
104 | int wParam,
105 | ref keyboardHookStruct lParam);
106 |
107 | [DllImport("user32.dll", CharSet = CharSet.Auto,
108 | CallingConvention = CallingConvention.StdCall, SetLastError = true)]
109 | public static extern int UnhookWindowsHookEx(IntPtr idHook);
110 |
111 | [DllImport("user32.dll", CharSet = CharSet.Auto,
112 | CallingConvention = CallingConvention.StdCall, SetLastError = true)]
113 | public static extern IntPtr SetWindowsHookEx(
114 | int idHook,
115 | HookProc lpfn,
116 | IntPtr hMod,
117 | int dwThreadId);
118 |
119 | [DllImport("kernel32.dll")]
120 | public static extern IntPtr LoadLibrary(string dllToLoad);
121 |
122 | //Constants
123 | } // class Win32
124 | }
--------------------------------------------------------------------------------
/UML Modelling/ComponentView.uxf:
--------------------------------------------------------------------------------
1 |
2 |
3 | 10
4 |
5 | UMLGeneric
6 |
7 | 210
8 | 440
9 | 140
10 | 50
11 |
12 | <<component>>
13 | FFMPEG Module
14 |
15 |
16 |
17 | UMLGeneric
18 |
19 | 430
20 | 440
21 | 140
22 | 40
23 |
24 | <<component>>
25 | Configuration Module
26 |
27 |
28 |
29 | UMLGeneric
30 |
31 | 300
32 | 310
33 | 140
34 | 40
35 |
36 | <<component>>
37 | Tools Model
38 |
39 |
40 |
41 | UMLGeneric
42 |
43 | 300
44 | 220
45 | 140
46 | 40
47 |
48 | <<component>>
49 | Tools View Model
50 |
51 |
52 |
53 |
54 | UMLGeneric
55 |
56 | 300
57 | 130
58 | 140
59 | 40
60 |
61 | <<component>>
62 | Tools View
63 |
64 |
65 |
66 |
67 | UMLGeneric
68 |
69 | 300
70 | 60
71 | 140
72 | 50
73 |
74 | <<component>>
75 | UI Container
76 |
77 |
78 |
79 | UMLGeneric
80 |
81 | 200
82 | 570
83 | 140
84 | 40
85 |
86 | <<component>>
87 | FFMPEG
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/UML Modelling/DeploymentView.uxf:
--------------------------------------------------------------------------------
1 |
2 |
3 | // Uncomment the following line to change the fontsize and font:
4 | fontsize=10
5 | // fontfamily=SansSerif //possible: SansSerif,Serif,Monospaced
6 |
7 |
8 | //////////////////////////////////////////////////////////////////////////////////////////////
9 | // Welcome to UMLet!
10 | //
11 | // Double-click on elements to add them to the diagram, or to copy them
12 | // Edit elements by modifying the text in this panel
13 | // Hold Ctrl to select multiple elements
14 | // Use Ctrl+mouse to select via lasso
15 | //
16 | // Use +/- or Ctrl+mouse wheel to zoom
17 | // Drag a whole relation at its central square icon
18 | //
19 | // Press Ctrl+C to copy the whole diagram to the system clipboard (then just paste it to, eg, Word)
20 | // Edit the files in the "palettes" directory to create your own element palettes
21 | //
22 | // Select "Custom Elements > New..." to create new element types
23 | //////////////////////////////////////////////////////////////////////////////////////////////
24 |
25 |
26 | // This text will be stored with each diagram; use it for notes.
27 | 10
28 |
29 | UMLDeployment
30 |
31 | 30
32 | 40
33 | 930
34 | 580
35 |
36 | CAM Recorder
37 |
38 |
39 |
40 | UMLDeployment
41 |
42 | 160
43 | 270
44 | 780
45 | 160
46 |
47 | CAM Backend
48 | bg=light_gray
49 |
50 |
51 |
52 | UMLDeployment
53 |
54 | 40
55 | 450
56 | 900
57 | 160
58 |
59 | 3rd PARTY
60 | bg=gray
61 |
62 |
63 |
64 | UMLDeployment
65 |
66 | 160
67 | 90
68 | 780
69 | 160
70 |
71 | CAM Frontend
72 | bg=light_gray
73 |
74 |
75 |
76 | UMLGeneric
77 |
78 | 470
79 | 140
80 | 140
81 | 80
82 |
83 | symbol=component
84 | Tools View
85 |
86 |
87 |
88 | UMLGeneric
89 |
90 | 710
91 | 310
92 | 150
93 | 80
94 |
95 | symbol=component
96 | Configuration
97 | Module
98 |
99 |
100 |
101 | UMLGeneric
102 |
103 | 220
104 | 140
105 | 140
106 | 80
107 |
108 | symbol=component
109 | UI Container
110 |
111 |
112 |
113 | UMLGeneric
114 |
115 | 210
116 | 310
117 | 140
118 | 80
119 |
120 | symbol=component
121 | FFMPEG
122 | Module
123 |
124 |
125 |
126 | UMLGeneric
127 |
128 | 200
129 | 500
130 | 140
131 | 80
132 |
133 | symbol=component
134 | FFMPEG
135 |
136 |
137 |
138 | UMLGeneric
139 |
140 | 470
141 | 310
142 | 140
143 | 80
144 |
145 | symbol=component
146 | Tools
147 | Module
148 |
149 |
150 |
151 | UMLGeneric
152 |
153 | 470
154 | 500
155 | 140
156 | 80
157 |
158 | symbol=component
159 | Log4Net
160 |
161 |
162 |
163 | UMLGeneric
164 |
165 | 40
166 | 90
167 | 110
168 | 340
169 |
170 | PRISM
171 | bg=dark_gray
172 |
173 |
174 |
175 |
--------------------------------------------------------------------------------
/UML Modelling/UseCases.uxf:
--------------------------------------------------------------------------------
1 |
2 |
3 | 10
4 |
5 | UMLActor
6 |
7 | 270
8 | 210
9 | 60
10 | 100
11 |
12 | Actor
13 |
14 |
15 |
16 | UMLUseCase
17 |
18 | 510
19 | 140
20 | 120
21 | 40
22 |
23 | Start recording
24 |
25 |
26 |
27 | UMLUseCase
28 |
29 | 510
30 | 200
31 | 120
32 | 40
33 |
34 | Stop recording
35 |
36 |
37 |
38 | UMLUseCase
39 |
40 | 510
41 | 280
42 | 120
43 | 40
44 |
45 | Video Settings
46 |
47 |
48 |
49 | UMLUseCase
50 |
51 | 510
52 | 360
53 | 120
54 | 40
55 |
56 | Audio Settings
57 |
58 |
59 |
60 | Relation
61 |
62 | 300
63 | 150
64 | 230
65 | 130
66 |
67 | lt=->>
68 | 10.0;110.0;210.0;10.0
69 |
70 |
71 | Relation
72 |
73 | 300
74 | 210
75 | 230
76 | 70
77 |
78 | lt=->>
79 | 10.0;50.0;210.0;10.0
80 |
81 |
82 | Relation
83 |
84 | 300
85 | 250
86 | 230
87 | 70
88 |
89 | lt=->>
90 | 10.0;10.0;210.0;50.0
91 |
92 |
93 | Relation
94 |
95 | 300
96 | 250
97 | 230
98 | 150
99 |
100 | lt=->>
101 | 10.0;10.0;210.0;130.0
102 |
103 |
104 |
--------------------------------------------------------------------------------
/WPF/CAM.Bootscreen/BootSplasher.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 | using System.Diagnostics;
18 | using System.Threading;
19 | using System.Windows.Threading;
20 | using log4net;
21 |
22 | namespace CAM.Bootscreen
23 | {
24 | public interface IBootSplasher
25 | {
26 | void ShowSplash();
27 | void CloseSplash();
28 | void ShowStatus(string theMessage);
29 | }
30 |
31 | public class BootSplasher : IBootSplasher
32 | {
33 | private readonly ILog Log = LogManager.GetLogger(typeof (BootSplasher));
34 | private Bootscreen myBootscreen;
35 | private Dispatcher myDispatcher;
36 |
37 | public void ShowSplash()
38 | {
39 | var aCurrentProcess = Process.GetCurrentProcess();
40 | Log.Info(string.Format("ShowSplash() :: Process ID: {0} Thread ID: {1}", aCurrentProcess.Id,
41 | Thread.CurrentThread.ManagedThreadId));
42 |
43 | if (!myDispatcher.CheckAccess())
44 | {
45 | myDispatcher.BeginInvoke(new Action(ShowSplash), DispatcherPriority.Render);
46 | return;
47 | }
48 |
49 | myBootscreen.Show();
50 | Dispatcher.Run();
51 | }
52 |
53 | public void CloseSplash()
54 | {
55 | var aCurrentProcess = Process.GetCurrentProcess();
56 | Log.Info(string.Format("CloseSplash() :: Process ID: {0} Thread ID: {1}", aCurrentProcess.Id,
57 | Thread.CurrentThread.ManagedThreadId));
58 |
59 | if (!myDispatcher.CheckAccess())
60 | {
61 | myDispatcher.BeginInvoke(new Action(CloseSplash), DispatcherPriority.Render);
62 | return;
63 | }
64 |
65 | myBootscreen.Close();
66 | }
67 |
68 | public void ShowStatus(string theMessage)
69 | {
70 | if (!myDispatcher.CheckAccess())
71 | {
72 | myDispatcher.BeginInvoke(new Func(() =>
73 | {
74 | ShowStatus(theMessage);
75 | return null;
76 | }), DispatcherPriority.Normal);
77 | return;
78 | }
79 |
80 | var aBootscreenViewModel = (myBootscreen.DataContext) as BootscreenViewModel;
81 | if (aBootscreenViewModel != null)
82 | aBootscreenViewModel.ShowStatus(theMessage);
83 | }
84 |
85 | public void Init()
86 | {
87 | var aCurrentProcess = Process.GetCurrentProcess();
88 | Log.Info(string.Format("Init Process ID: {0} Thread ID: {1}", aCurrentProcess.Id,
89 | Thread.CurrentThread.ManagedThreadId));
90 | myBootscreen = new Bootscreen(new BootscreenViewModel());
91 | myDispatcher = myBootscreen.Dispatcher;
92 | }
93 | }
94 | }
--------------------------------------------------------------------------------
/WPF/CAM.Bootscreen/Bootscreen.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/WPF/CAM.Bootscreen/Bootscreen.xaml.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | namespace CAM.Bootscreen
17 | {
18 | ///
19 | /// Interaction logic for Bootscreen.xaml
20 | ///
21 | public partial class Bootscreen
22 | {
23 | public Bootscreen(BootscreenViewModel theViewModel)
24 | {
25 | InitializeComponent();
26 | DataContext = theViewModel;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/WPF/CAM.Bootscreen/BootscreenModule.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 | using System.Diagnostics;
18 | using System.Threading;
19 | using System.Threading.Tasks;
20 | using log4net;
21 | using Microsoft.Practices.Prism.Modularity;
22 | using Microsoft.Practices.Unity;
23 |
24 | namespace CAM.Bootscreen
25 | {
26 | public class BootscreenModule : IModule
27 | {
28 | private readonly ILog Log = LogManager.GetLogger(typeof (BootscreenModule));
29 | private readonly IUnityContainer myContainer;
30 | private readonly BootSplasher mySplasher = new BootSplasher();
31 |
32 | public BootscreenModule(IUnityContainer theContainer)
33 | {
34 | myContainer = theContainer;
35 | }
36 |
37 | public void Initialize()
38 | {
39 | Log.Info("Initialzing the Bootscreen Module");
40 | var aCurrentProcess = Process.GetCurrentProcess();
41 | Log.Info(string.Format("Process ID: {0} Thread ID: {1}", aCurrentProcess.Id,
42 | Thread.CurrentThread.ManagedThreadId));
43 |
44 | StartSTATask(Splasher);
45 | myContainer.RegisterInstance("Bootscreen", mySplasher,
46 | new ContainerControlledLifetimeManager());
47 | }
48 |
49 | private object Splasher()
50 | {
51 | mySplasher.Init();
52 | mySplasher.ShowSplash();
53 | return null;
54 | }
55 |
56 | // ReSharper disable once InconsistentNaming
57 | public static Task StartSTATask(Func theFunc)
58 | {
59 | var aTcs = new TaskCompletionSource();
60 | var aThread = new Thread(() =>
61 | {
62 | try
63 | {
64 | aTcs.SetResult(theFunc());
65 | }
66 | catch (Exception aE)
67 | {
68 | aTcs.SetException(aE);
69 | throw;
70 | }
71 | });
72 | aThread.SetApartmentState(ApartmentState.STA);
73 | aThread.Start();
74 | return aTcs.Task;
75 | }
76 | }
77 | }
--------------------------------------------------------------------------------
/WPF/CAM.Bootscreen/BootscreenViewModel.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 | using CAM.Common;
18 |
19 | namespace CAM.Bootscreen
20 | {
21 | public class BootscreenViewModel : ViewModelBase
22 | {
23 | private string myStatus;
24 |
25 | public BootscreenViewModel()
26 | {
27 | StatusBar = "Loading CAM Recorder...";
28 | }
29 |
30 | public String StatusBar
31 | {
32 | get { return myStatus; }
33 | set
34 | {
35 | myStatus = value;
36 | OnPropertyChanged("StatusBar");
37 | }
38 | }
39 |
40 | public void ShowStatus(string theMessage)
41 | {
42 | StatusBar = theMessage;
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/WPF/CAM.Bootscreen/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System.Reflection;
17 | using System.Runtime.InteropServices;
18 |
19 | // General Information about an assembly is controlled through the following
20 | // set of attributes. Change these attribute values to modify the information
21 | // associated with an assembly.
22 |
23 | [assembly: AssemblyTitle("CAM.Bootscreen")]
24 | [assembly: AssemblyDescription("")]
25 | [assembly: AssemblyConfiguration("")]
26 | [assembly: AssemblyCompany("Hewlett-Packard")]
27 | [assembly: AssemblyProduct("CAM.Bootscreen")]
28 | [assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2015")]
29 | [assembly: AssemblyTrademark("")]
30 | [assembly: AssemblyCulture("")]
31 |
32 | // Setting ComVisible to false makes the types in this assembly not visible
33 | // to COM components. If you need to access a type in this assembly from
34 | // COM, set the ComVisible attribute to true on that type.
35 |
36 | [assembly: ComVisible(false)]
37 |
38 | // The following GUID is for the ID of the typelib if this project is exposed to COM
39 |
40 | [assembly: Guid("b56acae6-c7da-4ca9-b6dd-f67ac660149a")]
41 |
42 | // Version information for an assembly consists of the following four values:
43 | //
44 | // Major Version
45 | // Minor Version
46 | // Build Number
47 | // Revision
48 | //
49 | // You can specify all the values or you can default the Build and Revision Numbers
50 | // by using the '*' as shown below:
51 | // [assembly: AssemblyVersion("1.0.*")]
52 |
53 | [assembly: AssemblyVersion("1.0.0.0")]
54 | [assembly: AssemblyFileVersion("1.0.0.0")]
--------------------------------------------------------------------------------
/WPF/CAM.Common/AppExitEvent.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using Microsoft.Practices.Prism.PubSubEvents;
17 |
18 | namespace CAM.Common
19 | {
20 | public enum AppExitType
21 | {
22 | Normal,
23 | Forced,
24 | Error
25 | }
26 |
27 | public class AppExitEvent : PubSubEvent
28 | {
29 | }
30 | }
--------------------------------------------------------------------------------
/WPF/CAM.Common/ColorPalatte.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | namespace CAM.Common
17 | {
18 | public class ColorPalatte
19 | {
20 | public const string BlueGrey = "#607D8B";
21 | public const string Grey = "#9E9E9E";
22 | public const string Brown = "#795548";
23 | public const string DeepOrange = "#FF5722";
24 | public const string Orange = "#FF9800";
25 | public const string Amber = "#FFC107";
26 | public const string Yellow = "#FFEB3B";
27 | public const string Lime = "#CDDC39";
28 | public const string LightGreen = "#8BC34A";
29 | public const string Green = "#4CAF50";
30 | public const string Teal = "#009688";
31 | public const string Cyan = "#00BCD4";
32 | public const string LightBlue = "#03A9F4";
33 | public const string Blue = "#2196F3";
34 | public const string Indigo = "#3F51B5";
35 | public const string DeepPurple = "#673AB7";
36 | }
37 | }
--------------------------------------------------------------------------------
/WPF/CAM.Common/EncoderInfo.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 |
18 | namespace CAM.Common
19 | {
20 | public class EncoderInfo
21 | {
22 | public String HookId { get; set; }
23 | public String Mode { get; set; }
24 | public String ExeName { get; set; }
25 | public String ExePath { get; set; }
26 | public String Arguments { get; set; }
27 | }
28 | }
--------------------------------------------------------------------------------
/WPF/CAM.Common/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System.Reflection;
17 | using System.Runtime.InteropServices;
18 |
19 | // General Information about an assembly is controlled through the following
20 | // set of attributes. Change these attribute values to modify the information
21 | // associated with an assembly.
22 |
23 | [assembly: AssemblyTitle("CAM.Common")]
24 | [assembly: AssemblyDescription("")]
25 | [assembly: AssemblyConfiguration("")]
26 | [assembly: AssemblyCompany("Hewlett-Packard")]
27 | [assembly: AssemblyProduct("CAM.Common")]
28 | [assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2015")]
29 | [assembly: AssemblyTrademark("")]
30 | [assembly: AssemblyCulture("")]
31 |
32 | // Setting ComVisible to false makes the types in this assembly not visible
33 | // to COM components. If you need to access a type in this assembly from
34 | // COM, set the ComVisible attribute to true on that type.
35 |
36 | [assembly: ComVisible(false)]
37 |
38 | // The following GUID is for the ID of the typelib if this project is exposed to COM
39 |
40 | [assembly: Guid("7bbe96d0-eb71-45e6-b5cf-011d8c2eef66")]
41 |
42 | // Version information for an assembly consists of the following four values:
43 | //
44 | // Major Version
45 | // Minor Version
46 | // Build Number
47 | // Revision
48 | //
49 | // You can specify all the values or you can default the Build and Revision Numbers
50 | // by using the '*' as shown below:
51 | // [assembly: AssemblyVersion("1.0.*")]
52 |
53 | [assembly: AssemblyVersion("1.0.0.0")]
54 | [assembly: AssemblyFileVersion("1.0.0.0")]
--------------------------------------------------------------------------------
/WPF/CAM.Common/RelayCommand.cs:
--------------------------------------------------------------------------------
1 | // This file is part of ScreenRecorder
2 | //
3 | // ScreenRecorder is free software: you can redistribute it and/or modify
4 | // it under the terms of the GNU General Public License as published by
5 | // the Free Software Foundation, either version 3 of the License, or
6 | // (at your option) any later version.
7 | //
8 | // ScreenRecorder is distributed in the hope that it will be useful,
9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | // GNU General Public License for more details.
12 | //
13 | // You should have received a copy of the GNU General Public License
14 | // along with ScreenRecorder. If not, see .
15 |
16 | using System;
17 | using System.Diagnostics;
18 | using System.Windows.Input;
19 |
20 | namespace CAM.Common
21 | {
22 | public class RelayCommand : ICommand
23 | {
24 | private readonly Predicate