Add add-in name and version to application caption.

This commit is contained in:
Daniel Kraus 2015-08-18 09:00:26 +02:00
parent 94ebf5508b
commit ac486bbcee

View File

@ -49,6 +49,14 @@ namespace zaaReloaded2
{ {
Bovender.ExceptionHandler.CentralHandler.ManageExceptionCallback += CentralHandler_ManageExceptionCallback; Bovender.ExceptionHandler.CentralHandler.ManageExceptionCallback += CentralHandler_ManageExceptionCallback;
CheckForUpdates(); 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) private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
@ -58,6 +66,11 @@ namespace zaaReloaded2
if (_updaterVM.InstallUpdateCommand.CanExecute(null)) if (_updaterVM.InstallUpdateCommand.CanExecute(null))
_updaterVM.InstallUpdateCommand.Execute(null); _updaterVM.InstallUpdateCommand.Execute(null);
} }
try
{
Globals.ThisAddIn.Application.Caption = _oldCaption;
}
catch { }
} }
#region Properties #region Properties
@ -126,6 +139,7 @@ namespace zaaReloaded2
Ribbon _ribbon; Ribbon _ribbon;
UpdaterViewModel _updaterVM; UpdaterViewModel _updaterVM;
string _oldCaption;
#endregion #endregion