Merge branch '47-show-version-number' into 'main'
Resolve "Show version number" Closes #47 See merge request open-source/dotnet/i18n-commander!24
This commit is contained in:
commit
abb533f75b
6
I18N Commander/Processor/Version.cs
Normal file
6
I18N Commander/Processor/Version.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace Processor;
|
||||||
|
|
||||||
|
public static class Version
|
||||||
|
{
|
||||||
|
public static string Text => $"v0.7.0 (2022-11-06), .NET {Environment.Version}";
|
||||||
|
}
|
@ -35,6 +35,7 @@
|
|||||||
this.flowLayoutButtons = new System.Windows.Forms.FlowLayoutPanel();
|
this.flowLayoutButtons = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
this.buttonNew = new System.Windows.Forms.Button();
|
this.buttonNew = new System.Windows.Forms.Button();
|
||||||
this.buttonOpen = new System.Windows.Forms.Button();
|
this.buttonOpen = new System.Windows.Forms.Button();
|
||||||
|
this.labelVersion = new System.Windows.Forms.Label();
|
||||||
this.contextMenuRecentProjects = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.contextMenuRecentProjects = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.tableLayout.SuspendLayout();
|
this.tableLayout.SuspendLayout();
|
||||||
@ -50,17 +51,18 @@
|
|||||||
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 128F));
|
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 128F));
|
||||||
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 360F));
|
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 360F));
|
||||||
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
|
||||||
this.tableLayout.Controls.Add(this.pictureBox, 1, 1);
|
this.tableLayout.Controls.Add(this.pictureBox, 1, 1);
|
||||||
this.tableLayout.Controls.Add(this.labelTitle, 2, 1);
|
this.tableLayout.Controls.Add(this.labelTitle, 2, 1);
|
||||||
this.tableLayout.Controls.Add(this.flowLayoutButtons, 1, 2);
|
this.tableLayout.Controls.Add(this.flowLayoutButtons, 1, 2);
|
||||||
|
this.tableLayout.Controls.Add(this.labelVersion, 1, 3);
|
||||||
this.tableLayout.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.tableLayout.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.tableLayout.Location = new System.Drawing.Point(0, 0);
|
this.tableLayout.Location = new System.Drawing.Point(0, 0);
|
||||||
this.tableLayout.Name = "tableLayout";
|
this.tableLayout.Name = "tableLayout";
|
||||||
this.tableLayout.RowCount = 4;
|
this.tableLayout.RowCount = 5;
|
||||||
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 128F));
|
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 128F));
|
||||||
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 66F));
|
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 66F));
|
||||||
|
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
|
||||||
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
this.tableLayout.Size = new System.Drawing.Size(937, 465);
|
this.tableLayout.Size = new System.Drawing.Size(937, 465);
|
||||||
this.tableLayout.TabIndex = 0;
|
this.tableLayout.TabIndex = 0;
|
||||||
@ -69,7 +71,7 @@
|
|||||||
//
|
//
|
||||||
this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.pictureBox.Image = global::UI_WinForms.Resources.Icons.icons8_language_512;
|
this.pictureBox.Image = global::UI_WinForms.Resources.Icons.icons8_language_512;
|
||||||
this.pictureBox.Location = new System.Drawing.Point(227, 138);
|
this.pictureBox.Location = new System.Drawing.Point(227, 118);
|
||||||
this.pictureBox.Name = "pictureBox";
|
this.pictureBox.Name = "pictureBox";
|
||||||
this.pictureBox.Size = new System.Drawing.Size(122, 122);
|
this.pictureBox.Size = new System.Drawing.Size(122, 122);
|
||||||
this.pictureBox.TabIndex = 0;
|
this.pictureBox.TabIndex = 0;
|
||||||
@ -79,7 +81,7 @@
|
|||||||
//
|
//
|
||||||
this.labelTitle.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.labelTitle.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.labelTitle.Font = new System.Drawing.Font("Segoe UI", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
this.labelTitle.Font = new System.Drawing.Font("Segoe UI", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||||
this.labelTitle.Location = new System.Drawing.Point(355, 135);
|
this.labelTitle.Location = new System.Drawing.Point(355, 115);
|
||||||
this.labelTitle.Name = "labelTitle";
|
this.labelTitle.Name = "labelTitle";
|
||||||
this.labelTitle.Size = new System.Drawing.Size(354, 128);
|
this.labelTitle.Size = new System.Drawing.Size(354, 128);
|
||||||
this.labelTitle.TabIndex = 1;
|
this.labelTitle.TabIndex = 1;
|
||||||
@ -92,7 +94,7 @@
|
|||||||
this.flowLayoutButtons.Controls.Add(this.buttonNew);
|
this.flowLayoutButtons.Controls.Add(this.buttonNew);
|
||||||
this.flowLayoutButtons.Controls.Add(this.buttonOpen);
|
this.flowLayoutButtons.Controls.Add(this.buttonOpen);
|
||||||
this.flowLayoutButtons.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.flowLayoutButtons.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.flowLayoutButtons.Location = new System.Drawing.Point(224, 263);
|
this.flowLayoutButtons.Location = new System.Drawing.Point(224, 243);
|
||||||
this.flowLayoutButtons.Margin = new System.Windows.Forms.Padding(0);
|
this.flowLayoutButtons.Margin = new System.Windows.Forms.Padding(0);
|
||||||
this.flowLayoutButtons.Name = "flowLayoutButtons";
|
this.flowLayoutButtons.Name = "flowLayoutButtons";
|
||||||
this.flowLayoutButtons.Size = new System.Drawing.Size(488, 66);
|
this.flowLayoutButtons.Size = new System.Drawing.Size(488, 66);
|
||||||
@ -124,6 +126,18 @@
|
|||||||
this.buttonOpen.UseVisualStyleBackColor = true;
|
this.buttonOpen.UseVisualStyleBackColor = true;
|
||||||
this.buttonOpen.Click += new System.EventHandler(this.buttonOpen_Click);
|
this.buttonOpen.Click += new System.EventHandler(this.buttonOpen_Click);
|
||||||
//
|
//
|
||||||
|
// labelVersion
|
||||||
|
//
|
||||||
|
this.labelVersion.AutoSize = true;
|
||||||
|
this.labelVersion.BackColor = System.Drawing.Color.LightGray;
|
||||||
|
this.tableLayout.SetColumnSpan(this.labelVersion, 2);
|
||||||
|
this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.labelVersion.Location = new System.Drawing.Point(227, 309);
|
||||||
|
this.labelVersion.Name = "labelVersion";
|
||||||
|
this.labelVersion.Size = new System.Drawing.Size(482, 40);
|
||||||
|
this.labelVersion.TabIndex = 3;
|
||||||
|
this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
// contextMenuRecentProjects
|
// contextMenuRecentProjects
|
||||||
//
|
//
|
||||||
this.contextMenuRecentProjects.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
this.contextMenuRecentProjects.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||||
@ -148,6 +162,7 @@
|
|||||||
this.Name = "LoaderStart";
|
this.Name = "LoaderStart";
|
||||||
this.Size = new System.Drawing.Size(937, 465);
|
this.Size = new System.Drawing.Size(937, 465);
|
||||||
this.tableLayout.ResumeLayout(false);
|
this.tableLayout.ResumeLayout(false);
|
||||||
|
this.tableLayout.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
|
||||||
this.flowLayoutButtons.ResumeLayout(false);
|
this.flowLayoutButtons.ResumeLayout(false);
|
||||||
this.contextMenuRecentProjects.ResumeLayout(false);
|
this.contextMenuRecentProjects.ResumeLayout(false);
|
||||||
@ -165,5 +180,6 @@
|
|||||||
private Button buttonOpen;
|
private Button buttonOpen;
|
||||||
private ContextMenuStrip contextMenuRecentProjects;
|
private ContextMenuStrip contextMenuRecentProjects;
|
||||||
private ToolStripMenuItem toolStripMenuItem1;
|
private ToolStripMenuItem toolStripMenuItem1;
|
||||||
|
private Label labelVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
using Version = Processor.Version;
|
||||||
|
|
||||||
namespace UI_WinForms.Components;
|
namespace UI_WinForms.Components;
|
||||||
|
|
||||||
@ -11,6 +12,7 @@ public partial class LoaderStart : UserControl
|
|||||||
public LoaderStart()
|
public LoaderStart()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
|
this.labelVersion.Text = Version.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Recent Projects
|
#region Recent Projects
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
this.buttonDeleteCulture = new System.Windows.Forms.Button();
|
this.buttonDeleteCulture = new System.Windows.Forms.Button();
|
||||||
this.contextMenuDelete = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.contextMenuDelete = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||||
|
this.labelVersion = new System.Windows.Forms.Label();
|
||||||
this.tableLayout.SuspendLayout();
|
this.tableLayout.SuspendLayout();
|
||||||
this.flowLayoutToolbar.SuspendLayout();
|
this.flowLayoutToolbar.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
@ -100,6 +101,7 @@
|
|||||||
this.tableLayout.SetColumnSpan(this.flowLayoutToolbar, 2);
|
this.tableLayout.SetColumnSpan(this.flowLayoutToolbar, 2);
|
||||||
this.flowLayoutToolbar.Controls.Add(this.buttonAddCulture);
|
this.flowLayoutToolbar.Controls.Add(this.buttonAddCulture);
|
||||||
this.flowLayoutToolbar.Controls.Add(this.buttonDeleteCulture);
|
this.flowLayoutToolbar.Controls.Add(this.buttonDeleteCulture);
|
||||||
|
this.flowLayoutToolbar.Controls.Add(this.labelVersion);
|
||||||
this.flowLayoutToolbar.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.flowLayoutToolbar.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.flowLayoutToolbar.Location = new System.Drawing.Point(0, 315);
|
this.flowLayoutToolbar.Location = new System.Drawing.Point(0, 315);
|
||||||
this.flowLayoutToolbar.Margin = new System.Windows.Forms.Padding(0);
|
this.flowLayoutToolbar.Margin = new System.Windows.Forms.Padding(0);
|
||||||
@ -139,7 +141,7 @@
|
|||||||
this.contextMenuDelete.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
this.contextMenuDelete.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
|
||||||
this.contextMenuDelete.ImageScalingSize = new System.Drawing.Size(20, 20);
|
this.contextMenuDelete.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
this.contextMenuDelete.Name = "contextMenuDelete";
|
this.contextMenuDelete.Name = "contextMenuDelete";
|
||||||
this.contextMenuDelete.Size = new System.Drawing.Size(211, 32);
|
this.contextMenuDelete.Size = new System.Drawing.Size(61, 4);
|
||||||
//
|
//
|
||||||
// toolTip
|
// toolTip
|
||||||
//
|
//
|
||||||
@ -149,6 +151,16 @@
|
|||||||
this.toolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
|
this.toolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
|
||||||
this.toolTip.ToolTipTitle = "Help";
|
this.toolTip.ToolTipTitle = "Help";
|
||||||
//
|
//
|
||||||
|
// labelVersion
|
||||||
|
//
|
||||||
|
this.labelVersion.AutoSize = true;
|
||||||
|
this.labelVersion.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
|
this.labelVersion.Location = new System.Drawing.Point(135, 0);
|
||||||
|
this.labelVersion.Name = "labelVersion";
|
||||||
|
this.labelVersion.Size = new System.Drawing.Size(0, 66);
|
||||||
|
this.labelVersion.TabIndex = 1;
|
||||||
|
this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
// Settings
|
// Settings
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
|
||||||
@ -160,6 +172,7 @@
|
|||||||
this.tableLayout.ResumeLayout(false);
|
this.tableLayout.ResumeLayout(false);
|
||||||
this.tableLayout.PerformLayout();
|
this.tableLayout.PerformLayout();
|
||||||
this.flowLayoutToolbar.ResumeLayout(false);
|
this.flowLayoutToolbar.ResumeLayout(false);
|
||||||
|
this.flowLayoutToolbar.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -175,5 +188,6 @@
|
|||||||
private Button buttonAddCulture;
|
private Button buttonAddCulture;
|
||||||
private Button buttonDeleteCulture;
|
private Button buttonDeleteCulture;
|
||||||
private ContextMenuStrip contextMenuDelete;
|
private ContextMenuStrip contextMenuDelete;
|
||||||
|
private Label labelVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Processor;
|
using Processor;
|
||||||
|
using Version = Processor.Version;
|
||||||
|
|
||||||
namespace UI_WinForms.Components;
|
namespace UI_WinForms.Components;
|
||||||
|
|
||||||
@ -7,6 +8,7 @@ public partial class Settings : UserControl
|
|||||||
public Settings()
|
public Settings()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
|
this.labelVersion.Text = Version.Text;
|
||||||
this.Load += async (sender, args) => await this.LoadAllSettings();
|
this.Load += async (sender, args) => await this.LoadAllSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ namespace UI_WinForms;
|
|||||||
|
|
||||||
internal static class Program
|
internal static class Program
|
||||||
{
|
{
|
||||||
internal const string VERSION = "v0.1.0";
|
|
||||||
internal static IServiceProvider? SERVICE_PROVIDER;
|
internal static IServiceProvider? SERVICE_PROVIDER;
|
||||||
|
|
||||||
internal static bool RestartMainApp = false;
|
internal static bool RestartMainApp = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user