OSDN Git Service

エラーレポート送信者の更新履歴への掲載をオプトイン方式で指定可能にする
authorKimura Youichi <kim.upsilon@bucyou.net>
Mon, 2 Nov 2015 10:28:02 +0000 (19:28 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Mon, 2 Nov 2015 12:59:25 +0000 (21:59 +0900)
OpenTween/SendErrorReportForm.Designer.cs
OpenTween/SendErrorReportForm.cs
OpenTween/SendErrorReportForm.en.resx
OpenTween/SendErrorReportForm.resx

index 99a70a1..74b9b9c 100644 (file)
@@ -40,6 +40,7 @@
             this.label2 = new System.Windows.Forms.Label();
             this.buttonReset = new System.Windows.Forms.Button();
             this.pictureBoxIcon = new System.Windows.Forms.PictureBox();
+            this.checkBoxAnonymouns = new System.Windows.Forms.CheckBox();
             this.tableLayoutPanel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBoxIcon)).BeginInit();
             this.pictureBoxIcon.Name = "pictureBoxIcon";
             this.pictureBoxIcon.TabStop = false;
             // 
+            // checkBoxAnonymouns
+            // 
+            resources.ApplyResources(this.checkBoxAnonymouns, "checkBoxAnonymouns");
+            this.checkBoxAnonymouns.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.bindingSource, "AnonymousReport", true));
+            this.checkBoxAnonymouns.Name = "checkBoxAnonymouns";
+            this.checkBoxAnonymouns.UseVisualStyleBackColor = true;
+            // 
             // SendErrorReportForm
             // 
             this.AcceptButton = this.buttonSendByDM;
             this.Controls.Add(this.label1);
             this.Controls.Add(this.textBoxErrorReport);
             this.Controls.Add(this.tableLayoutPanel1);
+            this.Controls.Add(this.checkBoxAnonymouns);
             this.Name = "SendErrorReportForm";
             this.ShowIcon = false;
             this.Shown += new System.EventHandler(this.SendErrorReportForm_Shown);
         private System.Windows.Forms.Button buttonReset;
         private System.Windows.Forms.BindingSource bindingSource;
         private System.Windows.Forms.PictureBox pictureBoxIcon;
+        private System.Windows.Forms.CheckBox checkBoxAnonymouns;
     }
 }
\ No newline at end of file
index 5cda03a..fdb0c11 100644 (file)
@@ -107,6 +107,17 @@ namespace OpenTween
         }
         private string _reportText;
 
+        public bool AnonymousReport
+        {
+            get { return this._anonymousReport; }
+            set
+            {
+                this.SetProperty(ref this._anonymousReport, value);
+                this.UpdateEncodedReport();
+            }
+        }
+        private bool _anonymousReport = true;
+
         public bool CanSendByDM
         {
             get { return this._canSendByDm; }
@@ -167,7 +178,8 @@ namespace OpenTween
                 return;
             }
 
-            var originalBytes = Encoding.UTF8.GetBytes(this.ReportText);
+            var body = $"Anonymous: {this.AnonymousReport}" + Environment.NewLine + this.ReportText;
+            var originalBytes = Encoding.UTF8.GetBytes(body);
 
             using (var outputStream = new MemoryStream())
             {
index 0aa7b37..34e7d8b 100644 (file)
@@ -144,6 +144,12 @@ If an error report is too long, you might not be able to send by DM.</value>
   <data name="buttonReset.Text" xml:space="preserve">
     <value>&amp;Reset</value>
   </data>
+  <data name="checkBoxAnonymouns.Size" type="System.Drawing.Size, System.Drawing">
+    <value>442, 16</value>
+  </data>
+  <data name="checkBoxAnonymouns.Text" xml:space="preserve">
+    <value>I don't want my name (screen name) to show up in the changelog entry. (optional)</value>
+  </data>
   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   <data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
     <value>Inherit</value>
index b78ca12..3247cfc 100644 (file)
     <value>353, 29</value>
   </data>
   <data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
-    <value>4</value>
+    <value>5</value>
   </data>
   <data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
     <value>tableLayoutPanel1</value>
     <value>Vertical</value>
   </data>
   <data name="textBoxErrorReport.Size" type="System.Drawing.Size, System.Drawing">
-    <value>610, 209</value>
+    <value>610, 186</value>
   </data>
   <data name="textBoxErrorReport.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
     <value>532, 36</value>
   </data>
   <data name="label2.TabIndex" type="System.Int32, mscorlib">
-    <value>2</value>
+    <value>3</value>
   </data>
   <data name="label2.Text" xml:space="preserve">
     <value>もしエラーレポートの中にユーザー名など個人情報が含まれていた場合は、上のテキストから直接削除してください。
     <value>111, 25</value>
   </data>
   <data name="buttonReset.TabIndex" type="System.Int32, mscorlib">
-    <value>3</value>
+    <value>4</value>
   </data>
   <data name="buttonReset.Text" xml:space="preserve">
     <value>リセット(&amp;R)</value>
   <data name="&gt;&gt;pictureBoxIcon.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
+  <data name="checkBoxAnonymouns.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Bottom, Left</value>
+  </data>
+  <data name="checkBoxAnonymouns.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="checkBoxAnonymouns.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
+    <value>NoControl</value>
+  </data>
+  <data name="checkBoxAnonymouns.Location" type="System.Drawing.Point, System.Drawing">
+    <value>14, 246</value>
+  </data>
+  <data name="checkBoxAnonymouns.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
+    <value>5, 5, 5, 5</value>
+  </data>
+  <data name="checkBoxAnonymouns.Size" type="System.Drawing.Size, System.Drawing">
+    <value>376, 16</value>
+  </data>
+  <data name="checkBoxAnonymouns.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="checkBoxAnonymouns.Text" xml:space="preserve">
+    <value>報告者名(スクリーンネーム)の更新履歴への掲載を希望しない(オプション)</value>
+  </data>
+  <data name="&gt;&gt;checkBoxAnonymouns.Name" xml:space="preserve">
+    <value>checkBoxAnonymouns</value>
+  </data>
+  <data name="&gt;&gt;checkBoxAnonymouns.Type" xml:space="preserve">
+    <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;checkBoxAnonymouns.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;checkBoxAnonymouns.ZOrder" xml:space="preserve">
+    <value>6</value>
+  </data>
   <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>