public void SetActiveDesignSession(WidgetEditSession session) { activeDesignSession = session; if (projectWidget != null) { projectWidget.Bind(session); } }
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; } }
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(); } }
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(); }
internal void SetActiveDesignSession(Project p, WidgetEditSession session) { activeProject = p; Backend.ActiveProject = p != null ? p.ProjectBackend : null; Backend.SetActiveDesignSession(session); }
internal void SetActiveDesignSession (Project p, WidgetEditSession session) { activeProject = p; Backend.ActiveProject = p != null ? p.ProjectBackend : null; Backend.SetActiveDesignSession (session); }
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 (); } }
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; } }
public void SetActiveDesignSession (WidgetEditSession session) { activeDesignSession = session; if (projectWidget != null) projectWidget.Bind (session); }
public void Bind(WidgetEditSession newSession) { nodeView.Bind(newSession); }
public void Bind (WidgetEditSession newSession) { nodeView.Bind (newSession); }