Skip to content

Commit

Permalink
Release v1.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dziemborowicz committed Dec 13, 2021
2 parents 96a6169 + 7e21647 commit 21589c7
Show file tree
Hide file tree
Showing 17 changed files with 73 additions and 42 deletions.
4 changes: 2 additions & 2 deletions Hourglass.Bundle/Bundle.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="Hourglass"
Version="1.14.0.0"
Version="1.15.0.0"
Manufacturer="Chris Dziemborowicz"
UpgradeCode="f1d002c9-cfc9-40fb-84af-96e7aec26e0b"
IconSourceFile="$(var.Hourglass.ProjectDir)Resources\AppIcon.ico">
Expand All @@ -15,7 +15,7 @@
<bal:WixStandardBootstrapperApplication LicenseFile="MIT.rtf" LogoFile="Logo.png" />
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id="NetFx45Web" />
<PackageGroupRef Id="NetFx48Web" />
<MsiPackage Id="HourglassSetup" SourceFile="$(var.Hourglass.Setup.TargetPath)">
<!-- Pass this selection down to the Hourglass.Setup msi -->
<MsiProperty Name="APPLICATIONFOLDER" Value="[InstallFolder]" />
Expand Down
2 changes: 1 addition & 1 deletion Hourglass.Setup/Product.wxs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<Product Id="*" Name="Hourglass" Language="1033" Version="1.14.0.0" Manufacturer="Chris Dziemborowicz" UpgradeCode="172d3713-8820-4374-8195-3e2374e7724f">
<Product Id="*" Name="Hourglass" Language="1033" Version="1.15.0.0" Manufacturer="Chris Dziemborowicz" UpgradeCode="172d3713-8820-4374-8195-3e2374e7724f">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>

<Icon Id="AppIcon.exe" SourceFile="$(var.Hourglass.ProjectDir)Resources\AppIcon.ico"/>
Expand Down
2 changes: 1 addition & 1 deletion Hourglass.Test/Hourglass.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Hourglass.Test</RootNamespace>
<AssemblyName>Hourglass.Test</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
Expand Down
4 changes: 2 additions & 2 deletions Hourglass.Test/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("002a4be7-7323-4bf9-ab08-5fc8978d9eb0")]
[assembly: AssemblyVersion("1.14.0.0")]
[assembly: AssemblyFileVersion("1.14.0.0")]
[assembly: AssemblyVersion("1.15.0.0")]
[assembly: AssemblyFileVersion("1.15.0.0")]
2 changes: 1 addition & 1 deletion Hourglass/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
<userSettings>
<Hourglass.Properties.Settings>
Expand Down
2 changes: 1 addition & 1 deletion Hourglass/Hourglass.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Hourglass</RootNamespace>
<AssemblyName>Hourglass</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile />
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Expand Down
2 changes: 1 addition & 1 deletion Hourglass/Properties/App.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<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">
<assemblyIdentity version="1.14.0.0" name="Hourglass"/>
<assemblyIdentity version="1.15.0.0" name="Hourglass"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
Expand Down
4 changes: 2 additions & 2 deletions Hourglass/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
[assembly: AssemblyCopyright("Copyright © 2021 Chris Dziemborowicz")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.14.0.0")]
[assembly: AssemblyFileVersion("1.14.0.0")]
[assembly: AssemblyVersion("1.15.0.0")]
[assembly: AssemblyFileVersion("1.15.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
[assembly: Guid("83DBAA61-6193-4288-BBB7-BEAEC33FE321")]
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
Expand Down
10 changes: 5 additions & 5 deletions Hourglass/Properties/Resources.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 Hourglass/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -888,12 +888,12 @@ $</value>
<value>_Pause</value>
<comment>The text for the pause button in the timer window, where the character following the optional underscore (_) is the access key</comment>
</data>
<data name="TimerWindowResetButtonContent" xml:space="preserve">
<value>_Reset</value>
<comment>The text for the reset button in the timer window, where the character following the optional underscore (_) is the access key</comment>
<data name="TimerWindowRestartButtonContent" xml:space="preserve">
<value>_Restart</value>
<comment>The text for the restart button in the timer window, where the character following the optional underscore (_) is the access key</comment>
</data>
<data name="TimerWindowResumeButtonContent" xml:space="preserve">
<value>_Resume</value>
<value>R_esume</value>
<comment>The text for the resume button in the timer window, where the character following the optional underscore (_) is the access key</comment>
</data>
<data name="TimerWindowStartButtonContent" xml:space="preserve">
Expand Down
2 changes: 1 addition & 1 deletion Hourglass/Properties/Settings.Designer.cs

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

2 changes: 1 addition & 1 deletion Hourglass/Resources/Usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Options:
Alias -b

--lock-interface on|off
Prevents the user from starting, pausing, resetting, or stopping the
Prevents the user from starting, pausing, stopping, or restarting the
timer, changing the timer options, or closing the timer window until the
timer expires.

Expand Down
27 changes: 27 additions & 0 deletions Hourglass/Timing/Timer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,14 @@ public bool SupportsProgress
get { return true; }
}

/// <summary>
/// Gets a value indicating whether the timer supports restarting.
/// </summary>
public bool SupportsRestart
{
get { return this.TimerStart != null && this.TimerStart.Type == TimerStartType.TimeSpan; }
}

/// <summary>
/// Gets a value indicating whether the timer supports displaying the elapsed time since the timer was started.
/// </summary>
Expand Down Expand Up @@ -259,6 +267,25 @@ public bool Start(TimerStart newTimerStart)
return false;
}

/// <summary>
/// Restarts the timer.
/// </summary>
/// <returns>A value indicating whether the timer was restarted successfully.</returns>
/// <exception cref="ObjectDisposedException">If the timer has been disposed.</exception>
public bool Restart()
{
this.ThrowIfDisposed();

TimerStart timerStart = this.timerStart;
if (timerStart != null && timerStart.Type == TimerStartType.TimeSpan)
{
this.Stop();
return this.Start(timerStart);
}

return false;
}

/// <summary>
/// Returns a string that represents the current object.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Hourglass/Windows/InterfaceScaler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void Bind(TimerWindow window)
this.timerWindow.PauseButton,
this.timerWindow.ResumeButton,
this.timerWindow.StopButton,
this.timerWindow.ResetButton,
this.timerWindow.RestartButton,
this.timerWindow.CloseButton,
this.timerWindow.CancelButton,
this.timerWindow.UpdateButton,
Expand Down
5 changes: 4 additions & 1 deletion Hourglass/Windows/SizeToFitTextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,16 @@ private double GetTextWidth()
this.FontWeight,
this.FontStretch);

