diff --git a/AboutBox.Designer.cs b/AboutBox.Designer.cs index aa27741..590e39f 100644 --- a/AboutBox.Designer.cs +++ b/AboutBox.Designer.cs @@ -53,8 +53,7 @@ this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel.Location = new System.Drawing.Point(14, 14); - this.tableLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.tableLayoutPanel.Location = new System.Drawing.Point(9, 9); this.tableLayoutPanel.Name = "tableLayoutPanel"; this.tableLayoutPanel.RowCount = 6; this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); @@ -63,18 +62,17 @@ this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel.Size = new System.Drawing.Size(624, 407); + this.tableLayoutPanel.Size = new System.Drawing.Size(417, 265); this.tableLayoutPanel.TabIndex = 0; // // logoPictureBox // this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill; this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image"))); - this.logoPictureBox.Location = new System.Drawing.Point(4, 5); - this.logoPictureBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.logoPictureBox.Location = new System.Drawing.Point(3, 3); this.logoPictureBox.Name = "logoPictureBox"; this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6); - this.logoPictureBox.Size = new System.Drawing.Size(197, 397); + this.logoPictureBox.Size = new System.Drawing.Size(131, 259); this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.logoPictureBox.TabIndex = 12; this.logoPictureBox.TabStop = false; @@ -82,11 +80,11 @@ // labelProductName // this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelProductName.Location = new System.Drawing.Point(214, 0); - this.labelProductName.Margin = new System.Windows.Forms.Padding(9, 0, 4, 0); - this.labelProductName.MaximumSize = new System.Drawing.Size(0, 26); + this.labelProductName.Location = new System.Drawing.Point(143, 0); + this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17); this.labelProductName.Name = "labelProductName"; - this.labelProductName.Size = new System.Drawing.Size(406, 26); + this.labelProductName.Size = new System.Drawing.Size(271, 17); this.labelProductName.TabIndex = 19; this.labelProductName.Text = "Название продукта"; this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -94,11 +92,11 @@ // labelVersion // this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelVersion.Location = new System.Drawing.Point(214, 40); - this.labelVersion.Margin = new System.Windows.Forms.Padding(9, 0, 4, 0); - this.labelVersion.MaximumSize = new System.Drawing.Size(0, 26); + this.labelVersion.Location = new System.Drawing.Point(143, 26); + this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17); this.labelVersion.Name = "labelVersion"; - this.labelVersion.Size = new System.Drawing.Size(406, 26); + this.labelVersion.Size = new System.Drawing.Size(271, 17); this.labelVersion.TabIndex = 0; this.labelVersion.Text = "Версия"; this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -106,11 +104,11 @@ // labelCopyright // this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelCopyright.Location = new System.Drawing.Point(214, 80); - this.labelCopyright.Margin = new System.Windows.Forms.Padding(9, 0, 4, 0); - this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 26); + this.labelCopyright.Location = new System.Drawing.Point(143, 52); + this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17); this.labelCopyright.Name = "labelCopyright"; - this.labelCopyright.Size = new System.Drawing.Size(406, 26); + this.labelCopyright.Size = new System.Drawing.Size(271, 17); this.labelCopyright.TabIndex = 21; this.labelCopyright.TabStop = true; this.labelCopyright.Text = "Авторские права"; @@ -120,11 +118,11 @@ // labelCompanyName // this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelCompanyName.Location = new System.Drawing.Point(214, 120); - this.labelCompanyName.Margin = new System.Windows.Forms.Padding(9, 0, 4, 0); - this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 26); + this.labelCompanyName.Location = new System.Drawing.Point(143, 78); + this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); + this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 17); this.labelCompanyName.Name = "labelCompanyName"; - this.labelCompanyName.Size = new System.Drawing.Size(406, 26); + this.labelCompanyName.Size = new System.Drawing.Size(271, 17); this.labelCompanyName.TabIndex = 22; this.labelCompanyName.Text = "Название организации"; this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -132,13 +130,13 @@ // textBoxDescription // this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBoxDescription.Location = new System.Drawing.Point(214, 165); - this.textBoxDescription.Margin = new System.Windows.Forms.Padding(9, 5, 4, 5); + this.textBoxDescription.Location = new System.Drawing.Point(143, 107); + this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); this.textBoxDescription.Multiline = true; this.textBoxDescription.Name = "textBoxDescription"; this.textBoxDescription.ReadOnly = true; this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.textBoxDescription.Size = new System.Drawing.Size(406, 193); + this.textBoxDescription.Size = new System.Drawing.Size(271, 126); this.textBoxDescription.TabIndex = 23; this.textBoxDescription.TabStop = false; this.textBoxDescription.Text = "Описание"; @@ -147,27 +145,25 @@ // this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.okButton.Location = new System.Drawing.Point(508, 368); - this.okButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.okButton.Location = new System.Drawing.Point(339, 240); this.okButton.Name = "okButton"; - this.okButton.Size = new System.Drawing.Size(112, 34); + this.okButton.Size = new System.Drawing.Size(75, 22); this.okButton.TabIndex = 24; this.okButton.Text = "&ОК"; // // AboutBox // this.AcceptButton = this.okButton; - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(652, 435); + this.ClientSize = new System.Drawing.Size(435, 283); this.Controls.Add(this.tableLayoutPanel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "AboutBox"; - this.Padding = new System.Windows.Forms.Padding(14); + this.Padding = new System.Windows.Forms.Padding(9, 9, 9, 9); this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/AboutBox.cs b/AboutBox.cs index 920a4a9..1ebdf87 100644 --- a/AboutBox.cs +++ b/AboutBox.cs @@ -14,9 +14,11 @@ namespace RelaunchProcess public AboutBox() { InitializeComponent(); + var buildDate = Assembly.GetExecutingAssembly().GetCustomAttributes() + .FirstOrDefault(a => a.Key == "BuildDate")?.Value; this.Text = String.Format("О программе {0}", AssemblyTitle); this.labelProductName.Text = AssemblyProduct; - this.labelVersion.Text = String.Format("Версия {0}", AssemblyVersion); + this.labelVersion.Text = String.Format("Версия {0} (сборка от {1})", AssemblyVersion, buildDate); this.labelCopyright.Text = AssemblyCopyright; this.labelCompanyName.Text = AssemblyCompany; this.textBoxDescription.Text = AssemblyDescription; diff --git a/DiscordSettings.cs b/DiscordSettings.cs index 8474c7e..93213ae 100644 --- a/DiscordSettings.cs +++ b/DiscordSettings.cs @@ -16,9 +16,9 @@ namespace RelaunchProcess { public partial class WebhookSettings : Form { - private Form1 parent; + private MainWindow parent; - public WebhookSettings(Form1 _parent) + public WebhookSettings(MainWindow _parent) { InitializeComponent(); parent = _parent; diff --git a/Form1.Designer.cs b/MainWindow.Designer.cs similarity index 99% rename from Form1.Designer.cs rename to MainWindow.Designer.cs index 2b2cd95..f904fdc 100644 --- a/Form1.Designer.cs +++ b/MainWindow.Designer.cs @@ -2,7 +2,7 @@ using System.Windows.Forms; namespace Process_Auto_Relaunch { - partial class Form1 + partial class MainWindow { /// /// Required designer variable. @@ -31,7 +31,7 @@ namespace Process_Auto_Relaunch private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow)); this.groupBoxActions = new System.Windows.Forms.GroupBox(); this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.label1 = new System.Windows.Forms.Label(); diff --git a/Form1.cs b/MainWindow.cs similarity index 99% rename from Form1.cs rename to MainWindow.cs index 4027fbc..a70227a 100644 --- a/Form1.cs +++ b/MainWindow.cs @@ -19,7 +19,7 @@ using System.Configuration; namespace Process_Auto_Relaunch { - public partial class Form1 : Form + public partial class MainWindow : Form { [Flags] public enum NotifyLevel @@ -44,7 +44,7 @@ namespace Process_Auto_Relaunch /// public string ProcessName { get { return textBoxProcessName.Text; } set { textBoxProcessName.Text = value; } } - public Form1() + public MainWindow() { InitializeComponent(); if (Settings.Default.upgradeSettings) diff --git a/Form1.resx b/MainWindow.resx similarity index 100% rename from Form1.resx rename to MainWindow.resx diff --git a/Process Auto Relaunch.csproj b/Process Auto Relaunch.csproj index 4bd7346..56291df 100644 --- a/Process Auto Relaunch.csproj +++ b/Process Auto Relaunch.csproj @@ -8,26 +8,13 @@ WinExe RelaunchProcess Relaunch Process + $([System.DateTime]::UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ")) v4.8 512 true true false - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true True False False @@ -44,6 +31,20 @@ + publish\ + false + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true RelaunchProcess.Program @@ -108,11 +109,11 @@ - + Form - - Form1.cs + + MainWindow.cs Form @@ -128,8 +129,8 @@ DiscordSettings.cs - - Form1.cs + + MainWindow.cs Designer @@ -172,6 +173,19 @@ false + + + + <_Parameter1>BuildDate + <_Parameter2>$(BuildDate) + + + + + + diff --git a/Program.cs b/Program.cs index 41f6d65..0c3f93a 100644 --- a/Program.cs +++ b/Program.cs @@ -19,7 +19,7 @@ namespace RelaunchProcess { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); + Application.Run(new MainWindow()); } } } diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index d01d108..6bc4fb0 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -29,7 +29,7 @@ using System.Runtime.InteropServices; // Номер сборки // Редакция // -[assembly: AssemblyVersion("1.6.1.7")] -[assembly: AssemblyFileVersion("1.6.1.7")] +[assembly: AssemblyVersion("1.6.1.8")] +[assembly: AssemblyFileVersion("1.6.1.8")] -[assembly: AssemblyInformationalVersion("1.6.1.7")] \ No newline at end of file +[assembly: AssemblyInformationalVersion("1.6.1.8")] \ No newline at end of file