Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
Removed warnings
  • Loading branch information
marc.fauser committed May 30, 2023
1 parent 9ea768f commit 684c688
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions ShareX/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal static class Extensions

public static string GetMainModuleFileName(this Process process, int buffer = 1024)
{
var fileNameBuilder = new StringBuilder(buffer);
StringBuilder fileNameBuilder = new StringBuilder(buffer);
uint bufferLength = (uint)fileNameBuilder.Capacity + 1;
return QueryFullProcessImageName(process.Handle, 0, fileNameBuilder, ref bufferLength) ?
fileNameBuilder.ToString() :
Expand All @@ -36,11 +36,11 @@ static class Globals

public static string FindShareX()
{
foreach (var p in Process.GetProcesses())
foreach (Process p in Process.GetProcesses())
{
if (p.ProcessName == "ShareX")
{
return(p.GetMainModuleFileName());
return p.GetMainModuleFileName();
}
}
return "";
Expand Down
6 changes: 3 additions & 3 deletions ShareX/ScreenRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
namespace ShareX
{
[PluginActionId("com.reedhaffner.screenrecord")]
public class ScreenRecord : PluginBase
public class ScreenRecord : KeypadBase
{
private class PluginSettings
{
public static PluginSettings CreateDefaultSettings()
{
PluginSettings instance = new PluginSettings();
instance.Type = String.Empty; ;
instance.Type = string.Empty; ;

return instance;
}
Expand Down Expand Up @@ -103,7 +103,7 @@ private async void XScreenRecord()
{
await Task.Run(() =>
{
if (settings.Type == String.Empty)
if (settings.Type == string.Empty)
{
Connection.ShowAlert();
MessageBox.Show("A ScreenRecord type is required! Please check the Stream Deck application.");
Expand Down
6 changes: 3 additions & 3 deletions ShareX/Screenshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
namespace ShareX
{
[PluginActionId("com.reedhaffner.screenshot")]
public class Screenshot : PluginBase
public class Screenshot : KeypadBase
{
private class PluginSettings
{
public static PluginSettings CreateDefaultSettings()
{
PluginSettings instance = new PluginSettings();
instance.Type = String.Empty; ;
instance.Type = string.Empty; ;

return instance;
}
Expand Down Expand Up @@ -102,7 +102,7 @@ private async void XScreenshot()
{
await Task.Run(() =>
{
if (settings.Type == String.Empty)
if (settings.Type == string.Empty)
{
Connection.ShowAlert();
MessageBox.Show("A Screenshot type is required! Please check the Stream Deck application.");
Expand Down
6 changes: 3 additions & 3 deletions ShareX/Workflow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
namespace ShareX
{
[PluginActionId("com.reedhaffner.workflow")]
public class Workflow : PluginBase
public class Workflow : KeypadBase
{
private class PluginSettings
{
public static PluginSettings CreateDefaultSettings()
{
PluginSettings instance = new PluginSettings();
instance.WorkflowName = String.Empty; ;
instance.WorkflowName = string.Empty; ;

return instance;
}
Expand Down Expand Up @@ -102,7 +102,7 @@ private async void XWorkflow()
{
await Task.Run(() =>
{
if (settings.WorkflowName == String.Empty)
if (settings.WorkflowName == string.Empty)
{
Connection.ShowAlert();
MessageBox.Show("You did not name a workflow!");
Expand Down

0 comments on commit 684c688

Please sign in to comment.