Skip to content

Commit

Permalink
Merged PR 665: V3.3.3 Release 1
Browse files Browse the repository at this point in the history
Create V3.3.3 Release 1

- UX: Add better instructions regarding purchase and download of a library
- UX: Allow user to cancel bulk calculate properties of a library
- Internal: Replace seed libraries with patched versions
- I/O: Remove invalid bond(s) which have the same start and end atoms on import
- ACME: Prevent creation of new invalid bond(s) which have the same start and end atoms

Related work items: #1110
  • Loading branch information
MikeWilliams-UK committed Feb 14, 2024
1 parent 2b5a382 commit 559bb68
Show file tree
Hide file tree
Showing 37 changed files with 129 additions and 82 deletions.
10 changes: 6 additions & 4 deletions src/Chem4Word.V3/Data/Chem4Word-Versions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
<ChangeLog>
<Id>f3c4f4db-2fff-46db-b14a-feb8e09f7742</Id>
<Version>
<Number>3.3.3 Beta 3</Number>
<IsBeta>true</IsBeta>
<Released>10-Jan-2024</Released>
<Number>3.3.3 Release 1</Number>
<IsBeta>false</IsBeta>
<Released>14-Feb-2024</Released>
<Changes>
<Change>UX: Add better instructions regarding purchase and download of a library</Change>
<Change>UX: Allow user to cancel bulk calculate properties of a library</Change>
<Change>Internal: Replace seed libraries with patched versions</Change>
<Change>I/O: Remove invalid bond(s) which have the same start and end atoms on import</Change>
<Change>ACME: Prevent creation of new invalid bond(s) which have the same start and end atoms</Change>
</Changes>
<Url>https://www.chem4word.co.uk/files3-3/Chem4Word-Setup.3.3.3.Beta.3.msi</Url>
<Url>https://www.chem4word.co.uk/files3-3/Chem4Word-Setup.3.3.3.Release.1.msi</Url>
</Version>
<Version>
<Number>3.3.2 Beta 2</Number>
Expand Down
6 changes: 3 additions & 3 deletions src/Chem4Word.V3/Data/This-Version.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Version>
<Number>3.3.3 Beta 3</Number>
<IsBeta>true</IsBeta>
<Released>17-Jan-2024</Released>
<Number>3.3.3 Release 1</Number>
<IsBeta>false</IsBeta>
<Released>14-Feb-2024</Released>
</Version>
1 change: 1 addition & 0 deletions src/Chem4Word.V3/Models/LibraryDownloadGridSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ public class LibraryDownloadGridSource
public bool RequiresPayment { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string Sku { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/Chem4Word.V3/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
16 changes: 9 additions & 7 deletions src/Chem4Word.V3/UI/WPF/AboutControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,29 @@
TextWrapping="Wrap"><Run Text="The Chemistry Add-In for Word " /><Run Text="originated from" /><Run Text=" Microsoft Research and the University of Cambridge" /><Run Text=", to" /><Run Text=" " /><Run Text="add chemistry to " /><Run Text="Word documents. " /><LineBreak /><Run /><LineBreak /><Run Text="The Add-In is now being further developed by a small, independent project team " /><Run Text="based in the UK" /><Run Text=" (Andy Wright, Clyde Davies &amp; Mike Williams)" /><Run Text=". " /><LineBreak /><Run /><LineBreak /><Run Text="The Chem4Word Project" /><Run Text=" " /><Run Text="accurately " /><Run Text="capture" /><Run Text="s" /><Run Text=" and retain" /><Run Text="s semantic chemistry" /><Run Text=" " /><Run Text="as you author a document. This" /><Run Text=" simplifies" /><Run Text=" pre-publication and " /><Run Text="rich " /><Run Text="information discovery scenarios, " /><Run Text="and " /><Run Text="preserve" /><Run Text="s" /><Run Text=" " /><Run Text="chemistry" /><Run Text=" for archival" /><Run Text="." /><LineBreak /><Run /><LineBreak /><Run Text="Chem4Word uses " /><Run Text="Chemical Markup Language" /><Run Language="en-gb" Text=" (CML)" /><Run Text=" - an open standard." /></TextBlock>
<DockPanel Margin="5" LastChildFill="True" />
<TextBlock Margin="5,0,0,0">
<Hyperlink Click="OnTeamsiteLinkClicked">Visit the Project web site</Hyperlink>
<Hyperlink Click="OnClick_MainWebsite">Visit the project's website</Hyperlink>
</TextBlock>
<TextBlock Margin="5,0,0,0">
<Hyperlink Click="OnSourceCodeLinkClicked">Visit our GitHub repository to view the source code</Hyperlink>
<Hyperlink Click="OnClick_SourceCode">Visit the project's GitHub repository to view the source code</Hyperlink>
</TextBlock>
<TextBlock Margin="5,0,0,0">
<Hyperlink Click="OnYouTubeLinkClicked">See our tutorials on YouTube</Hyperlink>
<Hyperlink Click="OnClick_YouTube">See our tutorials on YouTube</Hyperlink>
</TextBlock>
<TextBlock Margin="5,0,0,0">
<Hyperlink Click="OnSponsorLinkClicked">Visit our page on our sponsor's web site (The .NET Foundation)</Hyperlink>
<Hyperlink Click="OnClick_Sponsor">Visit our page on our sponsor's web site (The .NET Foundation)</Hyperlink>
</TextBlock>
<TextBlock Margin="5,0,0,0">
<Hyperlink Click="OnCambridgeLinkClicked">Visit the University of Cambridge Chemistry Department</Hyperlink>
<Hyperlink Click="OnClick_Cambridge">Visit the University of Cambridge Chemistry Department</Hyperlink>
</TextBlock>
<TextBlock
Margin="5"
Foreground="Black"
TextAlignment="Justify"
TextWrapping="Wrap"><Run Text="The Chemistry Add-In for Microsoft Word is " /><Run FontWeight="Bold" Text="free" /><Run Text=". Your feedback is important to us" /><Run Language="en-gb" Text="!" /><Run Text=" Join our Facebook group to let us know if you have any suggestions or problems using it." /></TextBlock>
TextWrapping="Wrap">
<Run Text="The Chemistry Add-In for Microsoft Word is " /><Run FontWeight="Bold" Text="free" /><Run Text=". Your feedback is important to us!" /><Run Text=" Join our Facebook group and let us know if you have any suggestions or problems using it." />
</TextBlock>
<TextBlock Margin="5,0,0,0">
<Hyperlink Click="OnFacebookLinkClicked">Join our Facebook Group</Hyperlink>
<Hyperlink Click="OnClick_Facebook">Join our Facebook Group</Hyperlink>
</TextBlock>
</StackPanel>
</Grid>
Expand Down
16 changes: 8 additions & 8 deletions src/Chem4Word.V3/UI/WPF/AboutControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private void AboutControl_Loaded(object sender, RoutedEventArgs e)

#region Hyperlink Methods

private void OnChemDoodleClick(object sender, RoutedEventArgs e)
private void OnClick_ChemDoodle(object sender, RoutedEventArgs e)
{
string module = $"{_product}.{_class}.{MethodBase.GetCurrentMethod().Name}()";
Globals.Chem4WordV3.Telemetry.Write(module, "Action", "Triggered");
Expand All @@ -76,7 +76,7 @@ private void OnChemDoodleClick(object sender, RoutedEventArgs e)
}
}

private void OnTeamsiteLinkClicked(object sender, RoutedEventArgs e)
private void OnClick_MainWebsite(object sender, RoutedEventArgs e)
{
string module = $"{_product}.{_class}.{MethodBase.GetCurrentMethod().Name}()";
Globals.Chem4WordV3.Telemetry.Write(module, "Action", "Triggered");
Expand All @@ -94,14 +94,14 @@ private void OnTeamsiteLinkClicked(object sender, RoutedEventArgs e)
}
}

