Permalink
Browse files

2008-07-28 Ivan N. Zlatev <contact@i-nz.net>

	* Misc fixes and improvements. 


svn path=/trunk/mwf-designer/; revision=108966
  • Loading branch information...
1 parent 0a0c633 commit 4cd2699c24b21cd7482bd343a3197e4655809d6c @ivanz ivanz committed Jul 27, 2008
Showing with 19 additions and 8 deletions.
  1. +4 −0 ChangeLog
  2. +1 −1 deps/Mono.Design/Makefile
  3. +14 −7 src/Project/Document.cs
View
@@ -1,3 +1,7 @@
+2008-07-28 Ivan N. Zlatev <contact@i-nz.net>
+
+ * Misc fixes and improvements.
+
2008-07-27 Ivan N. Zlatev <contact@i-nz.net>
* Add a mono-design-update build target to the Makefile to allow
@@ -12,7 +12,7 @@ net-1:
export MCS_COLORS=disable;mcs -d:DEBUG,NET_1_1 -t:library -debug -r:${REFERENCES} -out:${ASSEMBLY} ${SOURCES}
clean:
- rm .generated
+ rm -f .generated
update: clean generate-md
View
@@ -97,18 +97,21 @@ public bool Load ()
// Mark as Modified on ComponentChanged
//
IComponentChangeService changeService = (IComponentChangeService)_surface.GetService (typeof (IComponentChangeService));
- changeService.ComponentChanged += delegate {
- _modified = true;
- if (Modified != null)
- Modified (this, EventArgs.Empty);
- };
+ changeService.ComponentChanged += new ComponentChangedEventHandler (OnComponentChanged);
if (Loaded != null)
Loaded (this, EventArgs.Empty);
}
return _loaded;
}
+ private void OnComponentChanged (object sender, ComponentChangedEventArgs args)
+ {
+ _modified = true;
+ if (Modified != null)
+ Modified (this, EventArgs.Empty);
+ }
+
public bool LoadSuccessful {
get { return _loaded; }
set { _loaded = value; }
@@ -149,8 +152,12 @@ public void Save ()
public void Dispose ()
{
- _surface.Dispose ();
- _codeProvider = null;
+ if (_surface.IsLoaded) {
+ IComponentChangeService changeService = (IComponentChangeService)_surface.GetService (typeof (IComponentChangeService));
+ changeService.ComponentChanged -= new ComponentChangedEventHandler (OnComponentChanged);
+ _surface.Dispose ();
+ _codeProvider = null;
+ }
}
public event EventHandler Loaded;

0 comments on commit 4cd2699

Please sign in to comment.