Removed unnecessary this. usages

This commit is contained in:
Jaex 2018-10-09 14:30:22 +03:00
parent ab6d3af1ad
commit aa46c723b8
7 changed files with 101 additions and 101 deletions

View file

@ -135,36 +135,36 @@ protected override void Dispose(bool disposing)
private void InitializeComponent() private void InitializeComponent()
{ {
this.colorBox = new HelpersLib.ColorBox(); colorBox = new HelpersLib.ColorBox();
this.colorSlider = new HelpersLib.ColorSlider(); colorSlider = new HelpersLib.ColorSlider();
this.SuspendLayout(); SuspendLayout();
// //
// colorBox // colorBox
// //
this.colorBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; colorBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.colorBox.DrawStyle = HelpersLib.DrawStyle.Hue; colorBox.DrawStyle = HelpersLib.DrawStyle.Hue;
this.colorBox.Location = new System.Drawing.Point(0, 0); colorBox.Location = new System.Drawing.Point(0, 0);
this.colorBox.Name = "colorBox"; colorBox.Name = "colorBox";
this.colorBox.Size = new System.Drawing.Size(258, 258); colorBox.Size = new System.Drawing.Size(258, 258);
this.colorBox.TabIndex = 0; colorBox.TabIndex = 0;
// //
// colorSlider // colorSlider
// //
this.colorSlider.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; colorSlider.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.colorSlider.DrawStyle = HelpersLib.DrawStyle.Hue; colorSlider.DrawStyle = HelpersLib.DrawStyle.Hue;
this.colorSlider.Location = new System.Drawing.Point(257, 0); colorSlider.Location = new System.Drawing.Point(257, 0);
this.colorSlider.Name = "colorSlider"; colorSlider.Name = "colorSlider";
this.colorSlider.Size = new System.Drawing.Size(32, 258); colorSlider.Size = new System.Drawing.Size(32, 258);
this.colorSlider.TabIndex = 1; colorSlider.TabIndex = 1;
// //
// ColorPicker // ColorPicker
// //
this.AutoSize = true; AutoSize = true;
this.Controls.Add(this.colorBox); Controls.Add(colorBox);
this.Controls.Add(this.colorSlider); Controls.Add(colorSlider);
this.Name = "ColorPicker"; Name = "ColorPicker";
this.Size = new System.Drawing.Size(292, 261); Size = new System.Drawing.Size(292, 261);
this.ResumeLayout(false); ResumeLayout(false);
} }
#endregion Component Designer generated code #endregion Component Designer generated code

View file

@ -120,35 +120,35 @@ protected override void Dispose(bool disposing)
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.pbPreview = new MyPictureBox(); pbPreview = new MyPictureBox();
this.SuspendLayout(); SuspendLayout();
this.BackColor = SystemColors.Window; BackColor = SystemColors.Window;
this.Bounds = CaptureHelpers.GetActiveScreenBounds(); Bounds = CaptureHelpers.GetActiveScreenBounds();
this.DoubleBuffered = true; DoubleBuffered = true;
this.FormBorderStyle = FormBorderStyle.None; FormBorderStyle = FormBorderStyle.None;
this.Text = "ShareX - Image viewer"; Text = "ShareX - Image viewer";
this.TopMost = true; TopMost = true;
this.WindowState = FormWindowState.Normal; WindowState = FormWindowState.Normal;
this.StartPosition = FormStartPosition.Manual; StartPosition = FormStartPosition.Manual;
this.pbPreview.Cursor = Cursors.Hand; pbPreview.Cursor = Cursors.Hand;
this.pbPreview.Dock = System.Windows.Forms.DockStyle.Fill; pbPreview.Dock = System.Windows.Forms.DockStyle.Fill;
this.pbPreview.DrawCheckeredBackground = true; pbPreview.DrawCheckeredBackground = true;
this.pbPreview.FullscreenOnClick = false; pbPreview.FullscreenOnClick = false;
this.pbPreview.Location = new System.Drawing.Point(0, 0); pbPreview.Location = new System.Drawing.Point(0, 0);
this.pbPreview.Name = "pbPreview"; pbPreview.Name = "pbPreview";
this.pbPreview.Size = new System.Drawing.Size(96, 100); pbPreview.Size = new System.Drawing.Size(96, 100);
this.pbPreview.TabIndex = 0; pbPreview.TabIndex = 0;
this.pbPreview.LoadImage(screenshot); pbPreview.LoadImage(screenshot);
this.Controls.Add(this.pbPreview); Controls.Add(pbPreview);
this.Shown += new System.EventHandler(this.ShowScreenshot_Shown); Shown += new System.EventHandler(ShowScreenshot_Shown);
this.Deactivate += new System.EventHandler(this.ShowScreenshot_Deactivate); Deactivate += new System.EventHandler(ShowScreenshot_Deactivate);
pbPreview.MouseDown += pbPreview_MouseDown; pbPreview.MouseDown += pbPreview_MouseDown;
pbPreview.KeyDown += pbPreview_KeyDown; pbPreview.KeyDown += pbPreview_KeyDown;
this.ResumeLayout(false); ResumeLayout(false);
} }
private MyPictureBox pbPreview; private MyPictureBox pbPreview;