private void OnFacebookLinkClicked(object sender, RoutedEventArgs e)
private void OnClick_Facebook(object sender, RoutedEventArgs e)
{
string module = $"{_product}.{_class}.{MethodBase.GetCurrentMethod().Name}()";
Globals.Chem4WordV3.Telemetry.Write(module, "Action", "Triggered");

try
{
Process.Start("https://www.facebook.com/home.php?sk=group_186300551397797");
Process.Start("https://www.facebook.com/groups/chem4word");
}
catch (Exception ex)
{
Expand All @@ -112,7 +112,7 @@ private void OnFacebookLinkClicked(object sender, RoutedEventArgs e)
}
}

private void OnCambridgeLinkClicked(object sender, RoutedEventArgs e)
private void OnClick_Cambridge(object sender, RoutedEventArgs e)
{
string module = $"{_product}.{_class}.{MethodBase.GetCurrentMethod().Name}()";
Globals.Chem4WordV3.Telemetry.Write(module, "Action", "Triggered");
Expand All @@ -130,7 +130,7 @@ private void OnCambridgeLinkClicked(object sender, RoutedEventArgs e)
}
}

private void OnSponsorLinkClicked(object sender, RoutedEventArgs e)
private void OnClick_Sponsor(object sender, RoutedEventArgs e)
{
string module = $"{_product}.{_class}.{MethodBase.GetCurrentMethod().Name}()";
Globals.Chem4WordV3.Telemetry.Write(module, "Action", "Triggered");
Expand All @@ -148,7 +148,7 @@ private void OnSponsorLinkClicked(object sender, RoutedEventArgs e)
}
}

