OSDN Git Service

エラーの詳細をクリップボードにコピーするボタンを付ける
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Wed, 13 Dec 2017 14:21:15 +0000 (23:21 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Wed, 13 Dec 2017 14:21:15 +0000 (23:21 +0900)
KancolleSniffer/ErrorDialog.Designer.cs
KancolleSniffer/ErrorDialog.cs

index 2908978..3596bae 100644 (file)
@@ -49,6 +49,7 @@ namespace KancolleSniffer
             this.labelMessage = new System.Windows.Forms.Label();\r
             this.label1 = new System.Windows.Forms.Label();\r
             this.checkBoxDisable = new System.Windows.Forms.CheckBox();\r
+            this.buttonCopyToClipboard = new System.Windows.Forms.Button();\r
             this.SuspendLayout();\r
             // \r
             // textBoxDetails\r
@@ -123,12 +124,24 @@ namespace KancolleSniffer
             this.checkBoxDisable.Text = "一時的に表示を止める";\r
             this.checkBoxDisable.UseVisualStyleBackColor = true;\r
             // \r
+            // buttonCopyToClipboard\r
+            // \r
+            this.buttonCopyToClipboard.AutoSize = true;\r
+            this.buttonCopyToClipboard.Location = new System.Drawing.Point(228, 77);\r
+            this.buttonCopyToClipboard.Name = "buttonCopyToClipboard";\r
+            this.buttonCopyToClipboard.Size = new System.Drawing.Size(75, 23);\r
+            this.buttonCopyToClipboard.TabIndex = 7;\r
+            this.buttonCopyToClipboard.Text = "すべてコピー";\r
+            this.buttonCopyToClipboard.UseVisualStyleBackColor = true;\r
+            this.buttonCopyToClipboard.Click += new System.EventHandler(this.buttonCopyToClipboard_Click);\r
+            // \r
             // ErrorDialog\r
             // \r
             this.AcceptButton = this.buttonContinue;\r
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\r
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
             this.ClientSize = new System.Drawing.Size(334, 265);\r
+            this.Controls.Add(this.buttonCopyToClipboard);\r
             this.Controls.Add(this.checkBoxDisable);\r
             this.Controls.Add(this.label1);\r
             this.Controls.Add(this.labelMessage);\r
@@ -156,5 +169,6 @@ namespace KancolleSniffer
         private System.Windows.Forms.Label labelMessage;\r
         private System.Windows.Forms.Label label1;\r
         private System.Windows.Forms.CheckBox checkBoxDisable;\r
+        private System.Windows.Forms.Button buttonCopyToClipboard;\r
     }\r
 }
\ No newline at end of file
index db94d95..cb3e37c 100644 (file)
@@ -42,5 +42,10 @@ namespace KancolleSniffer
             base.OnFontChanged(e);\r
             textBoxDetails.Font = new Font(new FontFamily("MS Gothic"), Font.Size);\r
         }\r
+\r
+        private void buttonCopyToClipboard_Click(object sender, EventArgs e)\r
+        {\r
+            Clipboard.SetText(textBoxDetails.Text);\r
+        }\r
     }\r
 }
\ No newline at end of file