Наследование: System.MarshalByRefObject, IDisposable
Пример #1
0
 public void SetActiveDesignSession(WidgetEditSession session)
 {
     activeDesignSession = session;
     if (projectWidget != null)
     {
         projectWidget.Bind(session);
     }
 }
Пример #2
0
 void CreateSession()
 {
     try {
         session = project.ProjectBackend.CreateWidgetDesignerSession(frontend, componentName);
         ResetCustomWidget();
         rootWidget = app.GetComponent(session.RootWidget, null, null);
     } catch (Exception ex) {
         Console.WriteLine(ex);
         Gtk.Label lab = new Gtk.Label();
         lab.Text         = Mono.Unix.Catalog.GetString("The designer could not be loaded.") + "\n\n" + ex.Message;
         lab.Wrap         = true;
         lab.WidthRequest = 400;
         AddCustomWidget(lab);
         session = null;
     }
 }
Пример #3
0
		public void Bind (WidgetEditSession newSession) 
		{
			if (editSession != null) {
				editSession.SelectionChanged -= WidgetSelected;
				editSession.EditingBackend.ProjectReloaded -= OnProjectReloaded;
				editSession.EditingBackend.WidgetNameChanged -= OnWidgetNameChanged;
				editSession.EditingBackend.WidgetContentsChanged -= OnContentsChanged;
			}
			editSession = newSession;
			if (editSession != null) {
				editSession.SelectionChanged += WidgetSelected;
				editSession.EditingBackend.ProjectReloaded += OnProjectReloaded;
				editSession.EditingBackend.WidgetNameChanged += OnWidgetNameChanged;
				editSession.EditingBackend.WidgetContentsChanged += OnContentsChanged;
			}
			LoadProject ();
		}
        protected override void OnDestroyed()
        {
            try
            {
                if (disposed)
                {
                    return;
                }

                if (project.App.ActiveProject == editedProject)
                {
                    project.App.ActiveProject = null;
                }

                disposed                             = true;
                frontend.disposed                    = true;
                editedProject.SignalAdded           -= OnSignalAdded;
                editedProject.SignalRemoved         -= OnSignalRemoved;
                editedProject.SignalChanged         -= OnSignalChanged;
                editedProject.ComponentNameChanged  -= OnComponentNameChanged;
                editedProject.BackendChanged        -= OnProjectBackendChanged;
                editedProject.ComponentTypesChanged -= OnComponentTypesChanged;
                project.BackendChanged              -= OnProjectBackendChanged;

                if (session != null)
                {
                    session.Dispose();
                    session = null;
                }

                if (!autoCommitChanges)
                {
                    editedProject.Dispose();
                }

                System.Runtime.Remoting.RemotingServices.Disconnect(frontend);
                frontend   = null;
                rootWidget = null;
                selection  = null;
            }
            finally
            {
                base.OnDestroyed();
            }
        }
Пример #5
0
 public void Bind(WidgetEditSession newSession)
 {
     if (editSession != null)
     {
         editSession.SelectionChanged -= WidgetSelected;
         editSession.EditingBackend.ProjectReloaded       -= OnProjectReloaded;
         editSession.EditingBackend.WidgetNameChanged     -= OnWidgetNameChanged;
         editSession.EditingBackend.WidgetContentsChanged -= OnContentsChanged;
     }
     editSession = newSession;
     if (editSession != null)
     {
         editSession.SelectionChanged += WidgetSelected;
         editSession.EditingBackend.ProjectReloaded       += OnProjectReloaded;
         editSession.EditingBackend.WidgetNameChanged     += OnWidgetNameChanged;
         editSession.EditingBackend.WidgetContentsChanged += OnContentsChanged;
     }
     LoadProject();
 }
Пример #6
0
 internal void SetActiveDesignSession(Project p, WidgetEditSession session)
 {
     activeProject         = p;
     Backend.ActiveProject = p != null ? p.ProjectBackend : null;
     Backend.SetActiveDesignSession(session);
 }
Пример #7
0
		internal void SetActiveDesignSession (Project p, WidgetEditSession session)
		{
			activeProject = p;
			Backend.ActiveProject = p != null ? p.ProjectBackend : null;
			Backend.SetActiveDesignSession (session);
		}
Пример #8
0
		protected override void OnDestroyed ()
		{
			try {
				if (disposed)
					return;
				
				if (project.App.ActiveProject == editedProject)
					project.App.ActiveProject = null;
				
				disposed = true;
				frontend.disposed = true;
				editedProject.SignalAdded -= OnSignalAdded;
				editedProject.SignalRemoved -= OnSignalRemoved;
				editedProject.SignalChanged -= OnSignalChanged;
				editedProject.ComponentNameChanged -= OnComponentNameChanged;
				editedProject.BackendChanged -= OnProjectBackendChanged;
				editedProject.ComponentTypesChanged -= OnComponentTypesChanged;
				project.BackendChanged -= OnProjectBackendChanged;
				
				if (session != null) {
					session.Dispose ();
					session = null;
				}
					
				if (!autoCommitChanges)
					editedProject.Dispose ();
					
				System.Runtime.Remoting.RemotingServices.Disconnect (frontend);
				frontend = null;
				rootWidget = null;
				selection = null;
			} finally {
				base.OnDestroyed ();
			}
		}
Пример #9
0
		void CreateSession ()
		{
			try {
				session = project.ProjectBackend.CreateWidgetDesignerSession (frontend, componentName, editedProject.ProjectBackend, autoCommitChanges);
				ResetCustomWidget ();
				rootWidget = app.GetComponent (session.RootWidget, null, null);
			} catch (Exception ex) {
				Console.WriteLine (ex);
				Gtk.Label lab = new Gtk.Label ();
				lab.Text = Mono.Unix.Catalog.GetString ("The designer could not be loaded.") + "\n\n" + ex.Message;
				lab.Wrap = true;
				lab.WidthRequest = 400;
				AddCustomWidget (lab);
				session = null;
			}
		}
Пример #10
0
		public void SetActiveDesignSession (WidgetEditSession session)
		{
			activeDesignSession = session;
			if (projectWidget != null)
				projectWidget.Bind (session);
		}
Пример #11
0
 public void Bind(WidgetEditSession newSession)
 {
     nodeView.Bind(newSession);
 }
Пример #12
0
		public void Bind (WidgetEditSession newSession) 
		{
			nodeView.Bind (newSession);
		}