private void OnSourceCodeLinkClicked(object sender, RoutedEventArgs e)
private void OnClick_SourceCode(object sender, RoutedEventArgs e)
{
string module = $"{_product}.{_class}.{MethodBase.GetCurrentMethod().Name}()";
Globals.Chem4WordV3.Telemetry.Write(module, "Action", "Triggered");
Expand All @@ -166,7 +166,7 @@ private void OnSourceCodeLinkClicked(object sender, RoutedEventArgs e)
}
}

private void OnYouTubeLinkClicked(object sender, RoutedEventArgs e)
private void OnClick_YouTube(object sender, RoutedEventArgs e)
{
string module = $"{_product}.{_class}.{MethodBase.GetCurrentMethod().Name}()";
Globals.Chem4WordV3.Telemetry.Write(module, "Action", "Triggered");
Expand Down
18 changes: 17 additions & 1 deletion src/Chem4Word.V3/UI/WPF/LibraryDownloadControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using System.Linq;
using System.Net.Mail;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
Expand Down Expand Up @@ -113,6 +114,7 @@ private void OnLoaded_LibraryDownloadControl(object sender, RoutedEventArgs e)
{
var obj = new LibraryDownloadGridSource
{
Sku = entry.Id,
Name = entry.Name,
Description = entry.Description,
RequiresPayment = !entry.Driver.Equals(Constants.SQLiteStandardDriver)
Expand Down Expand Up @@ -521,7 +523,21 @@ private void OnClick_BuyButton(object sender, RoutedEventArgs e)

try
{
Process.Start("https://www.chem4word.co.uk/shop/");
if (Libraries.SelectedItem is LibraryDownloadGridSource data)
{
var stringBuilder = new StringBuilder();
stringBuilder.AppendLine($"Please purchase the library '{data.Name}' from our shop,");
stringBuilder.AppendLine(" then return to here to download it when you receive an email confirming your purchase");
stringBuilder.AppendLine($"Clicking OK will open your default browser with '{data.Name}' selected");
var answer = UserInteractions.AskUserOkCancel(stringBuilder.ToString());
if (answer == DialogResult.OK)
{
// With the help of https://stackoverflow.com/questions/64086598/redirect-product-sku-from-url-to-the-related-product-in-woocommerce
// we now have a redirect from SKU to product name
// e.g. https://www.chem4word.co.uk/product/d91e2e64-95dd-4652-ac23-5c07a261a1b4 ==> https://www.chem4word.co.uk/product/simple-heterocycles
Process.Start($"https://www.chem4word.co.uk/product/{data.Sku}");
}
}
}
catch (Exception ex)
{
Expand Down
13 changes: 12 additions & 1 deletion src/Chem4Word.V3/UI/WPF/LibraryEditorControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
Name="StatusBar"
Expand All @@ -668,11 +669,21 @@
<TextBlock
x:Name="ProgressBarMessage"
Grid.Column="1"
Margin="5"
Margin="0, 5, 5, 5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
d:IsLocked="True"
Text="" />
<Button
x:Name="Cancel"
Grid.Column="2"
Width="45"
Margin="0, 5, 5, 5"
d:IsLocked="True"
Click="OnClick_CancelButton"
IsEnabled="False">
Cancel
</Button>
</Grid>
</Grid>
</UserControl>
16 changes: 16 additions & 0 deletions src/Chem4Word.V3/UI/WPF/LibraryEditorControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,7 @@ private void OnClick_CalculateButton(object sender, RoutedEventArgs e)
try
{
SetButtonStates(false);
Cancel.IsEnabled = true;

var dto = _driver.GetAllChemistry();
int total = dto.Count;
Expand Down Expand Up @@ -938,10 +939,18 @@ private void OnClick_CalculateButton(object sender, RoutedEventArgs e)

updated++;
}

if (_cancelRequested)
{
break;
}
}

_driver.CommitTransaction();

Cancel.IsEnabled = false;
_cancelRequested = false;

_telemetry.Write(module, "Information", $"Updated properties for {updated}/{total} structures");
}
}
Expand Down Expand Up @@ -1173,5 +1182,12 @@ private void UpdateTags(TagControlModel tcm)
_lastTags = tags;
}
}

