예제 #1
0
        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();
        }
예제 #2
0
        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();
        }
예제 #3
0
        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();
        }
예제 #4
0
		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 ();
		}
예제 #5
0
		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);
		}
예제 #6
0
        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);
        }
예제 #7
0
        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();
            }
        }
예제 #8
0
		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 ();
		}
예제 #9
0
		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 ();
		}
예제 #10
0
        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 ();
            }
        }
예제 #11
0
		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 ();
		}