Skip to content

Commit 87e6d2a

Browse files
committed
Release v1.10.0
2 parents ed18c65 + b44e06a commit 87e6d2a

File tree

20 files changed

+302
-59
lines changed

20 files changed

+302
-59
lines changed

Hourglass.Bundle/Bundle.wxs

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
23
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
34
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
4-
<Bundle Name="Hourglass" Version="1.9.0.0" Manufacturer="Chris Dziemborowicz" UpgradeCode="f1d002c9-cfc9-40fb-84af-96e7aec26e0b" IconSourceFile="$(var.Hourglass.ProjectDir)Resources\AppIcon.ico">
5-
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
6-
<bal:WixStandardBootstrapperApplication LicenseFile="MIT.rtf" LogoFile="Logo.png"/>
7-
</BootstrapperApplicationRef>
8-
<Chain>
9-
<PackageGroupRef Id="NetFx40ClientWeb"/>
10-
<MsiPackage Id="HourglassSetup" SourceFile="$(var.Hourglass.Setup.TargetPath)"/>
11-
</Chain>
12-
</Bundle>
5+
<Bundle Name="Hourglass"
6+
Version="1.10.0.0"
7+
Manufacturer="Chris Dziemborowicz"
8+
UpgradeCode="f1d002c9-cfc9-40fb-84af-96e7aec26e0b"
9+
IconSourceFile="$(var.Hourglass.ProjectDir)Resources\AppIcon.ico">
10+
11+
<!-- Specify a "sensible default" install location -->
12+
<Variable Name="InstallFolder" Type="string" Value="[ProgramFilesFolder]Hourglass" />
13+
14+
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
15+
<bal:WixStandardBootstrapperApplication LicenseFile="MIT.rtf" LogoFile="Logo.png" />
16+
</BootstrapperApplicationRef>
17+
<Chain>
18+
<PackageGroupRef Id="NetFx40ClientWeb" />
19+
<MsiPackage Id="HourglassSetup" SourceFile="$(var.Hourglass.Setup.TargetPath)">
20+
<!-- Pass this selection down to the Hourglass.Setup msi -->
21+
<MsiProperty Name="APPLICATIONFOLDER" Value="[InstallFolder]" />
22+
</MsiPackage>
23+
</Chain>
24+
</Bundle>
1325
</Wix>

Hourglass.Bundle/MIT.rtf

0 Bytes
Binary file not shown.

Hourglass.Setup/Product.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
33
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
4-
<Product Id="*" Name="Hourglass" Language="1033" Version="1.9.0.0" Manufacturer="Chris Dziemborowicz" UpgradeCode="172d3713-8820-4374-8195-3e2374e7724f">
4+
<Product Id="*" Name="Hourglass" Language="1033" Version="1.10.0.0" Manufacturer="Chris Dziemborowicz" UpgradeCode="172d3713-8820-4374-8195-3e2374e7724f">
55
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>
66

77
<Icon Id="AppIcon.exe" SourceFile="$(var.Hourglass.ProjectDir)Resources\AppIcon.ico"/>

Hourglass.Test/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
[assembly: AssemblyConfiguration("")]
1313
[assembly: AssemblyCompany("")]
1414
[assembly: AssemblyProduct("Hourglass.Test")]
15-
[assembly: AssemblyCopyright("Copyright © 2017 Chris Dziemborowicz")]
15+
[assembly: AssemblyCopyright("Copyright © 2018 Chris Dziemborowicz")]
1616
[assembly: AssemblyTrademark("")]
1717
[assembly: AssemblyCulture("")]
1818
[assembly: ComVisible(false)]
1919
[assembly: Guid("002a4be7-7323-4bf9-ab08-5fc8978d9eb0")]
20-
[assembly: AssemblyVersion("1.9.0.0")]
21-
[assembly: AssemblyFileVersion("1.9.0.0")]
20+
[assembly: AssemblyVersion("1.10.0.0")]
21+
[assembly: AssemblyFileVersion("1.10.0.0")]

Hourglass/CommandLineArguments.cs

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ public static string Usage
159159
/// </summary>
160160
public Rect WindowBounds { get; private set; }
161161

162+
/// <summary>
163+
/// Gets a value indicating whether the user interface should be locked, preventing the user from taking any
164+
/// action until the timer expires.
165+
/// </summary>
166+
public bool LockInterface { get; private set; }
167+
162168
#endregion
163169