private bool _cancelRequested = false;

private void OnClick_CancelButton(object sender, RoutedEventArgs e)
{
_cancelRequested = true;
}
}
}
4 changes: 2 additions & 2 deletions src/Chemistry/Chem4Word.ACME/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
4 changes: 2 additions & 2 deletions src/Chemistry/Chem4Word.Model2/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
4 changes: 2 additions & 2 deletions src/Common/Chem4Word.Core/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
4 changes: 2 additions & 2 deletions src/Common/Chem4Word.Telemetry/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
4 changes: 2 additions & 2 deletions src/Installer/Chem4WordSetup/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
2 changes: 1 addition & 1 deletion src/Installer/Chem4WordSetup/Setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.Beta.3.msi";
private const string DefaultMsiFile = "https://www.chem4word.co.uk/files3-3/Chem4Word-Setup.3.3.3.Release.1.msi";
private const string VstoInstaller = "https://www.chem4word.co.uk/files3-3/vstor_redist.exe";

private WebClient _webClient;
Expand Down
4 changes: 2 additions & 2 deletions src/Installer/Chem4WordUpdater/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
4 changes: 2 additions & 2 deletions src/Installer/WiX.CustomAction/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
2 changes: 1 addition & 1 deletion src/Installer/WiXInstaller/Product.wxs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!-- For automatic upgrade to work only first three parts of version number are used -->
<Product Id="*" Name="Chemistry Add-In for Microsoft Word 2024 Beta 3" Manufacturer="Chem4Word" Version="3.3.3.8782" UpgradeCode="865226e7-d29d-49aa-a390-dda49979b102" Language="1033">
<Product Id="*" Name="Chemistry Add-In for Microsoft Word 2024 Release 1" Manufacturer="Chem4Word" Version="3.3.3.8810" UpgradeCode="865226e7-d29d-49aa-a390-dda49979b102" Language="1033">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of Chem4Word is already installed." />
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" CompressionLevel="high" />
Expand Down
2 changes: 1 addition & 1 deletion src/Installer/WiXInstaller/WiX-Installer.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>746e1493-1b1e-482c-8fa4-c147237f4f7b</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Chem4Word-Setup.3.3.3.Beta.3</OutputName>
<OutputName>Chem4Word-Setup.3.3.3.Release.1</OutputName>
<OutputType>Package</OutputType>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
Expand Down
3 changes: 1 addition & 2 deletions src/Notes/Releases.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Set Build Numbers

.\Set-Assembly-Version.ps1 -version 3.3.3 -name "Beta 3" -released "17-Jan-2024" -path ..

.\Set-Assembly-Version.ps1 -version 3.3.3 -name "Release 1" -released "14-Feb-2024" -path ..
.\Set-Assembly-Version.ps1 -version 3.3.2 -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 ..
Expand Down
4 changes: 2 additions & 2 deletions src/PlugIns/Contracts/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.8782")]
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
// [assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.8782")]
[assembly: AssemblyVersion("3.3.3.8782")]
[assembly: AssemblyFileVersion("3.3.3.8782")]
// [assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyVersion("3.3.3.8810")]
[assembly: AssemblyFileVersion("3.3.3.8810")]
Loading

0 comments on commit 559bb68

Please sign in to comment.