File tree 6 files changed +27
-15
lines changed
Hourglass.Test/Properties
6 files changed +27
-15
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<Wix xmlns =" http://schemas.microsoft.com/wix/2006/wi"
3
3
xmlns : bal =" http://schemas.microsoft.com/wix/BalExtension" >
4
- <Bundle Name =" Hourglass" Version =" 1.2 .0.0" Manufacturer =" Chris Dziemborowicz" UpgradeCode =" f1d002c9-cfc9-40fb-84af-96e7aec26e0b" IconSourceFile =" $(var.Hourglass.ProjectDir)Resources\AppIcon.ico" >
4
+ <Bundle Name =" Hourglass" Version =" 1.3 .0.0" Manufacturer =" Chris Dziemborowicz" UpgradeCode =" f1d002c9-cfc9-40fb-84af-96e7aec26e0b" IconSourceFile =" $(var.Hourglass.ProjectDir)Resources\AppIcon.ico" >
5
5
<BootstrapperApplicationRef Id =" WixStandardBootstrapperApplication.RtfLicense" >
6
6
<bal : WixStandardBootstrapperApplication LicenseFile =" MIT.rtf" LogoFile =" Logo.png" />
7
7
</BootstrapperApplicationRef >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<Wix xmlns =" http://schemas.microsoft.com/wix/2006/wi"
3
3
xmlns : netfx =" http://schemas.microsoft.com/wix/NetFxExtension" >
4
- <Product Id =" *" Name =" Hourglass" Language =" 1033" Version =" 1.2 .0.0" Manufacturer =" Chris Dziemborowicz" UpgradeCode =" 172d3713-8820-4374-8195-3e2374e7724f" >
4
+ <Product Id =" *" Name =" Hourglass" Language =" 1033" Version =" 1.3 .0.0" Manufacturer =" Chris Dziemborowicz" UpgradeCode =" 172d3713-8820-4374-8195-3e2374e7724f" >
5
5
<Package InstallerVersion =" 200" Compressed =" yes" InstallScope =" perMachine" />
6
6
7
7
<Icon Id =" AppIcon.exe" SourceFile =" $(var.Hourglass.ProjectDir)Resources\AppIcon.ico" />
Original file line number Diff line number Diff line change 17
17
[ assembly: AssemblyCulture ( "" ) ]
18
18
[ assembly: ComVisible ( false ) ]
19
19
[ assembly: Guid ( "002a4be7-7323-4bf9-ab08-5fc8978d9eb0" ) ]
20
- [ assembly: AssemblyVersion ( "1.2 .0.0" ) ]
21
- [ assembly: AssemblyFileVersion ( "1.2 .0.0" ) ]
20
+ [ assembly: AssemblyVersion ( "1.3 .0.0" ) ]
21
+ [ assembly: AssemblyFileVersion ( "1.3 .0.0" ) ]
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<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.2 .0.0" name =" Hourglass" />
3
+ <assemblyIdentity version =" 1.3 .0.0" name =" Hourglass" />
4
4
<trustInfo xmlns =" urn:schemas-microsoft-com:asm.v2" >
5
5
<security >
6
6
<requestedPrivileges xmlns =" urn:schemas-microsoft-com:asm.v3" >
Original file line number Diff line number Diff line change 17
17
[ assembly: AssemblyCopyright ( "Copyright © 2015 Chris Dziemborowicz" ) ]
18
18
[ assembly: AssemblyTrademark ( "" ) ]
19
19
[ assembly: AssemblyCulture ( "" ) ]
20
- [ assembly: AssemblyVersion ( "1.2 .0.0" ) ]
21
- [ assembly: AssemblyFileVersion ( "1.2 .0.0" ) ]
20
+ [ assembly: AssemblyVersion ( "1.3 .0.0" ) ]
21
+ [ assembly: AssemblyFileVersion ( "1.3 .0.0" ) ]
22
22
[ assembly: NeutralResourcesLanguageAttribute ( "en-US" ) ]
23
23
[ assembly: Guid ( "83DBAA61-6193-4288-BBB7-BEAEC33FE321" ) ]
24
24
[ assembly: ThemeInfo ( ResourceDictionaryLocation . None , ResourceDictionaryLocation . SourceAssembly ) ]
Original file line number Diff line number Diff line change @@ -470,18 +470,30 @@ public void Show(Timer existingTimer)
470
470
/// <summary>
471
471
/// Brings the window to the front.
472
472
/// </summary>
473
- public void BringToFront ( )
473
+ /// <returns><c>true</c> if the window is brought to the foreground, or <c>false</c> if the window cannot be
474
+ /// brought to the foreground for any reason.</returns>
475
+ public bool BringToFront ( )
474
476
{
475
- this . Show ( ) ;
477
+ try
478
+ {
479
+ this . Show ( ) ;
480
+
481
+ if ( this . WindowState == WindowState . Minimized )
482
+ {
483
+ this . WindowState = this . RestoreWindowState ;
484
+ }
485
+
486
+ this . Topmost = false ;
487
+ this . Topmost = true ;
488
+ this . Topmost = this . Options . AlwaysOnTop ;
476
489
477
- if ( this . WindowState == WindowState . Minimized )
490
+ return true ;
491
+ }
492
+ catch ( InvalidOperationException )
478
493
{
479
- this . WindowState = this . RestoreWindowState ;
494
+ // This happens if the window is closing (waiting for the user to confirm) when this method is called
495
+ return false ;
480
496
}
481
-
482
- this . Topmost = false ;
483
- this . Topmost = true ;
484
- this . Topmost = this . Options . AlwaysOnTop ;
485
497
}
486
498
487
499
/// <summary>
You can’t perform that action at this time.
0 commit comments