void OnBackendChanging () { selection = null; if (BackendChanging != null) BackendChanging (); }
internal WidgetInfo (Project project, Component c): base (project, c.Name) { type = c.Type.Name; }
protected void ClearCollections () { lock (types) { types.Clear (); } Component[] comps; lock (components) { // All components should have been cleared by the backend, // just make sure it did comps = new Component [components.Count]; components.Values.CopyTo (comps, 0); components.Clear (); } foreach (Component c in comps) { c.Dispose (); } }
internal void DisposeComponent (Component c) { lock (components) { components.Remove (c.Backend); } }
internal void NotifyRootWidgetChanged () { object rw = session.RootWidget; if (rw != null) rootWidget = app.GetComponent (session.RootWidget, null, null); else rootWidget = null; UpdateWidget (); if (RootComponentChanged != null) RootComponentChanged (this, EventArgs.Empty); }
internal void NotifySelectionChanged (object ob, bool canCut, bool canCopy, bool canPaste, bool canDelete) { this.canCut = canCut; this.canCopy = canCopy; this.canPaste = canPaste; this.canDelete = canDelete; if (ob != null) selection = app.GetComponent (ob, null, null); else selection = null; if (SelectionChanged != null) SelectionChanged (this, EventArgs.Empty); }
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; } }
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 ComponentSignalEventArgs (Project p, Component c, Signal oldSignal, Signal signal): base (p, c) { this.oldSignal = oldSignal; this.signal = signal; }
internal ComponentNameEventArgs(Project p, Component c, string oldName) : base(p, c) { this.oldName = oldName; }
internal ComponentEventArgs(Project p, Component c) { project = p; component = c; }
internal ComponentNameEventArgs (Project p, Component c, string oldName): base (p, c) { this.oldName = oldName; }
internal ComponentEventArgs (Project p, Component c) { project = p; component = c; }