Index: Core/Common/src/Core.Common.Base/ApplicationCore.cs =================================================================== diff -u -ra0af742d946a15bead91b315b77086154f1ed15e -rf5f8af6de6466c42cba57df77748b5e848951490 --- Core/Common/src/Core.Common.Base/ApplicationCore.cs (.../ApplicationCore.cs) (revision a0af742d946a15bead91b315b77086154f1ed15e) +++ Core/Common/src/Core.Common.Base/ApplicationCore.cs (.../ApplicationCore.cs) (revision f5f8af6de6466c42cba57df77748b5e848951490) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; +using System.ComponentModel; using System.Configuration; using System.Linq; using Core.Common.Base.Workflow; @@ -14,7 +15,8 @@ private readonly ActivityRunner activityRunner; private readonly List plugins; - private ApplicationCoreSettings userSettings; + private bool userSettingsDirty; + private ApplicationSettingsBase userSettings; public ApplicationCore() { @@ -30,7 +32,7 @@ } } - public IEnumerable Plugins + public IEnumerable Plugins { get { @@ -54,7 +56,19 @@ } set { - userSettings = new ApplicationCoreSettings(value); // small hack, wrap settings so that we will know when they are changed. + if (userSettings != null) + { + userSettings.PropertyChanged -= UserSettingsPropertyChanged; + } + + userSettings = value; + + if (userSettings != null) + { + userSettings.PropertyChanged += UserSettingsPropertyChanged; + } + + userSettingsDirty = false; } } @@ -118,7 +132,7 @@ public void Exit() { - if (userSettings.IsDirty) + if (userSettingsDirty) { UserSettings.Save(); } @@ -136,5 +150,10 @@ RunningActivityLogAppender.Instance.ActivityRunner = null; } } + + private void UserSettingsPropertyChanged(object sender, PropertyChangedEventArgs e) + { + userSettingsDirty = true; + } } } \ No newline at end of file Fisheye: Tag f5f8af6de6466c42cba57df77748b5e848951490 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Base/ApplicationCoreSettings.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Base/Core.Common.Base.csproj =================================================================== diff -u -r82896dc21c35e58d3f836b4f3a4dfd697023690d -rf5f8af6de6466c42cba57df77748b5e848951490 --- Core/Common/src/Core.Common.Base/Core.Common.Base.csproj (.../Core.Common.Base.csproj) (revision 82896dc21c35e58d3f836b4f3a4dfd697023690d) +++ Core/Common/src/Core.Common.Base/Core.Common.Base.csproj (.../Core.Common.Base.csproj) (revision f5f8af6de6466c42cba57df77748b5e848951490) @@ -96,7 +96,6 @@ - Index: Core/Common/test/Core.Common.Tests/Core.Common.Tests.csproj =================================================================== diff -u -r8ed458d0460c2bab956a7c3a75c2cdb5c1aae3e6 -rf5f8af6de6466c42cba57df77748b5e848951490 --- Core/Common/test/Core.Common.Tests/Core.Common.Tests.csproj (.../Core.Common.Tests.csproj) (revision 8ed458d0460c2bab956a7c3a75c2cdb5c1aae3e6) +++ Core/Common/test/Core.Common.Tests/Core.Common.Tests.csproj (.../Core.Common.Tests.csproj) (revision f5f8af6de6466c42cba57df77748b5e848951490) @@ -88,7 +88,6 @@ - Fisheye: Tag f5f8af6de6466c42cba57df77748b5e848951490 refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Tests/Core/ApplicationCoreSettingsTest.cs'. Fisheye: No comparison available. Pass `N' to diff?