public PluginView CreateToolPluginView(PhactoryHost.ToolPlugin pluginTool) { PluginView pluginView = new PluginView(false); pluginView.Text = pluginTool.GetName(); pluginView.Show(dockPanel); return(pluginView); }
public PluginView GetActivePluginView() { if (dockPanel.ActiveDocument == null) { return(null); } PluginView pluginView = dockPanel.ActiveDocument as PluginView; return(pluginView); }
public PluginView CreatePluginView(PhactoryHost.Database.Resource resource, bool isDependency) { PluginView pluginView = new PluginView(isDependency); string filename = resource.RelativePath; pluginView.Text = new FileInfo(filename).Name; pluginView.Resource = resource; pluginView.Show(dockPanel); return(pluginView); }
public PhactoryHost.Database.Resource GetActivePluginResource() { PhactoryHost.Database.Resource resource = null; PluginView pluginView = GetActivePluginView(); if (pluginView != null) { resource = pluginView.Resource; } return(resource); }
private void CloseResource() { PhactoryHost.Database.Resource resource = App.Controller.View.GetActivePluginResource(); if (resource != null) { PluginView pluginView = FindPluginView(resource); if (pluginView != null) { pluginView.Close(); } } this.RefreshButtons(); }
public void OnResourceDeleted(PhactoryHost.Database.Resource resource) { if (this.InvokeRequired) { this.Invoke(new OnResourceDeletedDelegate(OnResourceDeleted), new object[] { resource }); return; } PluginView pluginView = FindPluginView(resource); if (pluginView != null) { App.Controller.PluginManager.OnResourceDeleted(pluginView, resource); } }
public void CloseAllResources() { List <PhactoryHost.Database.Resource> allEditedResources = App.Controller.View.GetAllEditedResources(); foreach (PhactoryHost.Database.Resource resource in allEditedResources) { PluginView pluginView = FindPluginView(resource); if (pluginView != null) { pluginView.Close(); } } this.RefreshButtons(); }
public PluginView FindPluginDependencyView(PhactoryHost.Database.Resource resource) { foreach (IDockContent content in dockPanel.Documents) { PluginView pluginView = content as PluginView; if (pluginView != null) { if ((pluginView.IsDependency == true) && (pluginView.Resource.Id == resource.Id)) { return(pluginView); } } } return(null); }
public void OnResourceChanged(PhactoryHost.Database.Resource resource) { if (this.InvokeRequired) { Delegate method = new OnResourceChangedDelegate(OnResourceChanged); object[] args = new object[] { resource }; this.Invoke(method, args); return; } PluginView pluginView = FindPluginView(resource); if (pluginView != null) { App.Controller.PluginManager.OnResourceChanged(pluginView, resource); } }
public List <PhactoryHost.Database.Resource> GetAllEditedResources() { List <PhactoryHost.Database.Resource> allEditedResources = new List <PhactoryHost.Database.Resource>(); foreach (IDockContent content in dockPanel.Documents) { PluginView pluginView = content as PluginView; if (pluginView != null) { if (pluginView.IsDependency == false) { allEditedResources.Add(pluginView.Resource); } } } return(allEditedResources); }
public void SetFocusedView(PluginView view) { view.DockHandler.Activate(); }
public PluginView CreateToolPluginView(PhactoryHost.ToolPlugin pluginTool) { PluginView pluginView = new PluginView(false); pluginView.Text = pluginTool.GetName(); pluginView.Show(dockPanel); return pluginView; }
public PluginView CreatePluginView(PhactoryHost.Database.Resource resource, bool isDependency) { PluginView pluginView = new PluginView(isDependency); string filename = resource.RelativePath; pluginView.Text = new FileInfo(filename).Name; pluginView.Resource = resource; pluginView.Show(dockPanel); return pluginView; }