Чаще проверяем обновления, не спамим про актуальную версию в лог.

This commit is contained in:
Danil Kislov
2019-03-20 09:31:12 +03:00
parent 87ef6551e0
commit fd350ef43d
3 changed files with 38 additions and 36 deletions
+1 -1
View File
@@ -1 +1 @@
1.0.23 1.0.24
+31 -31
View File
@@ -1,31 +1,31 @@
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("JiraTimeBot")] [assembly: AssemblyTitle("JiraTimeBot")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JiraTimeBot")] [assembly: AssemblyProduct("JiraTimeBot")]
[assembly: AssemblyCopyright("Copyright © 2019")] [assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible // 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 // to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type. // COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM // The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")] [assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")]
// Version information for an assembly consists of the following four values: // Version information for an assembly consists of the following four values:
// //
// Major Version // Major Version
// Minor Version // Minor Version
// Build Number // Build Number
// Revision // Revision
// //
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.23")] [assembly: AssemblyVersion("1.0.24")]
[assembly: AssemblyFileVersion("1.0.23")] [assembly: AssemblyFileVersion("1.0.24")]
[assembly: AssemblyInformationalVersion("1.0.23")] [assembly: AssemblyInformationalVersion("1.0.24")]
+6 -4
View File
@@ -29,6 +29,7 @@ namespace JiraTimeBot.UI
private Settings _settings; private Settings _settings;
private readonly Action _settingsWindowShow; private readonly Action _settingsWindowShow;
private readonly Action<string> _settingsErrorReporter; private readonly Action<string> _settingsErrorReporter;
private bool _updateChecked;
private CancellationTokenSource GetTokenSource() private CancellationTokenSource GetTokenSource()
{ {
@@ -61,7 +62,6 @@ namespace JiraTimeBot.UI
var frmSettings = new frmSettings(); var frmSettings = new frmSettings();
frmSettings.ShowDialog(this); frmSettings.ShowDialog(this);
}; };
_settingsErrorReporter = msg => MessageBox.Show(msg, "Загрузка настроек", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);; _settingsErrorReporter = msg => MessageBox.Show(msg, "Загрузка настроек", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);;
} }
@@ -200,7 +200,9 @@ namespace JiraTimeBot.UI
{ {
try try
{ {
tmrUpdate.Interval = 8 * 60 * 60 * 1000; var firstTime = !_updateChecked;
_updateChecked = true;
tmrUpdate.Interval = 1 * 60 * 60 * 1000;
var checker = new UpdateChecker(); var checker = new UpdateChecker();
var release = checker.GetRelease(); var release = checker.GetRelease();
@@ -231,9 +233,9 @@ namespace JiraTimeBot.UI
tmrUpdate.Enabled = false; tmrUpdate.Enabled = false;
} }
} }
else else if (firstTime)
{ {
_log.Info($"Вы используете последнюю версию."); _log.Info($"Вы используете актуальную версию.");
} }
} }
catch (Exception ex) catch (Exception ex)