deadmoon 3 years ago
parent
commit
b859830e60

+ 27 - 4
Optimizer/Forms/InfoForm.Designer.cs

@@ -30,6 +30,7 @@
         {
             this.btnOK = new System.Windows.Forms.Button();
             this.txtInfo = new System.Windows.Forms.TextBox();
+            this.copyIPB = new System.Windows.Forms.Button();
             this.SuspendLayout();
             // 
             // btnOK
@@ -42,10 +43,10 @@
             this.btnOK.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
             this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
             this.btnOK.ForeColor = System.Drawing.Color.White;
-            this.btnOK.Location = new System.Drawing.Point(519, 494);
+            this.btnOK.Location = new System.Drawing.Point(522, 492);
             this.btnOK.Margin = new System.Windows.Forms.Padding(2);
             this.btnOK.Name = "btnOK";
-            this.btnOK.Size = new System.Drawing.Size(96, 31);
+            this.btnOK.Size = new System.Drawing.Size(159, 31);
             this.btnOK.TabIndex = 32;
             this.btnOK.Tag = "themeable";
             this.btnOK.Text = "OK";
@@ -67,10 +68,30 @@
             this.txtInfo.Name = "txtInfo";
             this.txtInfo.ReadOnly = true;
             this.txtInfo.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
-            this.txtInfo.Size = new System.Drawing.Size(604, 471);
+            this.txtInfo.Size = new System.Drawing.Size(671, 471);
             this.txtInfo.TabIndex = 33;
             this.txtInfo.Text = "Integrator InfoBox";
             // 
+            // copyIPB
+            // 
+            this.copyIPB.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.copyIPB.BackColor = System.Drawing.Color.DodgerBlue;
+            this.copyIPB.DialogResult = System.Windows.Forms.DialogResult.Yes;
+            this.copyIPB.FlatAppearance.BorderColor = System.Drawing.Color.DodgerBlue;
+            this.copyIPB.FlatAppearance.MouseDownBackColor = System.Drawing.Color.RoyalBlue;
+            this.copyIPB.FlatAppearance.MouseOverBackColor = System.Drawing.Color.RoyalBlue;
+            this.copyIPB.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.copyIPB.ForeColor = System.Drawing.Color.White;
+            this.copyIPB.Location = new System.Drawing.Point(359, 492);
+            this.copyIPB.Margin = new System.Windows.Forms.Padding(2);
+            this.copyIPB.Name = "copyIPB";
+            this.copyIPB.Size = new System.Drawing.Size(159, 31);
+            this.copyIPB.TabIndex = 34;
+            this.copyIPB.Tag = "themeable";
+            this.copyIPB.Text = "Copy";
+            this.copyIPB.UseVisualStyleBackColor = false;
+            this.copyIPB.Click += new System.EventHandler(this.copyIPB_Click);
+            // 
             // InfoForm
             // 
             this.AcceptButton = this.btnOK;
@@ -78,7 +99,8 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
             this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
             this.CancelButton = this.btnOK;
-            this.ClientSize = new System.Drawing.Size(625, 534);
+            this.ClientSize = new System.Drawing.Size(692, 534);
+            this.Controls.Add(this.copyIPB);
             this.Controls.Add(this.txtInfo);
             this.Controls.Add(this.btnOK);
             this.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -101,5 +123,6 @@
 
         private System.Windows.Forms.Button btnOK;
         private System.Windows.Forms.TextBox txtInfo;
+        private System.Windows.Forms.Button copyIPB;
     }
 }

+ 33 - 0
Optimizer/Forms/InfoForm.cs

@@ -1,4 +1,6 @@
 using System;
+using System.Collections.Generic;
+using System.Linq;
 using System.Windows.Forms;
 
 namespace Optimizer
@@ -8,9 +10,31 @@ namespace Optimizer
         public InfoForm(string info)
         {
             InitializeComponent();
+            CheckForIllegalCrossThreadCalls = false;
+
             Options.ApplyTheme(this);
 
             txtInfo.Text = info;
+
+            // translate UI elements
+            if (Options.CurrentOptions.LanguageCode != LanguageCode.EN) Translate();
+        }
+
+        private void Translate()
+        {
+            Dictionary<string, string> translationList = Options.TranslationList.ToObject<Dictionary<string, string>>();
+
+            Control element;
+
+            foreach (var x in translationList)
+            {
+                if (x.Key == null || x.Key == string.Empty) continue;
+                element = this.Controls.Find(x.Key, true).FirstOrDefault();
+
+                if (element == null) continue;
+
+                element.Text = x.Value;
+            }
         }
 
         private void btnOK_Click(object sender, EventArgs e)
@@ -22,5 +46,14 @@ namespace Optimizer
         {
 
         }
+
+        private void copyIPB_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                Clipboard.SetText(txtInfo.Text);
+            }
+            catch { }
+        }
     }
 }

+ 1 - 1
Optimizer/Forms/MainForm.cs

@@ -2424,7 +2424,7 @@ namespace Optimizer
 
             linkWarnings.Visible = !string.IsNullOrEmpty(downloadLog);
 
-            txtDownloadStatus.Text = Options.TranslationList["Finished"];
+            txtDownloadStatus.Text = Options.TranslationList["downloadsFinished"];
         }
 
         string appNameTemp = string.Empty;

File diff suppressed because it is too large
+ 0 - 0
feed.json


BIN
images/feed.zip


BIN
images/feed/wireshark.png


Some files were not shown because too many files changed in this diff