Skip to content

Commit

Permalink
Update 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lextrack committed May 6, 2024
1 parent d001ec9 commit abcf90e
Show file tree
Hide file tree
Showing 10 changed files with 249 additions and 356 deletions.
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ Where can you install the app?
- Record any monitor connected to your PC<br>
- Availability in ten languages (English, Español, Français, Deutsch, Українська, 日本語, Português do Brasil, 中文(简体), العربية and Italiano)

<h2 align="center">Demo</h2>
<p align="center">
Watch a demo of the app recording gameplay on YouTube:
<br>
<a href="https://www.youtube.com/watch?v=IhTJTVahbbk" target="_blank">
<img src="https://i.ibb.co/R9LZT1Q/vlcsnap-2024-04-29-19h43m28s768.png" alt="Simple-Screen-Recorder app test | C# Project (.NET 8 and WinForms)" width="852" height="480">
</a>
</p>

<h2 align="center">Install</h2>
<p align="center">
Windows 8, 10, 11 (64 bits) | v1.2.9 | <a href="https://github.com/lextrack/Simple-Screen-Recorder/releases/download/1.2.9/Simple-Screen-Recorder-Release-Portable.7z">Download directly from GitHub</a><br><br>
Expand Down
6 changes: 3 additions & 3 deletions Simple-Screen-Recorder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<ImplicitUsings>enable</ImplicitUsings>
<StartupObject>Simple_Screen_Recorder.Program</StartupObject>
<UseWPF>True</UseWPF>
<Version>1.2.9</Version>
<Version>1.3.0</Version>
<Authors>Lextrack</Authors>
<Copyright>Lextrack</Copyright>
<AssemblyVersion>1.2.9</AssemblyVersion>
<FileVersion>1.2.9</FileVersion>
<AssemblyVersion>1.3.0</AssemblyVersion>
<FileVersion>1.3.0</FileVersion>
<PackageIcon>screen recorder.png</PackageIcon>
<ApplicationIcon>Resources\screen recorder.ico</ApplicationIcon>
<PlatformTarget>x64</PlatformTarget>
Expand Down
2 changes: 1 addition & 1 deletion UI/AboutForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions UI/AudioRecorderMainWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

144 changes: 70 additions & 74 deletions UI/AudioRecorderMainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public partial class AudioRecorderMainWindow : Form
private string AudioName = "";
public int ProcessId { get; private set; }

public static string ResourcePath = Path.Combine(Directory.GetCurrentDirectory(), @"FFmpegResources\ffmpeg");

public AudioRecorderMainWindow()
{
Expand All @@ -24,11 +23,11 @@ public AudioRecorderMainWindow()
private void AudioRecorderMainWindow_Load(object sender, EventArgs e)
{
GetTextsMain();
OpenAudioComponents();
InitializeAudioComponents();
LoadUserSettingsCombobox();
}

private void OpenAudioComponents()
private void InitializeAudioComponents()
{
AudioRecorderMic.OpenComp();
ComboBoxMicrophone.DataSource = AudioRecorderMic.cboDIspositivos.DataSource;
Expand All @@ -45,86 +44,51 @@ private void btnStartRecording_Click(object sender, EventArgs e)

RecordAudio();
DisableElementsUI();
RecordFfmpegInitial();
}

private void RecordFfmpegInitial()
{
ProcessStartInfo ProcessId = new("cmd.exe", $"/c {RecorderScreenMainWindow.ResourcePath} -f gdigrab AudioRecordings/" + AudioName + "");
ProcessId.WindowStyle = ProcessWindowStyle.Hidden;
ProcessId.CreateNoWindow = true;
ProcessId.RedirectStandardOutput = true;
Process.Start(ProcessId);
}

private void DisableElementsUI()
private void RecordAudio()
{
btnStartRecording.Enabled = false;
ComboBoxMicrophone.Enabled = false;
ComboBoxSpeaker.Enabled = false;
BtnBackScreen.Enabled = false;
comboBoxAudioSourceAudio.Enabled = false;
}
string selectedOption = comboBoxAudioSourceAudio.SelectedItem.ToString();

private void BtnStop_Click(object sender, EventArgs e)
{
try
if (selectedOption == StringsEN.TwoTrackAudio)
{
LbTimer.ForeColor = Color.White;
LbTimer.Text = "00:00:00";
CountRecAudio.Enabled = false;
StopAudioRec();

RecordTwoTracks();
}
catch (Exception)
else if (selectedOption == StringsEN.DesktopAudio)
{
return;
RecordDesktopAudio();
}
else if (selectedOption == StringsEN.MicrophoneAudio)
{
RecordMicrophone();
}
}

private void StopAudioRec()
private void RecordTwoTracks()
{
btnStartRecording.Enabled = true;
ComboBoxMicrophone.Enabled = true;
ComboBoxSpeaker.Enabled = true;
BtnBackScreen.Enabled = true;
comboBoxAudioSourceAudio.Enabled = true;
if (WaveIn.DeviceCount == 0)
{
MessageBox.Show(StringsEN.message3, "Error");
return;
}

CheckAudioStop();
CheckFfmpegProcces();
RecMic();
RecSpeaker();
}

private void RecordAudio()
private void RecordDesktopAudio()
{
string selectedOption = comboBoxAudioSourceAudio.SelectedItem.ToString();
RecSpeaker();
}

if (selectedOption == StringsEN.TwoTrackAudio)
{
if (WaveIn.DeviceCount > 0)
{
RecMic();
}
else
{
MessageBox.Show(StringsEN.message3, "Error");
}
RecSpeaker();
}
else if (selectedOption == StringsEN.DesktopAudio)
{
RecSpeaker();
}
else if (selectedOption == StringsEN.MicrophoneAudio)
private void RecordMicrophone()
{
if (WaveIn.DeviceCount == 0)
{
if (WaveIn.DeviceCount > 0)
{
RecMic();
}
else
{
MessageBox.Show(StringsEN.message3, "Error");
}
MessageBox.Show(StringsEN.message3, "Error");
return;
}

RecMic();
}

private void CheckAudioStop()
Expand Down Expand Up @@ -161,20 +125,52 @@ private void CheckAudioStop()
soundPlayer.Stop();
}

