From 24f1d8326351d67556ebcf0ec29022a8add8bd48 Mon Sep 17 00:00:00 2001 From: Corey Kosak Date: Mon, 27 Jan 2025 22:50:13 -0500 Subject: [PATCH 1/2] feat(csharp/ExcelAddIn): Add a version number and display it in the GUI (#6602) We are establishing a version numbering scheme for the Excel AddIn. This PR sets the AddIn to be version 0.8.0, displays that version in the dialog boxes, and we also note the versions of Community Core and Enterprise Core+ that it was built from in the file VERSIONS.md. We also make relevant changes to the ExcelAddInInstaller that also surface the version number for the installer. --- csharp/ExcelAddIn/util/Utility.cs | 2 + .../views/ConnectionManagerDialog.Designer.cs | 15 ++++-- .../views/ConnectionManagerDialog.cs | 4 +- .../views/ConnectionManagerDialog.resx | 7 +-- .../views/CredentialsDialog.Designer.cs | 52 ++++++++++++------- csharp/ExcelAddIn/views/CredentialsDialog.cs | 6 ++- .../ExcelAddIn/views/CredentialsDialog.resx | 4 +- .../ExcelAddInInstaller.aip | 8 +-- .../Prerequisites/.NET 8.0/.gitignore | 1 + .../Prerequisites/.NET 8.0/README.md | 9 ++++ csharp/ExcelAddInInstaller/VERSIONS.md | 5 ++ .../ExcelAddInInstaller/dhinstall/.gitignore | 5 +- 12 files changed, 80 insertions(+), 38 deletions(-) create mode 100644 csharp/ExcelAddInInstaller/Prerequisites/.NET 8.0/.gitignore create mode 100644 csharp/ExcelAddInInstaller/Prerequisites/.NET 8.0/README.md create mode 100644 csharp/ExcelAddInInstaller/VERSIONS.md diff --git a/csharp/ExcelAddIn/util/Utility.cs b/csharp/ExcelAddIn/util/Utility.cs index 4b9de77ca3a..149a1c08392 100644 --- a/csharp/ExcelAddIn/util/Utility.cs +++ b/csharp/ExcelAddIn/util/Utility.cs @@ -4,6 +4,8 @@ namespace Deephaven.ExcelAddIn.Util; internal static class Utility { + public const string VersionString = "Version 0.8.0"; + public static T Exchange(ref T item, T newValue) { var result = item; item = newValue; diff --git a/csharp/ExcelAddIn/views/ConnectionManagerDialog.Designer.cs b/csharp/ExcelAddIn/views/ConnectionManagerDialog.Designer.cs index 604c97b2d12..08c6de2edd2 100644 --- a/csharp/ExcelAddIn/views/ConnectionManagerDialog.Designer.cs +++ b/csharp/ExcelAddIn/views/ConnectionManagerDialog.Designer.cs @@ -23,7 +23,6 @@ protected override void Dispose(bool disposing) { /// the contents of this method with the code editor. /// private void InitializeComponent() { - colorDialog1 = new ColorDialog(); dataGridView1 = new DataGridView(); newButton = new Button(); connectionsLabel = new Label(); @@ -31,6 +30,7 @@ private void InitializeComponent() { deleteButton = new Button(); reconnectButton = new Button(); makeDefaultButton = new Button(); + versionLabel = new Label(); ((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit(); SuspendLayout(); // @@ -114,11 +114,21 @@ private void InitializeComponent() { makeDefaultButton.UseVisualStyleBackColor = true; makeDefaultButton.Click += makeDefaultButton_Click; // + // versionLabel + // + versionLabel.AutoSize = true; + versionLabel.Location = new Point(12, 581); + versionLabel.Name = "versionLabel"; + versionLabel.Size = new Size(59, 25); + versionLabel.TabIndex = 6; + versionLabel.Text = "label1"; + // // ConnectionManagerDialog // AutoScaleDimensions = new SizeF(10F, 25F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(1115, 615); + Controls.Add(versionLabel); Controls.Add(makeDefaultButton); Controls.Add(reconnectButton); Controls.Add(deleteButton); @@ -134,8 +144,6 @@ private void InitializeComponent() { } #endregion - - private ColorDialog colorDialog1; private DataGridView dataGridView1; private Button newButton; private Label connectionsLabel; @@ -143,5 +151,6 @@ private void InitializeComponent() { private Button deleteButton; private Button reconnectButton; private Button makeDefaultButton; + private Label versionLabel; } } \ No newline at end of file diff --git a/csharp/ExcelAddIn/views/ConnectionManagerDialog.cs b/csharp/ExcelAddIn/views/ConnectionManagerDialog.cs index d56b79f950a..27d561bddc9 100644 --- a/csharp/ExcelAddIn/views/ConnectionManagerDialog.cs +++ b/csharp/ExcelAddIn/views/ConnectionManagerDialog.cs @@ -1,4 +1,5 @@ -using Deephaven.ExcelAddIn.Viewmodels; +using Deephaven.ExcelAddIn.Util; +using Deephaven.ExcelAddIn.Viewmodels; namespace Deephaven.ExcelAddIn.Views; @@ -18,6 +19,7 @@ public ConnectionManagerDialog() { _bindingSource.DataSource = typeof(ConnectionManagerDialogRow); dataGridView1.DataSource = _bindingSource; + versionLabel.Text = Utility.VersionString; } public void AddRow(ConnectionManagerDialogRow row) { diff --git a/csharp/ExcelAddIn/views/ConnectionManagerDialog.resx b/csharp/ExcelAddIn/views/ConnectionManagerDialog.resx index 7f2cf2b8014..b92c16350e8 100644 --- a/csharp/ExcelAddIn/views/ConnectionManagerDialog.resx +++ b/csharp/ExcelAddIn/views/ConnectionManagerDialog.resx @@ -1,7 +1,7 @@