public override bool ShutDown(PluginShutDownReason reason) { if (mTab != null) { mContainer.Controls.Remove(mTab); } mContainer = null; mTab = null; mControl = null; return(true); }
public bool ShutDown(PluginShutDownReason shutDownReason) { if (mTab != null) { mTabControl.Controls.Remove(mTab); } mTabControl = null; mTab = null; mControl = null; return(true); }
private void AddOrShowTab() { if (pluginControl == null) { pluginControl = new PluginControl(); pluginTab = this.AddToTab(PluginManager.LeftTab, pluginControl, "Demo"); } else { this.ShowTab(pluginTab); } }
protected void ShowTab(PluginTab pluginTab) { var container = mTabContainer; if (pluginTab.LastTabControl != null) { container = pluginTab.LastTabControl; } if (container.Controls.Contains(pluginTab) == false) { container.Controls.Add(pluginTab); } }
void AddControlToTab(TabControl tabControl) { mControl = new CopyToProjectControl(copyManager); mControl.Click += mControl_Click; mTab = new PluginTab(); mTabControl = tabControl; mTab.Text = " Copy Project"; mTab.Controls.Add(mControl); mControl.Dock = DockStyle.Fill; mTabControl.Controls.Add(mTab); }
private void AddOrShowSettingsGrid() { if (settingsGrid == null) { settingsGrid = new DataUiGrid(); settingsTab = this.AddToTab(PluginManager.CenterTab, settingsGrid, "Settings"); settingsTab.DrawX = false; } else { this.ShowTab(settingsTab); } }
public void InitializeTab(TabControl tabControl) { _control = new StateChainsPluginControl(GlueCommands); _tab = new PluginTab(); _tabControl = tabControl; _tab.ClosedByUser += TabClosedByUser; _tab.Text = @" State Chains"; _tab.Controls.Add(_control); _control.Dock = DockStyle.Fill; _tabControl.Controls.Add(_tab); }
public void InitializeTab(TabControl tabControl) { mControl = new ucBookmark(); mTab = new PluginTab(); mTabControl = tabControl; mTab.ClosedByUser += new PluginTab.ClosedByUserDelegate(mTab_ClosedByUser); mTab.Text = " Bookmarks"; mTab.Controls.Add(mControl); mControl.Dock = DockStyle.Fill; mTabControl.Controls.Add(mTab); }
public override bool ShutDown(PluginShutDownReason reason) { // Do anything your plugin needs to do to shut down // or don't shut down and return false if (mTab != null) { mContainer.Controls.Remove(mTab); } mContainer = null; mTab = null; mAchxControl = null; mTextureCoordinateControl = null; return(true); }
public override bool ShutDown(FlatRedBall.Glue.Plugins.Interfaces.PluginShutDownReason shutDownReason) { RemoveAllMenuItems(); if (mTab != null) { mTabControl.Controls.Remove(mTab); } mTabControl = null; mTab = null; mControl = null; return(true); }
public void InitializeTab(System.Windows.Forms.TabControl tabControl) { mPointEditWindow = new PointEditWindow(); mPointEditWindow.DataChanged += HandleDataChanged; mTab = new PluginTab(); mContainer = tabControl; mTab.ClosedByUser += new PluginTab.ClosedByUserDelegate(OnClosedByUser); mTab.Text = " Points"; // add spaces to make room for the X to close the plugin mTab.Controls.Add(mPointEditWindow); mPointEditWindow.Dock = DockStyle.Fill; }
private void HandleTabInitialize(System.Windows.Forms.TabControl tabControl) { mContainer = tabControl; mTab = new PluginTab(); mWpfHost = new System.Windows.Forms.Integration.ElementHost(); mWpfHost.Dock = System.Windows.Forms.DockStyle.Fill; mWpfHost.Name = "EventsWpfHost"; mEventItemList = new EventItemList(); mWpfHost.Child = mEventItemList; mTab.Controls.Add(mWpfHost); }
protected PluginTab AddToTab(System.Windows.Forms.TabControl tabContainer, System.Windows.Forms.Control control, string tabName) { mTabContainer = tabContainer; PluginTab = new PluginTab(); PluginTab.ClosedByUser += new PluginTab.ClosedByUserDelegate(OnClosedByUser); PluginTab.Text = " " + tabName; PluginTab.Controls.Add(control); control.Dock = DockStyle.Fill; mTabContainer.Controls.Add(PluginTab); return(PluginTab); }
protected PluginTab CreateTab(System.Windows.Controls.UserControl control, string tabName) { System.Windows.Forms.Integration.ElementHost wpfHost; wpfHost = new System.Windows.Forms.Integration.ElementHost(); wpfHost.Dock = DockStyle.Fill; wpfHost.Child = control; var pluginTab = new PluginTab(); pluginTab.ClosedByUser += new PluginTab.ClosedByUserDelegate(OnClosedByUser); pluginTab.Text = " " + tabName; pluginTab.Controls.Add(wpfHost); wpfHost.Dock = DockStyle.Fill; return(pluginTab); }
public override void StartUp() { viewModel = new AllErrorsViewModel(); errorChecker = new ErrorChecker(); control = new ErrorDisplay(); control.DataContext = viewModel; tabPage = GumCommands.Self.GuiCommands.AddControl(control, "Errors", TabLocation.RightBottom); this.ElementSelected += HandleElementSelected; this.InstanceAdd += HandleInstanceAdd; this.InstanceDelete += HandleInstanceDelete; this.VariableSet += HandleVariableSet; this.BehaviorReferencesChanged += HandleBehaviorReferencesChanged; }
void HandleInitializeTab(TabControl tabControl) { mControl = new MainControl(); mControl.PropertyValueChanged += new EventHandler(HandleValueChanged); mControl.ListAddOrRemove += new EventHandler(HandleValueChanged); mControl.EmitAllClick += new EventHandler(HandleEmitAllClick); mControl.EmitCurrentClick += new EventHandler(HandleEmitCurrentClick); mTab = new PluginTab(); mContainer = tabControl; mTab.ClosedByUser += new PluginTab.ClosedByUserDelegate(OnClosedByUser); mTab.Text = " Emitters"; // add spaces to make room for the X to close the plugin mTab.Controls.Add(mControl); mControl.Dock = DockStyle.Fill; }
private void UI_OnTabAdd(LoadedPlugin parent, PluginTab tab) { if (tab != null) { try { TabPage t = new TabPage(tab.TabText); tab.TabControl.Parent = t; tab.TabControl.Dock = DockStyle.Fill; t.Controls.Add(tab.TabControl); mainTabControl.Controls.Add(t); } catch (Exception ex) { OnException(parent, ex); } } }
public override void StartUp() { control = new ErrorWindow(); tab = AddToTab(PluginManager.BottomTab, control, "Errors"); errorListViewModel = GlueState.Self.ErrorList; errorListViewModel.Errors.CollectionChanged += HandleErrorsCollectionChanged; errorListViewModel.RefreshClicked += HandleRefreshClicked; control.DataContext = errorListViewModel; this.ReactToLoadedGlux += HandleLoadedGlux; this.ReactToFileChangeHandler += HandleFileChanged; this.ReactToFileRemoved += HandleFileRemoved; this.ReactToUnloadedGlux += HandleUnloadedGlux; this.ReactToFileReadError += HandleFileReadError; }
private void CreateControl() { viewModel = new CompilerViewModel(); viewModel.Configuration = "Debug"; viewModel.IsRebuildAndRestartEnabled = true; viewModel.PropertyChanged += HandleMainViewModelPropertyChanged; control = new MainControl(); control.DataContext = viewModel; Runner.Self.ViewModel = viewModel; RefreshManager.Self.ViewModel = viewModel; buildTab = base.CreateTab(control, "Build"); ShowTab(buildTab, TabLocation.Bottom); AssignControlEvents(); }
protected void ShowTab(PluginTab pluginTab) { var container = mTabContainer; if (pluginTab.LastTabControl != null) { container = pluginTab.LastTabControl; } if (container == null) { // default to showing the plugin in the leftmost tab container = GetTabContainerFromLocation(TabLocation.Left); } if (container.Controls.Contains(pluginTab) == false) { container.Controls.Add(pluginTab); } }
public override void StartUp() { EditorObjects.IoC.Container.Get <List <IErrorReporter> >() .Add(new ErrorCreateRemoveLogic()); control = new ErrorWindow(); tab = AddToTab(PluginManager.BottomTab, control, "Errors"); errorListViewModel = GlueState.Self.ErrorList; errorListViewModel.Errors.CollectionChanged += HandleErrorsCollectionChanged; errorListViewModel.RefreshClicked += HandleRefreshClicked; control.DataContext = errorListViewModel; this.ReactToLoadedGlux += HandleLoadedGlux; this.ReactToFileChangeHandler += HandleFileChanged; this.ReactToFileRemoved += HandleFileRemoved; this.ReactToUnloadedGlux += HandleUnloadedGlux; this.ReactToFileReadError += HandleFileReadError; }
private void AddOrShowVariableGrid() { if (variableGrid == null) { variableGrid = new DataUiGrid(); var tabControl = PluginManager.CenterTab; variableTab = this.AddToTab(tabControl, variableGrid, "Variables"); variableTab.DrawX = false; // let's make this the first item and have it be focused: tabControl.SelectedTab = variableTab; // This makes it the last tab clicked, which gives it priority: variableTab.LastTimeClicked = DateTime.Now; } else { this.ShowTab(variableTab); } }
private void HandleItemSelect(TreeNode treeNode) { bool shouldRemove = true; ReferencedFileSave rfs = treeNode?.Tag as ReferencedFileSave; if (FileReferenceManager.Self.IsTmx(rfs)) { shouldRemove = false; FileReferenceManager.Self.UpdateAvailableTsxFiles(); ReactToRfsSelected(rfs); } if (shouldRemove) { RemoveTab(); } if (TileShapeCollectionsPropertiesController.Self.IsTileShapeCollection(treeNode?.Tag as NamedObjectSave)) { if (collisionTab == null) { var view = TileShapeCollectionsPropertiesController.Self.GetView(); collisionTab = base.CreateTab(view, "TileShapeCollection Properties"); } TileShapeCollectionsPropertiesController.Self.RefreshViewModelTo(treeNode?.Tag as NamedObjectSave, GlueState.CurrentElement); this.ShowTab(collisionTab, TabLocation.Center); } else if (collisionTab != null) { base.RemoveTab(collisionTab); } }