From ac486bbcee01e68f63e4e3128a7e38c8ad2b0915 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Tue, 18 Aug 2015 09:00:26 +0200 Subject: [PATCH] Add add-in name and version to application caption. --- zaaReloaded2/ThisAddIn.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/zaaReloaded2/ThisAddIn.cs b/zaaReloaded2/ThisAddIn.cs index f3899c2..5838ea0 100755 --- a/zaaReloaded2/ThisAddIn.cs +++ b/zaaReloaded2/ThisAddIn.cs @@ -49,6 +49,14 @@ namespace zaaReloaded2 { Bovender.ExceptionHandler.CentralHandler.ManageExceptionCallback += CentralHandler_ManageExceptionCallback; CheckForUpdates(); + _oldCaption = Globals.ThisAddIn.Application.Caption; + Globals.ThisAddIn.Application.Caption = + String.Format( + "{0} ({1} {2})", + _oldCaption, + Properties.Settings.Default.AddinName, + Updater.Version.CurrentVersion().ToString() + ); } private void ThisAddIn_Shutdown(object sender, System.EventArgs e) @@ -58,6 +66,11 @@ namespace zaaReloaded2 if (_updaterVM.InstallUpdateCommand.CanExecute(null)) _updaterVM.InstallUpdateCommand.Execute(null); } + try + { + Globals.ThisAddIn.Application.Caption = _oldCaption; + } + catch { } } #region Properties @@ -126,6 +139,7 @@ namespace zaaReloaded2 Ribbon _ribbon; UpdaterViewModel _updaterVM; + string _oldCaption; #endregion