View file

@ -49,8 +49,8 @@ public InputBox(string title = null, string inputText = null, string okText = nu
private void InputBox_Shown(object sender, EventArgs e) private void InputBox_Shown(object sender, EventArgs e)
{ {
this.ForceActivate(); this.ForceActivate();
this.MinimumSize = new Size(384, this.Size.Height); MinimumSize = new Size(384, Size.Height);
this.MaximumSize = new Size(1000, this.Size.Height); MaximumSize = new Size(1000, Size.Height);
txtInputText.SelectionLength = txtInputText.Text.Length; txtInputText.SelectionLength = txtInputText.Text.Length;
} }
@ -98,48 +98,48 @@ protected override void Dispose(bool disposing)
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InputBox)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InputBox));
this.btnOK = new System.Windows.Forms.Button(); btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button(); btnCancel = new System.Windows.Forms.Button();
this.txtInputText = new System.Windows.Forms.TextBox(); txtInputText = new System.Windows.Forms.TextBox();
this.SuspendLayout(); SuspendLayout();
// //
// btnOK // btnOK
// //
resources.ApplyResources(this.btnOK, "btnOK"); resources.ApplyResources(btnOK, "btnOK");
this.btnOK.Name = "btnOK"; btnOK.Name = "btnOK";
this.btnOK.UseVisualStyleBackColor = true; btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click); btnOK.Click += new System.EventHandler(btnOK_Click);
// //
// btnCancel // btnCancel
// //
resources.ApplyResources(this.btnCancel, "btnCancel"); resources.ApplyResources(btnCancel, "btnCancel");
this.btnCancel.Name = "btnCancel"; btnCancel.Name = "btnCancel";
this.btnCancel.UseVisualStyleBackColor = true; btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); btnCancel.Click += new System.EventHandler(btnCancel_Click);
// //
// txtInputText // txtInputText
// //
resources.ApplyResources(this.txtInputText, "txtInputText"); resources.ApplyResources(txtInputText, "txtInputText");
this.txtInputText.Name = "txtInputText"; txtInputText.Name = "txtInputText";
// //
// InputBox // InputBox
// //
this.AcceptButton = this.btnOK; AcceptButton = btnOK;
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window; BackColor = System.Drawing.SystemColors.Window;
this.Controls.Add(this.txtInputText); Controls.Add(txtInputText);
this.Controls.Add(this.btnCancel); Controls.Add(btnCancel);
this.Controls.Add(this.btnOK); Controls.Add(btnOK);
this.MaximizeBox = false; MaximizeBox = false;
this.MinimizeBox = false; MinimizeBox = false;
this.Name = "InputBox"; Name = "InputBox";
this.ShowInTaskbar = false; ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.TopMost = true; TopMost = true;
this.Shown += new System.EventHandler(this.InputBox_Shown); Shown += new System.EventHandler(InputBox_Shown);
this.ResumeLayout(false); ResumeLayout(false);
this.PerformLayout(); PerformLayout();
} }
private System.Windows.Forms.Button btnOK; private System.Windows.Forms.Button btnOK;