private void CheckFfmpegProcces()
private void StopAudioRecordingProcess()
{
btnStartRecording.Enabled = true;
ComboBoxMicrophone.Enabled = true;
ComboBoxSpeaker.Enabled = true;
BtnBackScreen.Enabled = true;
comboBoxAudioSourceAudio.Enabled = true;

CheckAudioStop();
}


private void BtnStop_Click(object sender, EventArgs e)
{
foreach (Process proceso in Process.GetProcesses())
try
{
if (proceso.ProcessName == "ffmpeg")
{
proceso.Kill();
}
LbTimer.ForeColor = Color.White;
LbTimer.Text = "00:00:00";
CountRecAudio.Enabled = false;
StopAudioRecordingProcess();
EnableElementsUI();

}
catch (Exception)
{
return;
}
}

Process proc = Process.GetProcessById(ProcessId);
proc.Kill();
private void DisableElementsUI()
{
btnStartRecording.Enabled = false;
ComboBoxMicrophone.Enabled = false;
ComboBoxSpeaker.Enabled = false;
BtnBackScreen.Enabled = false;
comboBoxAudioSourceAudio.Enabled = false;
}

private void EnableElementsUI()
{
btnStartRecording.Enabled = true;
ComboBoxMicrophone.Enabled = true;
ComboBoxSpeaker.Enabled = true;
BtnBackScreen.Enabled = true;
comboBoxAudioSourceAudio.Enabled = true;
}
private static void RecMic()
{
AudioRecorderMic.Cleanup();
Expand Down
13 changes: 8 additions & 5 deletions UI/MergeAllMediaForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions UI/MergeAllMediaForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private void BtnVideo_Click(object sender, EventArgs e)

var archivo = new OpenFileDialog();
archivo.InitialDirectory = recordingsFolder;
archivo.Filter = "Video files|*.avi;*.mkv;*.wmv|All files|*.*";
archivo.Filter = "Video files|*.mkv;*.avi;*.wmv|All files|*.*";
archivo.Multiselect = false;

if (archivo.ShowDialog() == DialogResult.OK)
Expand All @@ -77,7 +77,7 @@ private void BtnDeskAudio_Click(object sender, EventArgs e)
var archivo = new OpenFileDialog();
archivo.InitialDirectory = recordingsFolder;
archivo.Filter = "Audio files|*.wav;*.aac|All files|*.*";
archivo.Multiselect = false;
archivo.Multiselect = false;

if (archivo.ShowDialog() == DialogResult.OK)
{
Expand All @@ -97,7 +97,7 @@ private void BtnMicAudio_Click(object sender, EventArgs e)
var archivo = new OpenFileDialog();
archivo.InitialDirectory = recordingsFolder;
archivo.Filter = "Audio files|*.wav;*.aac|All files|*.*";
archivo.Multiselect = false;
archivo.Multiselect = false;

if (archivo.ShowDialog() == DialogResult.OK)
{
Expand Down
Loading

0 comments on commit abcf90e

Please sign in to comment.