Next step for having the settings of effects stored in the greenshot.ini, using a TypeConverter this seems to work. An important change to the IniValue.cs: here a default value is created when the ini doesn't have a value yet. This used to be just "null". Next step would be that settings forms get a reset/default button. [skip ci]

This commit is contained in:
RKrom 2014-11-17 12:49:06 +01:00
commit 8cb2dedb87
8 changed files with 263 additions and 44 deletions

View file

@ -25,6 +25,7 @@ using System.Drawing;
using Greenshot.Drawing.Fields;
using GreenshotPlugin.UnmanagedHelpers;
using Greenshot.IniFile;
using Greenshot.Core;
namespace Greenshot.Configuration {
/// <summary>
@ -57,6 +58,12 @@ namespace Greenshot.Configuration {
[IniProperty("SuppressSaveDialogAtClose", Description="Suppressed the 'do you want to save' dialog when closing the editor.", DefaultValue="False")]
public bool SuppressSaveDialogAtClose;
[IniProperty("DropShadowEffectSettings", Description = "Settings for the drop shadow effect.")]
public DropShadowEffect DropShadowEffectSettings;
[IniProperty("TornEdgeEffectSettings", Description = "Settings for the torn edge effect.")]
public TornEdgeEffect TornEdgeEffectSettings;
public override void AfterLoad() {
base.AfterLoad();
if (RecentColors == null) {