mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Code quality changes
This commit is contained in:
parent
f07ed83722
commit
610f45d082
189 changed files with 4609 additions and 5203 deletions
|
@ -21,14 +21,14 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using Greenshot.Core;
|
||||
using GreenshotPlugin.Effects;
|
||||
|
||||
namespace Greenshot.Forms {
|
||||
public partial class DropShadowSettingsForm : BaseForm {
|
||||
private readonly DropShadowEffect effect;
|
||||
private readonly DropShadowEffect _effect;
|
||||
|
||||
public DropShadowSettingsForm(DropShadowEffect effect) {
|
||||
this.effect = effect;
|
||||
_effect = effect;
|
||||
InitializeComponent();
|
||||
ShowSettings();
|
||||
}
|
||||
|
@ -37,16 +37,16 @@ namespace Greenshot.Forms {
|
|||
/// Apply the settings from the effect to the view
|
||||
/// </summary>
|
||||
private void ShowSettings() {
|
||||
trackBar1.Value = (int)(effect.Darkness * 40);
|
||||
offsetX.Value = effect.ShadowOffset.X;
|
||||
offsetY.Value = effect.ShadowOffset.Y;
|
||||
thickness.Value = effect.ShadowSize;
|
||||
trackBar1.Value = (int)(_effect.Darkness * 40);
|
||||
offsetX.Value = _effect.ShadowOffset.X;
|
||||
offsetY.Value = _effect.ShadowOffset.Y;
|
||||
thickness.Value = _effect.ShadowSize;
|
||||
}
|
||||
|
||||
private void ButtonOK_Click(object sender, EventArgs e) {
|
||||
effect.Darkness = (float)trackBar1.Value / (float)40;
|
||||
effect.ShadowOffset = new Point((int)offsetX.Value, (int)offsetY.Value);
|
||||
effect.ShadowSize = (int)thickness.Value;
|
||||
_effect.Darkness = trackBar1.Value / (float)40;
|
||||
_effect.ShadowOffset = new Point((int)offsetX.Value, (int)offsetY.Value);
|
||||
_effect.ShadowSize = (int)thickness.Value;
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue