From 7f8d418086e62117e51733d82a92709d5d6ed6cb Mon Sep 17 00:00:00 2001 From: Mike Williams-UK Date: Thu, 12 Oct 2023 08:33:50 +0000 Subject: [PATCH] Merged PR 651: V3.3.2 Beta 2 ## Before submitting this PR for code review, please make sure: - [X] "Describe the changes being made to the code and why" above has been replaced - [X] All new files have the standard license headers - [X] CodeMaid has been run against all new or updated files - [X] The code builds clean (please check Debug and Setup configurations) without any errors or new warnings - [X] All NuGet packages have been updated and /README.md updated - [X] All Unit Tests pass - [X] You have followed the [Chem4Word Coding Standards](https://chem4word.visualstudio.com/C4W-VNext/_wiki/wikis/C4W-VNext.wiki/2/Coding-Standards) - [X] You have updated the change history (/src/Chem4Word.V3/Data/Chem4Word-Versions.xml) - [X] If appropriate you have updated the manual (/docs/Chem4Word-Version3-3-User-Manual.docx) - [X] The build pipeline is green Related work items: #1053 --- src/Chem4Word.V3/Chem4WordV3.cs | 12 +++---- src/Chem4Word.V3/Data/Chem4Word-Versions.xml | 13 ++++++-- src/Chem4Word.V3/Data/This-Version.xml | 4 +-- .../Helpers/CustomXMLPartHelper.cs | 2 +- src/Chem4Word.V3/Helpers/ReferenceKeeper.cs | 12 +++++-- src/Chem4Word.V3/Helpers/UpdateHelper.cs | 8 ++--- src/Chem4Word.V3/Helpers/Upgrader.cs | 2 +- src/Chem4Word.V3/Properties/AssemblyInfo.cs | 4 +-- .../Ribbon/Chem4WordRibbon.Designer.cs | 3 +- src/Chem4Word.V3/Ribbon/Chem4WordRibbon.cs | 31 +++++++++++++------ .../Chem4Word.ACME/EditController.cs | 4 +-- .../Chem4Word.ACME/Properties/AssemblyInfo.cs | 4 +-- .../Converters/MDL/CtabProcessor.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 +-- .../Properties/AssemblyInfo.cs | 4 +-- .../Chem4Word.Core/Helpers/FileHelper.cs | 2 +- .../Chem4Word.Core/Properties/AssemblyInfo.cs | 4 +-- .../AzureServiceBusWriter.cs | 4 +-- .../Properties/AssemblyInfo.cs | 4 +-- .../Chem4Word.Telemetry/SystemHelper.cs | 8 ++--- .../Chem4Word.Telemetry/TelemetryWriter.cs | 6 ++-- .../Chem4WordSetup/Properties/AssemblyInfo.cs | 4 +-- src/Installer/Chem4WordSetup/Setup.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 +-- .../Properties/AssemblyInfo.cs | 4 +-- src/Installer/WiXInstaller/Product.wxs | 2 +- .../WiXInstaller/WiX-Installer.wixproj | 2 +- src/Notes/Releases.txt | 3 +- .../Contracts/Properties/AssemblyInfo.cs | 4 +-- .../Properties/AssemblyInfo.cs | 6 ++-- .../Properties/AssemblyInfo.cs | 6 ++-- .../Properties/AssemblyInfo.cs | 4 +-- .../Properties/AssemblyInfo.cs | 4 +-- .../Properties/AssemblyInfo.cs | 4 +-- .../OoXmlV4/Properties/AssemblyInfo.cs | 4 +-- .../Properties/AssemblyInfo.cs | 4 +-- .../Properties/AssemblyInfo.cs | 4 +-- .../Properties/AssemblyInfo.cs | 4 +-- .../Properties/AssemblyInfo.cs | 4 +-- src/Scripts/Sign-Files.cmd | 2 +- .../Properties/AssemblyInfo.cs | 6 ++-- .../WinForms.TestHarness/MainForm.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 +-- .../ComboBoxAndTreeViewStyles.xaml.cs | 4 +-- .../Wpf.UI.Sandbox/Properties/AssemblyInfo.cs | 6 ++-- src/UnitTests/Properties/AssemblyInfo.cs | 4 +-- 46 files changed, 132 insertions(+), 102 deletions(-) diff --git a/src/Chem4Word.V3/Chem4WordV3.cs b/src/Chem4Word.V3/Chem4WordV3.cs index 3c09ba3..953d7e3 100644 --- a/src/Chem4Word.V3/Chem4WordV3.cs +++ b/src/Chem4Word.V3/Chem4WordV3.cs @@ -73,6 +73,7 @@ public partial class Chem4WordV3 public bool OptionsReloadRequired = false; private ConfigWatcher _configWatcher; + private ReferenceKeeper _keeper; public bool LibraryState; @@ -198,8 +199,6 @@ public static void SetGlobalRibbon(CustomRibbon ribbon) Ribbon = ribbon; } - private ReferenceKeeper _keeper; - private void C4WAddIn_Startup(object sender, EventArgs e) { var module = $"{MethodBase.GetCurrentMethod().Name}()"; @@ -213,7 +212,7 @@ private void C4WAddIn_Startup(object sender, EventArgs e) var cmd = Environment.CommandLine.ToLower(); if (Ribbon != null && !cmd.Contains("-embedding")) { - var message = $"{module} started at {SafeDate.ToLongDate(DateTime.Now)}"; + var message = $"{module} started at {SafeDate.ToLongDate(DateTime.UtcNow)}"; Debug.WriteLine(message); StartUpTimings.Add(message); @@ -293,7 +292,7 @@ private void SlowOperations() try { - var message = $"{module} started at {SafeDate.ToLongDate(DateTime.Now)}"; + var message = $"{module} started at {SafeDate.ToLongDate(DateTime.UtcNow)}"; Debug.WriteLine(message); StartUpTimings.Add(message); @@ -639,7 +638,8 @@ private void PerformShutDownActions() } } - _configWatcher.Dispose(); + _configWatcher?.Dispose(); + _keeper?.Dispose(); GC.Collect(); GC.WaitForPendingFinalizers(); @@ -694,7 +694,7 @@ private void LoadPlugIns(bool mustBeSigned) { var module = $"{MethodBase.GetCurrentMethod().Name}()"; // http://www.codeproject.com/Articles/453778/Loading-Assemblies-from-Anywhere-into-a-New-AppDom - var message = $"{module} started at {SafeDate.ToLongDate(DateTime.Now)}"; + var message = $"{module} started at {SafeDate.ToLongDate(DateTime.UtcNow)}"; StartUpTimings.Add(message); Debug.WriteLine(message); diff --git a/src/Chem4Word.V3/Data/Chem4Word-Versions.xml b/src/Chem4Word.V3/Data/Chem4Word-Versions.xml index 6f780c8..32b3bb3 100644 --- a/src/Chem4Word.V3/Data/Chem4Word-Versions.xml +++ b/src/Chem4Word.V3/Data/Chem4Word-Versions.xml @@ -2,6 +2,16 @@ f3c4f4db-2fff-46db-b14a-feb8e09f7742 + + 3.3.2 Beta 2 + true + 12-Oct-2023 + + Ensure Help button is never disabled. + Add SketchEl file format support. + + https://www.chem4word.co.uk/files3-3/Chem4Word-Setup.3.3.2.Beta.2.msi + 3.3.1 Beta 1 true @@ -12,8 +22,8 @@ Fix Right Click Convert to chemistry issues Fix Windows 11 detection issue Update user manual + Private Beta of Chem4Word 2023 (V3.3) - https://www.chem4word.co.uk/files3-3/Chem4Word-Setup.3.3.1.Beta.1.msi 3.3.0 Alpha 0 @@ -32,7 +42,6 @@ Add new Plug-In type (Driver) to manage multiple libraries Add new converter to model which reads/writes byte[] from Google protocol buffer of model Private Alpha of Chem4Word 2023 (V3.3) - Please download Chem4Word-Setup.exe via https://www.chem4word.co.uk/download/ if you encounter any difficulties updating 31-Dec-2345 diff --git a/src/Chem4Word.V3/Data/This-Version.xml b/src/Chem4Word.V3/Data/This-Version.xml index 18f3a0a..c732f0e 100644 --- a/src/Chem4Word.V3/Data/This-Version.xml +++ b/src/Chem4Word.V3/Data/This-Version.xml @@ -1,6 +1,6 @@  - 3.3.1 Beta 1 + 3.3.2 Beta 2 true - 04-Oct-2023 + 12-Oct-2023 \ No newline at end of file diff --git a/src/Chem4Word.V3/Helpers/CustomXMLPartHelper.cs b/src/Chem4Word.V3/Helpers/CustomXMLPartHelper.cs index d5d1f3d..2f2fb76 100644 --- a/src/Chem4Word.V3/Helpers/CustomXMLPartHelper.cs +++ b/src/Chem4Word.V3/Helpers/CustomXMLPartHelper.cs @@ -145,7 +145,7 @@ public static void RemoveOrphanedXmlParts(Word.Document document) try { var guid = Guid.NewGuid().ToString("N"); - var timestamp = DateTime.Now.ToString("yyyyMMdd-HHmmss", CultureInfo.InvariantCulture); + var timestamp = DateTime.UtcNow.ToString("yyyyMMdd-HHmmss", CultureInfo.InvariantCulture); var fileName = Path.Combine(backupFolder, $"Chem4Word-Orphaned-Structure-{timestamp}-{guid}.cml"); File.WriteAllText(fileName, XmlHelper.AddHeader(customXmlPart.XML)); diff --git a/src/Chem4Word.V3/Helpers/ReferenceKeeper.cs b/src/Chem4Word.V3/Helpers/ReferenceKeeper.cs index 878940c..1401ed5 100644 --- a/src/Chem4Word.V3/Helpers/ReferenceKeeper.cs +++ b/src/Chem4Word.V3/Helpers/ReferenceKeeper.cs @@ -6,19 +6,27 @@ // --------------------------------------------------------------------------- using Azure.Messaging.ServiceBus; +using System; namespace Chem4Word.Helpers { /// /// The sole purpose of this class is to keep references to assemblies which may only be used in supporting assemblies /// - public class ReferenceKeeper + public class ReferenceKeeper : IDisposable { private ServiceBusClient ServiceBusClient { get; } + private Guid _objectId; + public ReferenceKeeper() { - // Nothing to do here ... + _objectId = Guid.NewGuid(); + } + + public void Dispose() + { + // } } } \ No newline at end of file diff --git a/src/Chem4Word.V3/Helpers/UpdateHelper.cs b/src/Chem4Word.V3/Helpers/UpdateHelper.cs index ec2d213..2462b97 100644 --- a/src/Chem4Word.V3/Helpers/UpdateHelper.cs +++ b/src/Chem4Word.V3/Helpers/UpdateHelper.cs @@ -120,12 +120,12 @@ public static void ReadSavedValues() } catch { - Globals.Chem4WordV3.VersionLastChecked = DateTime.Now.AddDays(-30); + Globals.Chem4WordV3.VersionLastChecked = DateTime.UtcNow.AddDays(-30); } } else { - Globals.Chem4WordV3.VersionLastChecked = DateTime.Now.AddDays(-30); + Globals.Chem4WordV3.VersionLastChecked = DateTime.UtcNow.AddDays(-30); } if (names.Contains(Constants.RegistryValueNameVersionsBehind)) @@ -200,7 +200,7 @@ public static void ReadSavedValues() } else { - Globals.Chem4WordV3.VersionLastChecked = DateTime.Now.AddDays(-30); + Globals.Chem4WordV3.VersionLastChecked = DateTime.UtcNow.AddDays(-30); Globals.Chem4WordV3.VersionsBehind = 0; } } @@ -252,7 +252,7 @@ public static bool FetchUpdateInfo() if (expires != null) { var expiryDate = SafeDate.Parse(expires.Value); - if (DateTime.Now.ToUniversalTime() > expiryDate) + if (DateTime.UtcNow > expiryDate) { Globals.Chem4WordV3.IsEndOfLife = true; registryKey?.SetValue(Constants.RegistryValueNameEndOfLife, "true"); diff --git a/src/Chem4Word.V3/Helpers/Upgrader.cs b/src/Chem4Word.V3/Helpers/Upgrader.cs index c3dd0e8..46e4353 100644 --- a/src/Chem4Word.V3/Helpers/Upgrader.cs +++ b/src/Chem4Word.V3/Helpers/Upgrader.cs @@ -158,7 +158,7 @@ public static void DoUpgrade(Word.Document document) { string extension = document.FullName.Split('.').Last(); string guid = Guid.NewGuid().ToString("N"); - string timestamp = DateTime.Now.ToString("yyyyMMdd-HHmmss", CultureInfo.InvariantCulture); + string timestamp = DateTime.UtcNow.ToString("yyyyMMdd-HHmmss", CultureInfo.InvariantCulture); string destination = Path.Combine(Globals.Chem4WordV3.AddInInfo.ProductAppDataPath, "Backups", $"Chem4Word-{timestamp}-{guid}.{extension}"); File.Copy(document.FullName, destination); } diff --git a/src/Chem4Word.V3/Properties/AssemblyInfo.cs b/src/Chem4Word.V3/Properties/AssemblyInfo.cs index 36f9223..14c654a 100644 --- a/src/Chem4Word.V3/Properties/AssemblyInfo.cs +++ b/src/Chem4Word.V3/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/Chem4Word.V3/Ribbon/Chem4WordRibbon.Designer.cs b/src/Chem4Word.V3/Ribbon/Chem4WordRibbon.Designer.cs index 8e13947..655285d 100644 --- a/src/Chem4Word.V3/Ribbon/Chem4WordRibbon.Designer.cs +++ b/src/Chem4Word.V3/Ribbon/Chem4WordRibbon.Designer.cs @@ -250,7 +250,6 @@ private void InitializeComponent() // HelpMenu // this.HelpMenu.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; - this.HelpMenu.Enabled = false; this.HelpMenu.Image = global::Chem4Word.Properties.Resources.Help; this.HelpMenu.Items.Add(this.ShowAbout); this.HelpMenu.Items.Add(this.ShowHome); @@ -328,7 +327,7 @@ private void InitializeComponent() this.Update.Image = global::Chem4Word.Properties.Resources.Shield_Good; this.Update.Label = "Update"; this.Update.Name = "Update"; - this.Update.ScreenTip = "About Chem4Word"; + this.Update.ScreenTip = "Update Chem4Word"; this.Update.ShowImage = true; this.Update.Visible = false; this.Update.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.OnClick_Update); diff --git a/src/Chem4Word.V3/Ribbon/Chem4WordRibbon.cs b/src/Chem4Word.V3/Ribbon/Chem4WordRibbon.cs index 20db584..2c16d17 100644 --- a/src/Chem4Word.V3/Ribbon/Chem4WordRibbon.cs +++ b/src/Chem4Word.V3/Ribbon/Chem4WordRibbon.cs @@ -2143,21 +2143,28 @@ private void OnClick_CheckForUpdates(object sender, RibbonControlEventArgs e) Globals.Chem4WordV3.LoadOptions(); } - var behind = UpdateHelper.CheckForUpdates(Globals.Chem4WordV3.SystemOptions.AutoUpdateFrequency); - if (Globals.Chem4WordV3.IsEndOfLife) - { - UserInteractions.InformUser("This version of Chem4Word is no longer supported"); - } - else + if (Globals.Chem4WordV3.SystemOptions != null) { - if (behind == 0) + var behind = UpdateHelper.CheckForUpdates(Globals.Chem4WordV3.SystemOptions.AutoUpdateFrequency); + if (Globals.Chem4WordV3.IsEndOfLife) { - UserInteractions.InformUser("Your version of Chem4Word is the latest"); + UserInteractions.InformUser("This version of Chem4Word is no longer supported"); + } + else + { + if (behind == 0) + { + UserInteractions.InformUser("Your version of Chem4Word is the latest"); + } } } Globals.Chem4WordV3.EventsEnabled = true; } + else + { + UserInteractions.InformUser("Unable to check for updates because Chem4Word has not been initialised."); + } AfterButtonChecks(sender as RibbonButton); } @@ -2209,6 +2216,10 @@ private void OnClick_ReadManual(object sender, RibbonControlEventArgs e) Globals.Chem4WordV3.EventsEnabled = true; } + else + { + UserInteractions.InformUser("Unable to locate user manual because Chem4Word has not been initialised."); + } AfterButtonChecks(sender as RibbonButton); } @@ -2251,7 +2262,9 @@ private void OnClick_YouTube(object sender, RibbonControlEventArgs e) private void OnClick_ButtonsDisabled(object sender, RibbonControlEventArgs e) { var module = $"{_product}.{_class}.{MethodBase.GetCurrentMethod().Name}()"; + BeforeButtonChecks(); + if (Globals.Chem4WordV3.Telemetry != null) { Globals.Chem4WordV3.Telemetry.Write(module, "Action", "Triggered"); @@ -2308,7 +2321,7 @@ private void OnClick_ShowSystemInfo(object sender, RibbonControlEventArgs e) } else { - UserInteractions.InformUser("Chem4Word is disabled because no plug Ins were found."); + UserInteractions.InformUser("System Info is unavailable because Chem4Word has not been initialised."); } } catch (Exception ex) diff --git a/src/Chemistry/Chem4Word.ACME/EditController.cs b/src/Chemistry/Chem4Word.ACME/EditController.cs index 0067759..df58233 100644 --- a/src/Chemistry/Chem4Word.ACME/EditController.cs +++ b/src/Chemistry/Chem4Word.ACME/EditController.cs @@ -3030,7 +3030,7 @@ public void AddObjectListToSelection(List thingsToAdd) Stopwatch sw = new Stopwatch(); sw.Start(); - DebugHelper.WriteLine($"Started at {SafeDate.ToShortTime(DateTime.Now)}"); + DebugHelper.WriteLine($"Started at {SafeDate.ToShortTime(DateTime.UtcNow)}"); //take a snapshot of the current selection var currentSelection = SelectedItems.ToList(); @@ -3170,7 +3170,7 @@ into parent } DebugHelper.WriteLine($"Timing: {sw.ElapsedMilliseconds}ms"); - DebugHelper.WriteLine($"Finished at {DateTime.Now}"); + DebugHelper.WriteLine($"Finished at {DateTime.UtcNow}"); } catch (Exception exception) { diff --git a/src/Chemistry/Chem4Word.ACME/Properties/AssemblyInfo.cs b/src/Chemistry/Chem4Word.ACME/Properties/AssemblyInfo.cs index e1334bf..1ba1e61 100644 --- a/src/Chemistry/Chem4Word.ACME/Properties/AssemblyInfo.cs +++ b/src/Chemistry/Chem4Word.ACME/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/Chemistry/Chem4Word.Model2/Converters/MDL/CtabProcessor.cs b/src/Chemistry/Chem4Word.Model2/Converters/MDL/CtabProcessor.cs index 28ac839..9f3f1dd 100644 --- a/src/Chemistry/Chem4Word.Model2/Converters/MDL/CtabProcessor.cs +++ b/src/Chemistry/Chem4Word.Model2/Converters/MDL/CtabProcessor.cs @@ -370,7 +370,7 @@ private void WriteHeader(StreamWriter writer, int atoms, int bonds) // Ss == scaling factors // E == Energy // R == registry number - writer.WriteLine($" Chem4Wrd{SafeDate.ToMdlHeaderTime(DateTime.Now)}"); + writer.WriteLine($" Chem4Wrd{SafeDate.ToMdlHeaderTime(DateTime.UtcNow)}"); // Line 3 - Comments (80) writer.WriteLine(""); diff --git a/src/Chemistry/Chem4Word.Model2/Properties/AssemblyInfo.cs b/src/Chemistry/Chem4Word.Model2/Properties/AssemblyInfo.cs index 243999c..c94a364 100644 --- a/src/Chemistry/Chem4Word.Model2/Properties/AssemblyInfo.cs +++ b/src/Chemistry/Chem4Word.Model2/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/Chemistry/Chem4Word.WebServices/Properties/AssemblyInfo.cs b/src/Chemistry/Chem4Word.WebServices/Properties/AssemblyInfo.cs index 40ef9c7..a07d5a3 100644 --- a/src/Chemistry/Chem4Word.WebServices/Properties/AssemblyInfo.cs +++ b/src/Chemistry/Chem4Word.WebServices/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/Common/Chem4Word.Core/Helpers/FileHelper.cs b/src/Common/Chem4Word.Core/Helpers/FileHelper.cs index 2e82944..d591026 100644 --- a/src/Common/Chem4Word.Core/Helpers/FileHelper.cs +++ b/src/Common/Chem4Word.Core/Helpers/FileHelper.cs @@ -19,7 +19,7 @@ public static string BackupFile(FileInfo file, DirectoryInfo directory, bool add if (addPrefix) { - destination = Path.Combine(directory.FullName, $"{SafeDate.ToIsoFilePrefix(DateTime.Now)} - {file.Name}"); + destination = Path.Combine(directory.FullName, $"{SafeDate.ToIsoFilePrefix(DateTime.UtcNow)} - {file.Name}"); } if (!File.Exists(destination)) diff --git a/src/Common/Chem4Word.Core/Properties/AssemblyInfo.cs b/src/Common/Chem4Word.Core/Properties/AssemblyInfo.cs index 5b82e1e..785111a 100644 --- a/src/Common/Chem4Word.Core/Properties/AssemblyInfo.cs +++ b/src/Common/Chem4Word.Core/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/Common/Chem4Word.Telemetry/AzureServiceBusWriter.cs b/src/Common/Chem4Word.Telemetry/AzureServiceBusWriter.cs index 2867081..59c196b 100644 --- a/src/Common/Chem4Word.Telemetry/AzureServiceBusWriter.cs +++ b/src/Common/Chem4Word.Telemetry/AzureServiceBusWriter.cs @@ -158,10 +158,10 @@ private async Task WriteMessage(OutputMessage message) try { var fileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - $@"Chem4Word.V3\Telemetry\{SafeDate.ToIsoShortDate(DateTime.Now)}.log"); + $@"Chem4Word.V3\Telemetry\{SafeDate.ToIsoShortDate(DateTime.UtcNow)}.log"); using (var streamWriter = File.AppendText(fileName)) { - await streamWriter.WriteLineAsync($"[{SafeDate.ToShortTime(DateTime.Now)}] Exception in WriteMessage: {exception.Message}"); + await streamWriter.WriteLineAsync($"[{SafeDate.ToShortTime(DateTime.UtcNow)}] Exception in WriteMessage: {exception.Message}"); } } catch diff --git a/src/Common/Chem4Word.Telemetry/Properties/AssemblyInfo.cs b/src/Common/Chem4Word.Telemetry/Properties/AssemblyInfo.cs index 07ec7c1..80ee190 100644 --- a/src/Common/Chem4Word.Telemetry/Properties/AssemblyInfo.cs +++ b/src/Common/Chem4Word.Telemetry/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/Common/Chem4Word.Telemetry/SystemHelper.cs b/src/Common/Chem4Word.Telemetry/SystemHelper.cs index 0aa474b..94e1e9e 100644 --- a/src/Common/Chem4Word.Telemetry/SystemHelper.cs +++ b/src/Common/Chem4Word.Telemetry/SystemHelper.cs @@ -98,7 +98,7 @@ private List Initialise() { List timings = new List(); - string message = $"SystemHelper.Initialise() started at {SafeDate.ToLongDate(DateTime.Now)}"; + string message = $"SystemHelper.Initialise() started at {SafeDate.ToLongDate(DateTime.UtcNow)}"; timings.Add(message); Debug.WriteLine(message); @@ -214,7 +214,7 @@ private List Initialise() // Dead Link [2022-12-08] _placesToTry.Add("https://api6.ipify.org/"); _placesToTry.Add("https://v4v6.ipv6-test.com/api/myip.php"); - message = $"GetIpAddress started at {SafeDate.ToLongDate(DateTime.Now)}"; + message = $"GetIpAddress started at {SafeDate.ToLongDate(DateTime.UtcNow)}"; StartUpTimings.Add(message); Debug.WriteLine(message); @@ -245,7 +245,7 @@ private List Initialise() GetScreens(); #if DEBUG - message = $"GetGitStatus started at {SafeDate.ToLongDate(DateTime.Now)}"; + message = $"GetGitStatus started at {SafeDate.ToLongDate(DateTime.UtcNow)}"; StartUpTimings.Add(message); Debug.WriteLine(message); @@ -368,7 +368,7 @@ private void GetGitStatus(object o) } GitStatus = string.Join(Environment.NewLine, result.ToArray()); - var message = $"GetGitStatus finished at {SafeDate.ToLongDate(DateTime.Now)}"; + var message = $"GetGitStatus finished at {SafeDate.ToLongDate(DateTime.UtcNow)}"; StartUpTimings.Add(message); Debug.WriteLine(message); } diff --git a/src/Common/Chem4Word.Telemetry/TelemetryWriter.cs b/src/Common/Chem4Word.Telemetry/TelemetryWriter.cs index 9b95e0c..bf690aa 100644 --- a/src/Common/Chem4Word.Telemetry/TelemetryWriter.cs +++ b/src/Common/Chem4Word.Telemetry/TelemetryWriter.cs @@ -77,10 +77,10 @@ public void Write(string source, string level, string message) try { string fileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - $@"Chem4Word.V3\Telemetry\{SafeDate.ToIsoShortDate(DateTime.Now)}.log"); + $@"Chem4Word.V3\Telemetry\{SafeDate.ToIsoShortDate(DateTime.UtcNow)}.log"); using (StreamWriter w = File.AppendText(fileName)) { - string logMessage = $"[{SafeDate.ToShortTime(DateTime.Now)}] {source} - {level} - {message}"; + string logMessage = $"[{SafeDate.ToShortTime(DateTime.UtcNow)}] {source} - {level} - {message}"; w.WriteLine(logMessage); } } @@ -354,7 +354,7 @@ private void WritePrivate(string operation, string level, string message) var processId = 666; var machineId = Guid.Empty.ToString("D"); // This is updated automatically by Set-Assembly-Version.ps1 - var versionNumber = "3.3.1.666"; + var versionNumber = "3.3.2.666"; try { diff --git a/src/Installer/Chem4WordSetup/Properties/AssemblyInfo.cs b/src/Installer/Chem4WordSetup/Properties/AssemblyInfo.cs index ec50df1..e2480a8 100644 --- a/src/Installer/Chem4WordSetup/Properties/AssemblyInfo.cs +++ b/src/Installer/Chem4WordSetup/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/Installer/Chem4WordSetup/Setup.cs b/src/Installer/Chem4WordSetup/Setup.cs index 7000c52..3e53878 100644 --- a/src/Installer/Chem4WordSetup/Setup.cs +++ b/src/Installer/Chem4WordSetup/Setup.cs @@ -32,7 +32,7 @@ public partial class Setup : Form private const string DetectV2AddIn = @"Chemistry Add-in for Word\Chem4Word.AddIn.vsto"; private const string DetectV3AddIn = @"Chem4Word V3\Chem4Word.V3.vsto"; - private const string DefaultMsiFile = "https://www.chem4word.co.uk/files3-3/Chem4Word-Setup.3.3.1.Beta.1.msi"; + private const string DefaultMsiFile = "https://www.chem4word.co.uk/files3-3/Chem4Word-Setup.3.3.2.Beta.2.msi"; private const string VstoInstaller = "https://www.chem4word.co.uk/files3-3/vstor_redist.exe"; private WebClient _webClient; diff --git a/src/Installer/Chem4WordUpdater/Properties/AssemblyInfo.cs b/src/Installer/Chem4WordUpdater/Properties/AssemblyInfo.cs index 546d596..bb4a713 100644 --- a/src/Installer/Chem4WordUpdater/Properties/AssemblyInfo.cs +++ b/src/Installer/Chem4WordUpdater/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/Installer/WiX.CustomAction/Properties/AssemblyInfo.cs b/src/Installer/WiX.CustomAction/Properties/AssemblyInfo.cs index ba96ee9..9a7adb6 100644 --- a/src/Installer/WiX.CustomAction/Properties/AssemblyInfo.cs +++ b/src/Installer/WiX.CustomAction/Properties/AssemblyInfo.cs @@ -34,5 +34,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/Installer/WiXInstaller/Product.wxs b/src/Installer/WiXInstaller/Product.wxs index df1a570..9439410 100644 --- a/src/Installer/WiXInstaller/Product.wxs +++ b/src/Installer/WiXInstaller/Product.wxs @@ -1,7 +1,7 @@  - + diff --git a/src/Installer/WiXInstaller/WiX-Installer.wixproj b/src/Installer/WiXInstaller/WiX-Installer.wixproj index 11f273d..658f23c 100644 --- a/src/Installer/WiXInstaller/WiX-Installer.wixproj +++ b/src/Installer/WiXInstaller/WiX-Installer.wixproj @@ -6,7 +6,7 @@ 3.10 746e1493-1b1e-482c-8fa4-c147237f4f7b 2.0 - Chem4Word-Setup.3.3.1.Beta.1 + Chem4Word-Setup.3.3.2.Beta.2 Package SAK SAK diff --git a/src/Notes/Releases.txt b/src/Notes/Releases.txt index 3ffeb3d..263e761 100644 --- a/src/Notes/Releases.txt +++ b/src/Notes/Releases.txt @@ -1,6 +1,7 @@ # Set Build Numbers -.\Set-Assembly-Version.ps1 -version 3.3.1 -name "Beta 1" -released "04-Oct-2023" -path .. +.\Set-Assembly-Version.ps1 -version 3.3.1 -name "Beta 2" -released "12-Oct-2023" -path .. +.\Set-Assembly-Version.ps1 -version 3.3.1 -name "Beta 1" -released "04-Oct-2023" -path .. .\Set-Assembly-Version.ps1 -version 3.3.0 -name "Alpha 0" -released "31-Aug-2023" -path .. diff --git a/src/PlugIns/Contracts/Properties/AssemblyInfo.cs b/src/PlugIns/Contracts/Properties/AssemblyInfo.cs index 1555dcf..29f69a1 100644 --- a/src/PlugIns/Contracts/Properties/AssemblyInfo.cs +++ b/src/PlugIns/Contracts/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/PlugIns/Drivers/Chem4Word.Driver.Dummy/Properties/AssemblyInfo.cs b/src/PlugIns/Drivers/Chem4Word.Driver.Dummy/Properties/AssemblyInfo.cs index 48458dc..2750214 100644 --- a/src/PlugIns/Drivers/Chem4Word.Driver.Dummy/Properties/AssemblyInfo.cs +++ b/src/PlugIns/Drivers/Chem4Word.Driver.Dummy/Properties/AssemblyInfo.cs @@ -37,6 +37,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +// [assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/PlugIns/Drivers/Chem4Word.Driver.Open/Properties/AssemblyInfo.cs b/src/PlugIns/Drivers/Chem4Word.Driver.Open/Properties/AssemblyInfo.cs index b07dd58..25bdfc9 100644 --- a/src/PlugIns/Drivers/Chem4Word.Driver.Open/Properties/AssemblyInfo.cs +++ b/src/PlugIns/Drivers/Chem4Word.Driver.Open/Properties/AssemblyInfo.cs @@ -37,6 +37,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +// [assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/PlugIns/Editors/Chem4Word.Editor.ACME/Properties/AssemblyInfo.cs b/src/PlugIns/Editors/Chem4Word.Editor.ACME/Properties/AssemblyInfo.cs index 12e55de..9096cd4 100644 --- a/src/PlugIns/Editors/Chem4Word.Editor.ACME/Properties/AssemblyInfo.cs +++ b/src/PlugIns/Editors/Chem4Word.Editor.ACME/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/PlugIns/Editors/ChemDoodleWeb.800/Properties/AssemblyInfo.cs b/src/PlugIns/Editors/ChemDoodleWeb.800/Properties/AssemblyInfo.cs index fe8116e..033de91 100644 --- a/src/PlugIns/Editors/ChemDoodleWeb.800/Properties/AssemblyInfo.cs +++ b/src/PlugIns/Editors/ChemDoodleWeb.800/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/PlugIns/Editors/SimpleWpfEditor/Properties/AssemblyInfo.cs b/src/PlugIns/Editors/SimpleWpfEditor/Properties/AssemblyInfo.cs index 5510e82..3cca3d4 100644 --- a/src/PlugIns/Editors/SimpleWpfEditor/Properties/AssemblyInfo.cs +++ b/src/PlugIns/Editors/SimpleWpfEditor/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/PlugIns/Renderers/OoXmlV4/Properties/AssemblyInfo.cs b/src/PlugIns/Renderers/OoXmlV4/Properties/AssemblyInfo.cs index 7f9193b..7ef933c 100644 --- a/src/PlugIns/Renderers/OoXmlV4/Properties/AssemblyInfo.cs +++ b/src/PlugIns/Renderers/OoXmlV4/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/PlugIns/Searchers/Chem4Word.Searcher.ChEBIPlugin/Properties/AssemblyInfo.cs b/src/PlugIns/Searchers/Chem4Word.Searcher.ChEBIPlugin/Properties/AssemblyInfo.cs index 162e3c4..de29a2a 100644 --- a/src/PlugIns/Searchers/Chem4Word.Searcher.ChEBIPlugin/Properties/AssemblyInfo.cs +++ b/src/PlugIns/Searchers/Chem4Word.Searcher.ChEBIPlugin/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/PlugIns/Searchers/Chem4Word.Searcher.ExamplePlugIn/Properties/AssemblyInfo.cs b/src/PlugIns/Searchers/Chem4Word.Searcher.ExamplePlugIn/Properties/AssemblyInfo.cs index f37b655..73acfcb 100644 --- a/src/PlugIns/Searchers/Chem4Word.Searcher.ExamplePlugIn/Properties/AssemblyInfo.cs +++ b/src/PlugIns/Searchers/Chem4Word.Searcher.ExamplePlugIn/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/PlugIns/Searchers/Chem4Word.Searcher.OpsinPlugIn/Properties/AssemblyInfo.cs b/src/PlugIns/Searchers/Chem4Word.Searcher.OpsinPlugIn/Properties/AssemblyInfo.cs index 7627cfd..6a17230 100644 --- a/src/PlugIns/Searchers/Chem4Word.Searcher.OpsinPlugIn/Properties/AssemblyInfo.cs +++ b/src/PlugIns/Searchers/Chem4Word.Searcher.OpsinPlugIn/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/PlugIns/Searchers/Chem4Word.Searcher.PubChemPlugIn/Properties/AssemblyInfo.cs b/src/PlugIns/Searchers/Chem4Word.Searcher.PubChemPlugIn/Properties/AssemblyInfo.cs index bcf08ee..2df807b 100644 --- a/src/PlugIns/Searchers/Chem4Word.Searcher.PubChemPlugIn/Properties/AssemblyInfo.cs +++ b/src/PlugIns/Searchers/Chem4Word.Searcher.PubChemPlugIn/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/Scripts/Sign-Files.cmd b/src/Scripts/Sign-Files.cmd index cc288ae..a9c62df 100644 --- a/src/Scripts/Sign-Files.cmd +++ b/src/Scripts/Sign-Files.cmd @@ -1,6 +1,6 @@ @echo off -set release=Chem4Word-Setup.3.3.1.Beta.1.msi +set release=Chem4Word-Setup.3.3.2.Beta.2.msi set working=C:\Temp set signtoolpath=C:\Tools\Azure\SignTool\sign.exe diff --git a/src/TestHarness/LibraryTransformer/Properties/AssemblyInfo.cs b/src/TestHarness/LibraryTransformer/Properties/AssemblyInfo.cs index c61e89a..71a32e0 100644 --- a/src/TestHarness/LibraryTransformer/Properties/AssemblyInfo.cs +++ b/src/TestHarness/LibraryTransformer/Properties/AssemblyInfo.cs @@ -37,6 +37,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +// [assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/TestHarness/WinForms.TestHarness/MainForm.cs b/src/TestHarness/WinForms.TestHarness/MainForm.cs index fb84c9a..c45a870 100644 --- a/src/TestHarness/WinForms.TestHarness/MainForm.cs +++ b/src/TestHarness/WinForms.TestHarness/MainForm.cs @@ -292,7 +292,7 @@ private void RandomElement_Click(object sender, EventArgs e) var allAtoms = model.GetAllAtoms(); if (allAtoms.Any()) { - var rnd = new Random(DateTime.Now.Millisecond); + var rnd = new Random(DateTime.UtcNow.Millisecond); var maxAtoms = allAtoms.Count; int targetAtom = rnd.Next(0, maxAtoms); diff --git a/src/TestHarness/WinForms.TestHarness/Properties/AssemblyInfo.cs b/src/TestHarness/WinForms.TestHarness/Properties/AssemblyInfo.cs index 9c9aa01..d7cc445 100644 --- a/src/TestHarness/WinForms.TestHarness/Properties/AssemblyInfo.cs +++ b/src/TestHarness/WinForms.TestHarness/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/TestHarness/Wpf.UI.Sandbox/ComboBoxAndTreeViewStyles.xaml.cs b/src/TestHarness/Wpf.UI.Sandbox/ComboBoxAndTreeViewStyles.xaml.cs index 2a5d0a9..48c9dac 100644 --- a/src/TestHarness/Wpf.UI.Sandbox/ComboBoxAndTreeViewStyles.xaml.cs +++ b/src/TestHarness/Wpf.UI.Sandbox/ComboBoxAndTreeViewStyles.xaml.cs @@ -52,7 +52,7 @@ private void AddTopLevelNode(TreeView treeView) var template = (ControlTemplate)treeView.FindResource("Chem4WordTreeViewItemTemplate"); var node = new TreeViewItem { - Header = $"{DateTime.Now:HH:mm:ss.fff}", + Header = $"{DateTime.UtcNow:HH:mm:ss.fff}", Template = template, // Don't add style if Black Item is required Style = style, @@ -67,7 +67,7 @@ private void AddChildNode(TreeViewItem item) { var node = new TreeViewItem { - Header = $"{DateTime.Now:HH:mm:ss.fff}", + Header = $"{DateTime.UtcNow:HH:mm:ss.fff}", Template = item.Template, // Don't add style if Black Item is required Style = item.Style, diff --git a/src/TestHarness/Wpf.UI.Sandbox/Properties/AssemblyInfo.cs b/src/TestHarness/Wpf.UI.Sandbox/Properties/AssemblyInfo.cs index ffa861b..723a5d1 100644 --- a/src/TestHarness/Wpf.UI.Sandbox/Properties/AssemblyInfo.cs +++ b/src/TestHarness/Wpf.UI.Sandbox/Properties/AssemblyInfo.cs @@ -46,6 +46,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +// [assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")] diff --git a/src/UnitTests/Properties/AssemblyInfo.cs b/src/UnitTests/Properties/AssemblyInfo.cs index 6b86bea..372c76c 100644 --- a/src/UnitTests/Properties/AssemblyInfo.cs +++ b/src/UnitTests/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.3.1.8677")] -[assembly: AssemblyFileVersion("3.3.1.8677")] +[assembly: AssemblyVersion("3.3.2.8685")] +[assembly: AssemblyFileVersion("3.3.2.8685")]