public void Close() { fileName = null; if (actionGroups != null && ownedGlobalActionGroups) { foreach (Stetic.Wrapper.ActionGroup ag in actionGroups) { ag.Dispose(); } actionGroups.Clear(); } foreach (WidgetData wd in topLevels) { if (wd.Widget != null) { wd.Widget.Destroy(); } } selection = null; topLevels.Clear(); widgetLibraries.Clear(); iconFactory = new ProjectIconFactory(); }
public void LoadStatus(object ob) { if (frontend != null) { frontend.NotifyProjectReloading(); } if (ProjectReloading != null) { ProjectReloading(this, EventArgs.Empty); } ProjectIconFactory icf = iconFactory; Read((XmlDocument)ob); // Reuse the same icon factory, since a registry change has no effect to it // and it may be inherited from another project iconFactory = icf; if (frontend != null) { frontend.NotifyProjectReloaded(); } if (ProjectReloaded != null) { ProjectReloaded(this, EventArgs.Empty); } NotifyComponentTypesChanged(); }
public ProjectBackend(ApplicationBackend app) { this.app = app; topLevels = new List <WidgetData> (); ActionGroups = new Stetic.Wrapper.ActionGroupCollection(); Registry.RegistryChanging += OnRegistryChanging; Registry.RegistryChanged += OnRegistryChanged; iconFactory = new ProjectIconFactory(); widgetLibraries = new ArrayList(); internalLibs = new ArrayList(); }
public ProjectBackend (ApplicationBackend app) { this.app = app; topLevels = new List<WidgetData> (); ActionGroups = new Stetic.Wrapper.ActionGroupCollection (); Registry.RegistryChanging += OnRegistryChanging; Registry.RegistryChanged += OnRegistryChanged; iconFactory = new ProjectIconFactory (); widgetLibraries = new ArrayList (); internalLibs = new ArrayList (); }
public void Dispose () { // First of all, disconnect from the frontend, // to avoid sending notifications while disposing frontend = null; if (oldTopActionCollection != null) oldTopActionCollection.ActionGroupChanged -= OnComponentTypesChanged; Registry.RegistryChanging -= OnRegistryChanging; Registry.RegistryChanged -= OnRegistryChanged; Close (); iconFactory = null; ActionGroups = null; System.Runtime.Remoting.RemotingServices.Disconnect (this); }
public void Dispose() { // First of all, disconnect from the frontend, // to avoid sending notifications while disposing frontend = null; if (oldTopActionCollection != null) { oldTopActionCollection.ActionGroupChanged -= OnComponentTypesChanged; } Registry.RegistryChanging -= OnRegistryChanging; Registry.RegistryChanged -= OnRegistryChanged; Close(); iconFactory = null; ActionGroups = null; System.Runtime.Remoting.RemotingServices.Disconnect(this); }
void OnRegistryChanged(object o, EventArgs args) { if (loading) { return; } if (tempDoc != null) { if (frontend != null) { frontend.NotifyProjectReloading(); } if (ProjectReloading != null) { ProjectReloading(this, EventArgs.Empty); } ProjectIconFactory icf = iconFactory; Read(tempDoc); // Reuse the same icon factory, since a registry change has no effect to it // and it may be inherited from another project iconFactory = icf; tempDoc = null; if (frontend != null) { frontend.NotifyProjectReloaded(); } if (ProjectReloaded != null) { ProjectReloaded(this, EventArgs.Empty); } NotifyComponentTypesChanged(); } }
public void LoadStatus (object ob) { if (frontend != null) frontend.NotifyProjectReloading (); if (ProjectReloading != null) ProjectReloading (this, EventArgs.Empty); ProjectIconFactory icf = iconFactory; Read ((XmlDocument)ob); // Reuse the same icon factory, since a registry change has no effect to it // and it may be inherited from another project iconFactory = icf; if (frontend != null) frontend.NotifyProjectReloaded (); if (ProjectReloaded != null) ProjectReloaded (this, EventArgs.Empty); NotifyComponentTypesChanged (); }
public void Close () { fileName = null; if (actionGroups != null && ownedGlobalActionGroups) { foreach (Stetic.Wrapper.ActionGroup ag in actionGroups) ag.Dispose (); actionGroups.Clear (); } foreach (WidgetData wd in topLevels) { if (wd.Widget != null) { try { wd.Widget.Destroy (); } catch (Exception e) { Console.WriteLine (e); } } } selection = null; topLevels.Clear (); widgetLibraries.Clear (); iconFactory = new ProjectIconFactory (); }
void OnRegistryChanged(object o, EventArgs args) { if (loading) return; if (tempDoc != null) { if (frontend != null) frontend.NotifyProjectReloading (); if (ProjectReloading != null) ProjectReloading (this, EventArgs.Empty); ProjectIconFactory icf = iconFactory; Read (tempDoc); // Reuse the same icon factory, since a registry change has no effect to it // and it may be inherited from another project iconFactory = icf; tempDoc = null; if (frontend != null) frontend.NotifyProjectReloaded (); if (ProjectReloaded != null) ProjectReloaded (this, EventArgs.Empty); NotifyComponentTypesChanged (); } }
public void Close () { if (actionGroups != null && ownedGlobalActionGroups) { foreach (Stetic.Wrapper.ActionGroup ag in actionGroups) ag.Dispose (); actionGroups.Clear (); } foreach (WidgetData wd in topLevels) { if (wd.Widget != null) wd.Widget.Destroy (); } selection = null; topLevels.Clear (); //widgetLibraries.Clear (); iconFactory = new ProjectIconFactory (); }