internal override void OnBackendChanged(ApplicationBackend oldBackend) { object[] sessionData = null; if (oldBackend != null) { if (!autoCommitChanges) { sessionData = editSession.SaveState(); } if (editSession != null) { editSession.Dispose(); } } CreateSession(); if (sessionData != null && editSession != null) { editSession.RestoreState(sessionData); } base.OnBackendChanged(oldBackend); if (RootComponentChanged != null) { RootComponentChanged(this, EventArgs.Empty); } }
void OnProjectBackendChanged(ApplicationBackend oldBackend) { if (++reloadCount == 2) { object sessionData = null; // if (oldBackend != null && !autoCommitChanges) { // sessionData = session.SaveState (); // session.DestroyWrapperWidgetPlug (); // } // Don't dispose the session here, since it will dispose // the underlying project, and we can't do it because // it may need to process the OnBackendChanging event // as well. CreateSession(); if (sessionData != null && session != null) { session.RestoreState(sessionData); } base.OnBackendChanged(oldBackend); NotifyRootWidgetChanged(); } }
public static void Main() { Gdk.Threads.Init(); Gtk.Application.Init(); System.Threading.Thread.CurrentThread.Name = "gui-thread"; new Gnome.Program("SteticBackend", "0.0", Gnome.Modules.UI, new string[0]); // Read the remoting channel to use string channel = Console.In.ReadLine(); IServerChannelSinkProvider formatterSink = new BinaryServerFormatterSinkProvider(); formatterSink.Next = new GuiDispatchServerSinkProvider(); string unixPath = null; if (channel == "unix") { unixPath = System.IO.Path.GetTempFileName(); Hashtable props = new Hashtable(); props ["path"] = unixPath; props ["name"] = "__internal_unix"; ChannelServices.RegisterChannel(new UnixChannel(props, null, formatterSink)); } else { Hashtable props = new Hashtable(); props ["port"] = 0; props ["name"] = "__internal_tcp"; ChannelServices.RegisterChannel(new TcpChannel(props, null, formatterSink)); } // Read the reference to the application string sref = Console.In.ReadLine(); byte[] data = Convert.FromBase64String(sref); MemoryStream ms = new MemoryStream(data); BinaryFormatter bf = new BinaryFormatter(); controller = (ApplicationBackendController)bf.Deserialize(ms); ApplicationBackend backend = new ApplicationBackend(controller.Application); controller.Connect(backend); Gdk.Threads.Enter(); Gtk.Application.Run(); Gdk.Threads.Leave(); controller.Disconnect(backend); }
internal virtual void OnBackendChanged(ApplicationBackend oldBackend) { if (!initialized) return; Gtk.Widget w = book.GetNthPage (0); book.RemovePage (0); w.Destroy (); socket.Dispose (); ConnectPlug (); }
internal virtual void OnBackendChanged(ApplicationBackend oldBackend) { if (!initialized) { return; } Gtk.Widget w = book.GetNthPage(0); book.RemovePage(0); w.Destroy(); socket.Dispose(); ConnectPlug(); }
public PaletteBackend (ApplicationBackend app) { this.app = app; box = new Gtk.VBox (false, 0); AddWithViewport (box); groups = new Hashtable (); Registry.RegistryChanged += OnRegistryChanged; ShowGroup ("window", Catalog.GetString ("Windows")); ShowGroup ("widget", Catalog.GetString ("Widgets")); ShowGroup ("container", Catalog.GetString ("Containers")); // ShowGroup ("toolbaritem", "Toolbar Items"); ShowGroup ("actions", Catalog.GetString ("Actions")); }
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 PaletteBackend(ApplicationBackend app) { this.app = app; box = new Gtk.VBox(false, 0); AddWithViewport(box); groups = new Hashtable(); Registry.RegistryChanged += OnRegistryChanged; ShowGroup("window", Catalog.GetString("Windows")); ShowGroup("widget", Catalog.GetString("Widgets")); ShowGroup("container", Catalog.GetString("Containers")); // ShowGroup ("toolbaritem", "Toolbar Items"); ShowGroup("actions", Catalog.GetString("Actions")); }
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 (); }
void OnBackendChanged(bool notify) { ApplicationBackend oldBackend = Backend; Backend = backendController.Backend; backendController.Stopped += OnBackendStopped; UpdateWidgetLibraries(false, false); ClearCollections(); if (notify && BackendChanged != null) { BackendChanged(oldBackend); } Backend.ActiveProject = ActiveProject != null ? ActiveProject.ProjectBackend : null; }
public static void Main () { Gdk.Threads.Init (); Gtk.Application.Init (); System.Threading.Thread.CurrentThread.Name = "gui-thread"; // Read the remoting channel to use string channel = Console.In.ReadLine (); IServerChannelSinkProvider formatterSink = new BinaryServerFormatterSinkProvider (); formatterSink.Next = new GuiDispatchServerSinkProvider (); string unixPath = null; if (channel == "unix") { unixPath = System.IO.Path.GetTempFileName (); Hashtable props = new Hashtable (); props ["path"] = unixPath; props ["name"] = "__internal_unix"; ChannelServices.RegisterChannel (new UnixChannel (props, null, formatterSink), false); } else { Hashtable props = new Hashtable (); props ["port"] = 0; props ["name"] = "__internal_tcp"; ChannelServices.RegisterChannel (new TcpChannel (props, null, formatterSink), false); } // Read the reference to the application string sref = Console.In.ReadLine (); byte[] data = Convert.FromBase64String (sref); MemoryStream ms = new MemoryStream (data); BinaryFormatter bf = new BinaryFormatter (); controller = (ApplicationBackendController) bf.Deserialize (ms); ApplicationBackend backend = new ApplicationBackend (controller.Application); controller.Connect (backend); Gdk.Threads.Enter (); Gtk.Application.Run (); Gdk.Threads.Leave (); controller.Disconnect (backend); }
void OnBackendChanged(ApplicationBackend oldBackend) { if (oldBackend != null) { tmpProjectFile = Path.GetTempFileName(); backend.Save(tmpProjectFile); backend.Dispose(); } backend = app.Backend.CreateProject(); backend.SetFrontend(this); if (tmpProjectFile != null && File.Exists(tmpProjectFile)) { // backend.Load (tmpProjectFile, fileName); throw new NotImplementedException("OnBackendChanged"); File.Delete(tmpProjectFile); tmpProjectFile = null; } else if (folderName != null) { backend.Load(folderName); } if (resourceProvider != null) { backend.ResourceProvider = resourceProvider; } if (BackendChanged != null) { BackendChanged(oldBackend); } if (ProjectReloaded != null) { ProjectReloaded(this, EventArgs.Empty); } }
public LocalApplication() { Backend = new ApplicationBackend(this); }
public AssemblyResolver(ApplicationBackend app) { this.app = app; _assemblies = new Hashtable (); }
internal void Disconnect (ApplicationBackend backend) { this.backend = null; runningEvent.Set (); }
internal override void OnBackendChanged (ApplicationBackend oldBackend) { // Can't do anything until the projects are reloaded // This is checked in OnProjectBackendChanged. }
public PaletteBackend(ApplicationBackend app, ProjectBackend project) : this(app) { this.ProjectBackend = project; }
public AssemblyResolver(ApplicationBackend app) { this.app = app; _assemblies = new Hashtable(); }
public AssemblyResolver(ApplicationBackend app) { this.app = app; _assemblies = new Dictionary <string, AssemblyDefinition> (); }
internal void Connect(ApplicationBackend backend) { this.backend = backend; runningEvent.Set(); }
internal void Disconnect(ApplicationBackend backend) { this.backend = null; runningEvent.Set(); }
internal override void OnBackendChanged(ApplicationBackend oldBackend) { // Can't do anything until the projects are reloaded // This is checked in OnProjectBackendChanged. }
void OnBackendChanged (ApplicationBackend oldBackend) { if (oldBackend != null) { tmpProjectFile = Path.GetTempFileName (); backend.Save (tmpProjectFile); backend.Dispose (); } backend = app.Backend.CreateProject (); backend.SetFrontend (this); if (tmpProjectFile != null && File.Exists (tmpProjectFile)) { // backend.Load (tmpProjectFile, fileName); throw new NotImplementedException ("OnBackendChanged"); File.Delete (tmpProjectFile); tmpProjectFile = null; } else if (folderName != null) { backend.Load (folderName); } if (resourceProvider != null) backend.ResourceProvider = resourceProvider; if (BackendChanged != null) BackendChanged (oldBackend); if (ProjectReloaded != null) ProjectReloaded (this, EventArgs.Empty); }
void OnProjectBackendChanged (ApplicationBackend oldBackend) { if (++reloadCount == 2) { object sessionData = null; if (oldBackend != null && !autoCommitChanges) { sessionData = session.SaveState (); session.DestroyWrapperWidgetPlug (); } // Don't dispose the session here, since it will dispose // the underlying project, and we can't do it because // it may need to process the OnBackendChanging event // as well. CreateSession (); if (sessionData != null && session != null) session.RestoreState (sessionData); base.OnBackendChanged (oldBackend); NotifyRootWidgetChanged (); } }
public PaletteBackend (ApplicationBackend app, ProjectBackend project): this (app) { this.ProjectBackend = project; }
internal override void OnBackendChanged (ApplicationBackend oldBackend) { object[] sessionData = null; if (oldBackend != null) { if (!autoCommitChanges) sessionData = editSession.SaveState (); if (editSession != null) editSession.Dispose (); } CreateSession (); if (sessionData != null && editSession != null) editSession.RestoreState (sessionData); base.OnBackendChanged (oldBackend); if (RootComponentChanged != null) RootComponentChanged (this, EventArgs.Empty); }
internal void Connect (ApplicationBackend backend) { this.backend = backend; runningEvent.Set (); }
public LocalApplication () { Backend = new ApplicationBackend (this); }