Browse Source

add update log feature in about dialog

gsp 1 year ago
parent
commit
9b0c6b171b

+ 2 - 0
Bin/x64/Debug/Version.txt

@@ -0,0 +1,2 @@
+=====================================
+OTS 3.0°æ±¾

+ 4 - 4
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/frmInitializeStartInput.Designer.cs

@@ -60,7 +60,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
             this.button1.Name = "button1";
             this.button1.Size = new System.Drawing.Size(59, 25);
             this.button1.TabIndex = 2;
-            this.button1.Text = "确定";
+            this.button1.Text = "OK";
             this.button1.UseVisualStyleBackColor = true;
             this.button1.Click += new System.EventHandler(this.button1_Click);
             // 
@@ -70,7 +70,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
             this.button2.Name = "button2";
             this.button2.Size = new System.Drawing.Size(59, 25);
             this.button2.TabIndex = 3;
-            this.button2.Text = "取消";
+            this.button2.Text = "Cancel";
             this.button2.UseVisualStyleBackColor = true;
             this.button2.Click += new System.EventHandler(this.button2_Click);
             // 
@@ -80,9 +80,9 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
             this.label2.Font = new System.Drawing.Font("SimSun", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.Location = new System.Drawing.Point(3, 126);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(188, 16);
+            this.label2.Size = new System.Drawing.Size(242, 16);
             this.label2.TabIndex = 4;
-            this.label2.Text = " After the Field No!";
+            this.label2.Text = " After the Start Field No!";
             // 
             // label3
             // 

+ 38 - 7
OTSIncAMeasureApp/About.Designer.cs

@@ -31,12 +31,14 @@ namespace OTSMeasureApp
         {
             this.button_OK = new System.Windows.Forms.Button();
             this.richTextBox1 = new System.Windows.Forms.RichTextBox();
+            this.richTextBox2 = new System.Windows.Forms.RichTextBox();
+            this.button1 = new System.Windows.Forms.Button();
             this.SuspendLayout();
             // 
             // button_OK
             // 
-            this.button_OK.Location = new System.Drawing.Point(135, 98);
-            this.button_OK.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.button_OK.Location = new System.Drawing.Point(142, 97);
+            this.button_OK.Margin = new System.Windows.Forms.Padding(2);
             this.button_OK.Name = "button_OK";
             this.button_OK.Size = new System.Drawing.Size(77, 25);
             this.button_OK.TabIndex = 0;
@@ -51,12 +53,37 @@ namespace OTSMeasureApp
             this.richTextBox1.Cursor = System.Windows.Forms.Cursors.No;
             this.richTextBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.richTextBox1.ForeColor = System.Drawing.SystemColors.HotTrack;
-            this.richTextBox1.Location = new System.Drawing.Point(15, 11);
-            this.richTextBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.richTextBox1.Location = new System.Drawing.Point(83, 11);
+            this.richTextBox1.Margin = new System.Windows.Forms.Padding(2);
             this.richTextBox1.Name = "richTextBox1";
-            this.richTextBox1.Size = new System.Drawing.Size(331, 69);
+            this.richTextBox1.Size = new System.Drawing.Size(136, 30);
             this.richTextBox1.TabIndex = 1;
-            this.richTextBox1.Text = "";
+            this.richTextBox1.Text = "Version : 3.1";
+            // 
+            // richTextBox2
+            // 
+            this.richTextBox2.BackColor = System.Drawing.SystemColors.Menu;
+            this.richTextBox2.BorderStyle = System.Windows.Forms.BorderStyle.None;
+            this.richTextBox2.Cursor = System.Windows.Forms.Cursors.No;
+            this.richTextBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.richTextBox2.ForeColor = System.Drawing.SystemColors.HotTrack;
+            this.richTextBox2.Location = new System.Drawing.Point(83, 45);
+            this.richTextBox2.Margin = new System.Windows.Forms.Padding(2);
+            this.richTextBox2.Name = "richTextBox2";
+            this.richTextBox2.Size = new System.Drawing.Size(262, 30);
+            this.richTextBox2.TabIndex = 1;
+            this.richTextBox2.Text = "Opton Copyright © 2024";
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(236, 14);
+            this.button1.Margin = new System.Windows.Forms.Padding(2);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(77, 25);
+            this.button1.TabIndex = 2;
+            this.button1.Text = "update log";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
             // 
             // About
             // 
@@ -64,10 +91,12 @@ namespace OTSMeasureApp
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
             this.ClientSize = new System.Drawing.Size(377, 143);
+            this.Controls.Add(this.button1);
+            this.Controls.Add(this.richTextBox2);
             this.Controls.Add(this.richTextBox1);
             this.Controls.Add(this.button_OK);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
-            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Margin = new System.Windows.Forms.Padding(2);
             this.MaximizeBox = false;
             this.MinimizeBox = false;
             this.Name = "About";
@@ -84,5 +113,7 @@ namespace OTSMeasureApp
 
         private System.Windows.Forms.Button button_OK;
         private System.Windows.Forms.RichTextBox richTextBox1;
+        private System.Windows.Forms.RichTextBox richTextBox2;
+        private System.Windows.Forms.Button button1;
     }
 }

+ 7 - 8
OTSIncAMeasureApp/About.cs

@@ -20,20 +20,19 @@ namespace OTSMeasureApp
         private void About_Load(object sender, EventArgs e)
         {
 
-            richTextBox1.Text = "Version : 3.0\n";
-            richTextBox1.Text += "Opton Copyright © 2024";
-            richTextBox1.Select(0, richTextBox1.Text.Length);
-            //richTextBox1.SelectionColor = Color.DarkBlue;
-            richTextBox1.SelectionAlignment = HorizontalAlignment.Center;
-            richTextBox1.ReadOnly = true;
             richTextBox1.Enabled = false;
-            richTextBox1.Select(0, 0);
-            this.Focus();
+            richTextBox2.Enabled = false;
+            
         }
 
         private void button_OK_Click(object sender, EventArgs e)
         {
             this.Close();
         }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            System.Diagnostics.Process.Start("notepad.exe", Application.StartupPath+"\\version.txt");
+        }
     }
 }