double pixelsPerDip = VisualTreeHelper.GetDpi(this).PixelsPerDip;

FormattedText formattedText = new FormattedText(
this.Text,
CultureInfo.CurrentCulture,
this.FlowDirection,
typeface,
this.FontSize,
this.Foreground);
this.Foreground,
pixelsPerDip);

return formattedText.WidthIncludingTrailingWhitespace;
}
Expand Down
11 changes: 6 additions & 5 deletions Hourglass/Windows/TimerWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<CommandBinding Command="local:TimerWindow.ResumeCommand" Executed="ResumeCommandExecuted"/>
<CommandBinding Command="local:TimerWindow.PauseResumeCommand" Executed="PauseResumeCommandExecuted"/>
<CommandBinding Command="local:TimerWindow.StopCommand" Executed="StopCommandExecuted"/>
<CommandBinding Command="local:TimerWindow.ResetCommand" Executed="ResetCommandExecuted"/>
<CommandBinding Command="local:TimerWindow.RestartCommand" Executed="RestartCommandExecuted"/>
<CommandBinding Command="local:TimerWindow.CloseCommand" Executed="CloseCommandExecuted"/>
<CommandBinding Command="local:TimerWindow.CancelCommand" Executed="CancelCommandExecuted"/>
<CommandBinding Command="local:TimerWindow.UpdateCommand" Executed="UpdateCommandExecuted"/>
Expand All @@ -22,6 +22,7 @@
<KeyBinding Command="local:TimerWindow.PauseResumeCommand" Gesture="Space"/>
<KeyBinding Command="local:TimerWindow.PauseResumeCommand" Gesture="Ctrl+P"/>
<KeyBinding Command="local:TimerWindow.StopCommand" Gesture="Ctrl+S"/>
<KeyBinding Command="local:TimerWindow.RestartCommand" Gesture="Ctrl+R"/>
<KeyBinding Command="local:TimerWindow.EscapeCommand" Gesture="Esc"/>
<KeyBinding Command="local:TimerWindow.FullScreenCommand" Gesture="Alt+Enter"/>
</Window.InputBindings>
Expand Down Expand Up @@ -49,7 +50,7 @@
<Condition Binding="{Binding ElementName=PauseButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=ResumeButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=StopButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=ResetButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=RestartButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=CloseButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=CancelButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=UpdateButton, Path=IsFocused}" Value="False"/>
Expand Down Expand Up @@ -93,7 +94,7 @@
<Condition Binding="{Binding ElementName=PauseButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=ResumeButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=StopButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=ResetButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=RestartButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=CloseButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=CancelButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=UpdateButton, Path=IsFocused}" Value="False"/>
Expand Down Expand Up @@ -168,7 +169,7 @@
<Condition Binding="{Binding ElementName=PauseButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=ResumeButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=StopButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=ResetButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=RestartButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=CloseButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=CancelButton, Path=IsFocused}" Value="False"/>
<Condition Binding="{Binding ElementName=UpdateButton, Path=IsFocused}" Value="False"/>
Expand Down Expand Up @@ -243,7 +244,7 @@
<Button x:Name="PauseButton" Command="local:TimerWindow.PauseCommand" MouseEnter="ButtonMouseEnter" MouseLeave="ButtonMouseLeave"/>
<Button x:Name="ResumeButton" Command="local:TimerWindow.ResumeCommand" MouseEnter="ButtonMouseEnter" MouseLeave="ButtonMouseLeave"/>
<Button x:Name="StopButton" Command="local:TimerWindow.StopCommand" MouseEnter="ButtonMouseEnter" MouseLeave="ButtonMouseLeave"/>
<Button x:Name="ResetButton" Command="local:TimerWindow.ResetCommand" MouseEnter="ButtonMouseEnter" MouseLeave="ButtonMouseLeave"/>
<Button x:Name="RestartButton" Command="local:TimerWindow.RestartCommand" MouseEnter="ButtonMouseEnter" MouseLeave="ButtonMouseLeave"/>
<Button x:Name="CloseButton" Command="local:TimerWindow.CloseCommand" MouseEnter="ButtonMouseEnter" MouseLeave="ButtonMouseLeave"/>
<Button x:Name="CancelButton" Command="local:TimerWindow.CancelCommand" MouseEnter="ButtonMouseEnter" MouseLeave="ButtonMouseLeave"/>
<Button x:Name="UpdateButton" Command="local:TimerWindow.UpdateCommand" MouseEnter="ButtonMouseEnter" MouseLeave="ButtonMouseLeave"/>
Expand Down
Loading

0 comments on commit 21589c7

Please sign in to comment.