164170
#region Public Methods
@@ -224,7 +230,8 @@ public TimerOptions GetTimerOptions()
224230
Sound = this.Sound,
225231
LoopSound = this.LoopSound,
226232
WindowTitleMode = this.WindowTitleMode,
227-
WindowSize = this.GetWindowSize()
233+
WindowSize = this.GetWindowSize(),
234+
LockInterface = this.LockInterface
228235
};
229236
}
230237

@@ -274,7 +281,8 @@ private static CommandLineArguments GetArgumentsFromMostRecentOptions()
274281
WindowTitleMode = options.WindowTitleMode,
275282
WindowState = windowSize.WindowState != WindowState.Minimized ? windowSize.WindowState : windowSize.RestoreWindowState,
276283
RestoreWindowState = windowSize.RestoreWindowState,
277-
WindowBounds = windowSize.RestoreBounds
284+
WindowBounds = windowSize.RestoreBounds,
285+
LockInterface = options.LockInterface
278286
};
279287
}
280288

@@ -310,7 +318,8 @@ private static CommandLineArguments GetArgumentsFromFactoryDefaults()
310318
WindowTitleMode = WindowTitleMode.ApplicationName,
311319
WindowState = defaultOptions.WindowSize.WindowState,
312320
RestoreWindowState = defaultOptions.WindowSize.RestoreWindowState,
313-
WindowBounds = defaultWindowBoundsWithLocation
321+
WindowBounds = defaultWindowBoundsWithLocation,
322+
LockInterface = defaultOptions.LockInterface
314323
};
315324
}
316325

@@ -575,6 +584,18 @@ private static CommandLineArguments GetCommandLineArguments(IEnumerable<string>
575584
argumentsBasedOnFactoryDefaults.WindowBounds = argumentsBasedOnFactoryDefaults.WindowBounds.Merge(windowBounds);
576585
break;
577586

587+
case "--lock-interface":
588+
case "-z":
589+
ThrowIfDuplicateSwitch(specifiedSwitches, "--lock-interface");
590+
591+
bool lockInterface = GetBoolValue(
592+
arg,
593+
remainingArgs);
594+
595+
argumentsBasedOnMostRecentOptions.LockInterface = lockInterface;
596+
argumentsBasedOnFactoryDefaults.LockInterface = lockInterface;
597+
break;
598+
578599
case "--use-factory-defaults":
579600
case "-d":
580601
ThrowIfDuplicateSwitch(specifiedSwitches, "--use-factory-defaults");

Hourglass/Managers/TimerManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public override void Persist()
8484
{
8585
Settings.Default.Timers = this.timers
8686
.Where(t => t.State != TimerState.Stopped && t.State != TimerState.Expired)
87+
.Where(t => !t.Options.LockInterface)
8788
.Take(MaxSavedTimers)
8889
.ToList();
8990
}

Hourglass/Managers/TimerOptionsManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ orderby window.Menu.LastShowed descending
8585
// Never save a title
8686
this.mostRecentOptions.Title = string.Empty;
8787

88-
// Never save shutting down when expired
88+
// Never save shutting down when expired or lock interface options
8989
this.mostRecentOptions.ShutDownWhenExpired = false;
90+
this.mostRecentOptions.LockInterface = false;
9091
}
9192
}
9293
}

Hourglass/Parsing/DateTimeToken.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public override DateTime GetEndTime(DateTime startTime)
7676
dateTime = this.TimeToken.ToDateTime(startTime, datePart);
7777
}
7878

79-
if (dateTime <= startTime)
79+
if (dateTime < startTime)
8080
{
8181
throw new InvalidOperationException();
8282
}

Hourglass/Parsing/TimeSpanToken.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public override DateTime GetEndTime(DateTime startTime)
9090
endTime = endTime.AddMonths(this.Months);
9191
endTime = endTime.AddYears(this.Years);
9292

93-
if (endTime <= startTime)
93+
if (endTime < startTime)
9494
{
9595
throw new InvalidOperationException();
9696
}

Hourglass/Properties/App.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3-
<assemblyIdentity version="1.9.0.0" name="Hourglass"/>
3+
<assemblyIdentity version="1.10.0.0" name="Hourglass"/>
44
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
55
<security>
66
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">

0 commit comments

Comments
 (0)