View file

@ -130,7 +130,7 @@ private void llAttribution_LinkClicked(object sender, LinkLabelLinkClickedEventA
private void llGoogleTranslate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) private void llGoogleTranslate_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{ {
URLHelpers.OpenURL("https://translate.google.com/#auto/en/" + Uri.EscapeDataString(txtResult.Text)); URLHelpers.OpenURL("https://translate.google.com/#auto/en/" + Uri.EscapeDataString(txtResult.Text));
this.Close(); Close();
} }
} }
} }

View file

@ -107,7 +107,7 @@ private void AfterCapture(ImageInfo imageInfo, TaskSettings taskSettings)
} }
if (taskSettings.ImageSettings.ImageEffectOnlyRegionCapture && if (taskSettings.ImageSettings.ImageEffectOnlyRegionCapture &&
this.GetType() != typeof(CaptureRegion) && this.GetType() != typeof(CaptureLastRegion)) GetType() != typeof(CaptureRegion) && GetType() != typeof(CaptureLastRegion))
{ {
taskSettings.AfterCaptureJob = taskSettings.AfterCaptureJob.Remove(AfterCaptureTasks.AddImageEffects); taskSettings.AfterCaptureJob = taskSettings.AfterCaptureJob.Remove(AfterCaptureTasks.AddImageEffects);
} }

View file

@ -190,11 +190,11 @@ protected override void Dispose(bool disposing)
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Cursor = Cursors.SizeAll; Cursor = Cursors.SizeAll;
this.Text = "DropForm"; Text = "DropForm";
this.AllowDrop = true; AllowDrop = true;
MouseDown += DropForm_MouseDown; MouseDown += DropForm_MouseDown;
MouseUp += DropForm_MouseUp; MouseUp += DropForm_MouseUp;

View file

@ -287,34 +287,34 @@ protected override void Dispose(bool disposing)
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); components = new System.ComponentModel.Container();
this.tDuration = new System.Windows.Forms.Timer(this.components); tDuration = new System.Windows.Forms.Timer(components);
this.tOpacity = new System.Windows.Forms.Timer(this.components); tOpacity = new System.Windows.Forms.Timer(components);
this.SuspendLayout(); SuspendLayout();
// //
// tDuration // tDuration
// //
this.tDuration.Tick += new System.EventHandler(this.tDuration_Tick); tDuration.Tick += new System.EventHandler(tDuration_Tick);
// //
// tOpacity // tOpacity
// //
this.tOpacity.Tick += new System.EventHandler(this.tOpacity_Tick); tOpacity.Tick += new System.EventHandler(tOpacity_Tick);
// //
// NotificationForm // NotificationForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(400, 300); ClientSize = new System.Drawing.Size(400, 300);
this.Cursor = System.Windows.Forms.Cursors.Hand; Cursor = System.Windows.Forms.Cursors.Hand;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "NotificationForm"; Name = "NotificationForm";
this.ShowInTaskbar = false; ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "NotificationForm"; Text = "NotificationForm";
this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.NotificationForm_MouseClick); MouseClick += new System.Windows.Forms.MouseEventHandler(NotificationForm_MouseClick);
this.MouseEnter += new System.EventHandler(this.NotificationForm_MouseEnter); MouseEnter += new System.EventHandler(NotificationForm_MouseEnter);
this.MouseLeave += new System.EventHandler(this.NotificationForm_MouseLeave); MouseLeave += new System.EventHandler(NotificationForm_MouseLeave);
this.ResumeLayout(false); ResumeLayout(false);
} }
#endregion Windows Form Designer generated code #endregion Windows Form Designer generated code