public override bool ShutDown(PluginShutDownReason reason)
 {
     if (mTab != null)
     {
         mContainer.Controls.Remove(mTab);
     }
     mContainer = null;
     mTab       = null;
     mControl   = null;
     return(true);
 }
Exemplo n.º 2
0
        public bool ShutDown(PluginShutDownReason shutDownReason)
        {
            if (mTab != null)
            {
                mTabControl.Controls.Remove(mTab);
            }
            mTabControl = null;
            mTab        = null;
            mControl    = null;

            return(true);
        }
Exemplo n.º 3
0
 private void AddOrShowTab()
 {
     if (pluginControl == null)
     {
         pluginControl = new PluginControl();
         pluginTab     = this.AddToTab(PluginManager.LeftTab, pluginControl, "Demo");
     }
     else
     {
         this.ShowTab(pluginTab);
     }
 }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 6
0
 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);
        }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
 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);
        }
Exemplo n.º 11
0
        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;
        }
Exemplo n.º 12
0
        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);
        }
Exemplo n.º 13
0
        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);
        }
Exemplo n.º 14
0
        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);
        }
Exemplo n.º 15
0
        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;
        }
Exemplo n.º 17
0
 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);
         }
     }
 }
Exemplo n.º 18
0
        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;
        }
Exemplo n.º 19
0
        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();
        }
Exemplo n.º 20
0
        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);
            }
        }
Exemplo n.º 21
0
        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;
        }
Exemplo n.º 22
0
        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);
            }
        }
Exemplo n.º 23
0
        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);
            }
        }