SEBWIN-633: Minor refactoring.
This commit is contained in:
parent
f0aecb06d9
commit
9b8d1fc3b2
4 changed files with 7 additions and 7 deletions
|
@ -359,7 +359,7 @@ namespace SafeExamBrowser.Client
|
||||||
timer.Interval = TEN_MINUTES + (new Random().NextDouble() * FIVE_MINUTES);
|
timer.Interval = TEN_MINUTES + (new Random().NextDouble() * FIVE_MINUTES);
|
||||||
timer.Start();
|
timer.Start();
|
||||||
|
|
||||||
registry.StartMonitoring(RegistryKey.MachineHive.EaseOfAccess_Key, RegistryKey.MachineHive.EaseOfAccess_Name);
|
registry.StartMonitoring(RegistryValue.MachineHive.EaseOfAccess_Key, RegistryValue.MachineHive.EaseOfAccess_Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void VerifySessionIntegrity()
|
private void VerifySessionIntegrity()
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace SafeExamBrowser.Runtime.Operations
|
||||||
|
|
||||||
logger.Info($"Attempting to verify ease of access configuration...");
|
logger.Info($"Attempting to verify ease of access configuration...");
|
||||||
|
|
||||||
if (registry.TryRead(RegistryKey.MachineHive.EaseOfAccess_Key, RegistryKey.MachineHive.EaseOfAccess_Name, out var value))
|
if (registry.TryRead(RegistryValue.MachineHive.EaseOfAccess_Key, RegistryValue.MachineHive.EaseOfAccess_Name, out var value))
|
||||||
{
|
{
|
||||||
if (value == default || (value is string s && string.IsNullOrWhiteSpace(s)))
|
if (value == default || (value is string s && string.IsNullOrWhiteSpace(s)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
namespace SafeExamBrowser.SystemComponents.Contracts.Registry
|
namespace SafeExamBrowser.SystemComponents.Contracts.Registry
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines registry keys and names used in conjunction with <see cref="IRegistry"/>. Use the pattern "LogicalGroup_Key" resp. "LogicalGroup_Name"
|
/// Defines registry values used in conjunction with <see cref="IRegistry"/>. Use the pattern "LogicalGroup_Key" resp. "LogicalGroup_Name" to
|
||||||
/// to allow for a better overview over all keys, names and their usage (where applicable).
|
/// allow for a better overview over all values and their usage (where applicable).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class RegistryKey
|
public static class RegistryValue
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All registry keys and names located in the machine hive.
|
/// All registry values located in the machine hive.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class MachineHive
|
public static class MachineHive
|
||||||
{
|
{
|
|
@ -78,7 +78,7 @@
|
||||||
<Compile Include="PowerSupply\IPowerSupplyStatus.cs" />
|
<Compile Include="PowerSupply\IPowerSupplyStatus.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Network\ConnectionStatus.cs" />
|
<Compile Include="Network\ConnectionStatus.cs" />
|
||||||
<Compile Include="Registry\RegistryKey.cs" />
|
<Compile Include="Registry\RegistryValue.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
|
Loading…
Reference in a new issue