From fd350ef43def45ddc3cd3a9173e2e384f1db8057 Mon Sep 17 00:00:00 2001 From: Danil Kislov Date: Wed, 20 Mar 2019 09:31:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A7=D0=B0=D1=89=D0=B5=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D1=8F=D0=B5=D0=BC=20=D0=BE=D0=B1=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F,=20=D0=BD=D0=B5=20=D1=81?= =?UTF-8?q?=D0=BF=D0=B0=D0=BC=D0=B8=D0=BC=20=D0=BF=D1=80=D0=BE=20=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D1=83=D0=B0=D0=BB=D1=8C=D0=BD=D1=83=D1=8E=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D1=81=D0=B8=D1=8E=20=D0=B2=20=D0=BB=D0=BE=D0=B3.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .semver.txt | 2 +- src/JiraTimeBot/Properties/AssemblyInfo.cs | 62 +++++++++++----------- src/JiraTimeBot/UI/frmMain.cs | 10 ++-- 3 files changed, 38 insertions(+), 36 deletions(-) diff --git a/.semver.txt b/.semver.txt index 154b9fc..79728fe 100644 --- a/.semver.txt +++ b/.semver.txt @@ -1 +1 @@ -1.0.23 +1.0.24 diff --git a/src/JiraTimeBot/Properties/AssemblyInfo.cs b/src/JiraTimeBot/Properties/AssemblyInfo.cs index c30c8b4..8e5e9dd 100644 --- a/src/JiraTimeBot/Properties/AssemblyInfo.cs +++ b/src/JiraTimeBot/Properties/AssemblyInfo.cs @@ -1,31 +1,31 @@ -using System.Reflection; -using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("JiraTimeBot")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("JiraTimeBot")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.23")] -[assembly: AssemblyFileVersion("1.0.23")] -[assembly: AssemblyInformationalVersion("1.0.23")] +using System.Reflection; +using System.Runtime.InteropServices; +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("JiraTimeBot")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("JiraTimeBot")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")] +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.24")] +[assembly: AssemblyFileVersion("1.0.24")] +[assembly: AssemblyInformationalVersion("1.0.24")] diff --git a/src/JiraTimeBot/UI/frmMain.cs b/src/JiraTimeBot/UI/frmMain.cs index 6a4e421..97e22fc 100644 --- a/src/JiraTimeBot/UI/frmMain.cs +++ b/src/JiraTimeBot/UI/frmMain.cs @@ -29,6 +29,7 @@ namespace JiraTimeBot.UI private Settings _settings; private readonly Action _settingsWindowShow; private readonly Action _settingsErrorReporter; + private bool _updateChecked; private CancellationTokenSource GetTokenSource() { @@ -61,7 +62,6 @@ namespace JiraTimeBot.UI var frmSettings = new frmSettings(); frmSettings.ShowDialog(this); }; - _settingsErrorReporter = msg => MessageBox.Show(msg, "Загрузка настроек", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);; } @@ -200,7 +200,9 @@ namespace JiraTimeBot.UI { try { - tmrUpdate.Interval = 8 * 60 * 60 * 1000; + var firstTime = !_updateChecked; + _updateChecked = true; + tmrUpdate.Interval = 1 * 60 * 60 * 1000; var checker = new UpdateChecker(); var release = checker.GetRelease(); @@ -231,9 +233,9 @@ namespace JiraTimeBot.UI tmrUpdate.Enabled = false; } } - else + else if (firstTime) { - _log.Info($"Вы используете последнюю версию."); + _log.Info($"Вы используете актуальную версию."); } } catch (Exception ex)