Skip to content

Commit

Permalink
Added option to configure user switch and system suspend detection. Made
Browse files Browse the repository at this point in the history
task icon more responsive. Updated version to 2.1.
  • Loading branch information
sabaatworld committed Sep 24, 2017
1 parent cbd0d06 commit 5bd2c00
Show file tree
Hide file tree
Showing 17 changed files with 232 additions and 178 deletions.
5 changes: 2 additions & 3 deletions HyperionScreenCap/ApiServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Grapevine.Server.Attributes;
using Grapevine.Shared;


namespace HyperionScreenCap
{
class ApiServer
Expand Down Expand Up @@ -75,7 +74,7 @@ public IHttpContext API(IHttpContext context)
}
}

MainForm.ToggleCapture(command);
MainForm.ToggleCapture((MainForm.CaptureCommand) Enum.Parse(typeof(MainForm.CaptureCommand), command));
responseText = $"API command {command} completed successfully.";
}

Expand All @@ -89,4 +88,4 @@ public IHttpContext API(IHttpContext context)
}
}
}
}
}
6 changes: 6 additions & 0 deletions HyperionScreenCap/Config/SettingsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ internal static class SettingsManager
public static int CaptureInterval;
public static int MonitorIndex;
public static bool CaptureOnStartup;
public static bool PauseOnUserSwitch;
public static bool PauseOnSystemSuspend;

// API
public static int ApiPort = 29445;
Expand Down Expand Up @@ -49,6 +51,8 @@ public static void SaveSettings()
Properties.Settings.Default.monitorIndex = MonitorIndex;
Properties.Settings.Default.notificationLevel = NotificationLevel;
Properties.Settings.Default.captureOnStartup = CaptureOnStartup;
Properties.Settings.Default.pauseOnUserSwitch = PauseOnUserSwitch;
Properties.Settings.Default.pauseOnSystemSuspend = PauseOnSystemSuspend;
Properties.Settings.Default.apiPort = ApiPort;
Properties.Settings.Default.apiEnabled = ApiEnabled;
Properties.Settings.Default.apiExcludedTimesEnabled = ApiExcludedTimesEnabled;
Expand All @@ -75,6 +79,8 @@ public static void LoadSetttings()
MonitorIndex = Properties.Settings.Default.monitorIndex;
NotificationLevel = Properties.Settings.Default.notificationLevel;
CaptureOnStartup = Properties.Settings.Default.captureOnStartup;
PauseOnUserSwitch = Properties.Settings.Default.pauseOnUserSwitch;
PauseOnSystemSuspend = Properties.Settings.Default.pauseOnSystemSuspend;
ApiPort = Properties.Settings.Default.apiPort;
ApiEnabled = Properties.Settings.Default.apiEnabled;
ApiExcludedTimesEnabled = Properties.Settings.Default.apiExcludedTimesEnabled;
Expand Down
Loading

0 comments on commit 5bd2c00

Please sign in to comment.