Пример #1
0
        private List <PropertyGrid> GetPropertyGrids(TD.SandDock.TabControl tabControl)
        {
            List <PropertyGrid> propertyGrids = new List <PropertyGrid>();

            foreach (TD.SandDock.TabPage tabPage in tabControl.TabPages)
            {
                if (tabPage.Controls.Count == 0)
                {
                    continue;
                }
                if (tabPage.Controls[0] is TD.SandDock.TabControl)
                {
                    TD.SandDock.TabControl tabControl2    = (TD.SandDock.TabControl)tabPage.Controls[0];
                    List <PropertyGrid>    propertyGrids2 = this.GetPropertyGrids(tabControl2);
                    foreach (PropertyGrid propertyGrid2 in propertyGrids2)
                    {
                        propertyGrids.Add(propertyGrid2);
                    }
                }
                else if (tabPage.Controls[0] is PropertyGrid)
                {
                    propertyGrids.Add((PropertyGrid)tabPage.Controls[0]);
                }
            }
            return(propertyGrids);
        }
Пример #2
0
 /// <summary>
 /// Create a new Instance
 /// </summary>
 /// <param name="dc">The document Container that receives the Plugins</param>
 /// <param name="lp">The Container for the currently loaded package</param>
 public ResourceLoader(TD.SandDock.TabControl dc, LoadedPackage lp)
 {
     this.dc = dc;
     pkg     = lp;
     loaded  = new Hashtable();
     single  = new Hashtable();
     if (srl == null)
     {
         srl = this;
     }
 }
Пример #3
0
        internal PluginManager(
            ToolStripMenuItem toolmenu,
            ToolStrip tootoolbar,
            TD.SandDock.TabControl dc,
            LoadedPackage lp,
            SteepValley.Windows.Forms.ThemedControls.XPTaskBox defaultactiontaskbox,
            ContextMenuStrip defaultactionmenu,
            SteepValley.Windows.Forms.ThemedControls.XPTaskBox toolactiontaskbox,
            SteepValley.Windows.Forms.ThemedControls.XPTaskBox extactiontaskbox,
            ToolStrip actiontoolbar,
            Ambertation.Windows.Forms.DockContainer docktooldc,
            ToolStripMenuItem helpmenu,
            SimPe.Windows.Forms.ResourceListViewExt lv
            ) : base(true)
        {
            Splash.Screen.SetMessage("Loading Type Registry");
            SimPe.PackedFiles.TypeRegistry tr = new SimPe.PackedFiles.TypeRegistry();

            FileTable.ProviderRegistry    = tr;
            FileTable.ToolRegistry        = tr;
            FileTable.WrapperRegistry     = tr;
            FileTable.CommandLineRegistry = tr;
            FileTable.HelpTopicRegistry   = tr;
            FileTable.SettingsRegistry    = tr;

            wloader = new LoadFileWrappersExt();

            this.LoadDynamicWrappers();
            this.LoadStaticWrappers();
            this.LoadMenuItems(toolmenu, tootoolbar);

            Splash.Screen.SetMessage("Loading Listeners");
            wloader.AddListeners(ref ChangedGuiResourceEvent);
            //dc.ActiveDocumentChanged += new TD.SandDock.ActiveDocumentEventHandler(wloader.ActiveDocumentChanged);
            //lp.AfterFileLoad += new SimPe.Events.PackageFileLoadedEvent(wloader.ChangedPackage);


            Splash.Screen.SetMessage("Loading Default Actions");
            LoadActionTools(defaultactiontaskbox, actiontoolbar, defaultactionmenu, GetDefaultActions(lv));
            Splash.Screen.SetMessage("Loading External Tools");
            LoadActionTools(toolactiontaskbox, actiontoolbar, defaultactionmenu, LoadExternalTools());
            Splash.Screen.SetMessage("Loading Default Tools");
            LoadActionTools(extactiontaskbox, actiontoolbar, null, null);

            Splash.Screen.SetMessage("Loading Docks");
            LoadDocks(docktooldc, lp);
            Splash.Screen.SetMessage("Loading Help Topics");
            lht = new LoadHelpTopics(helpmenu);

            Splash.Screen.SetMessage("Loaded Help Topics");
        }
Пример #4
0
        private void CreateNewDocumentContainer(object sender, System.EventArgs e)
        {
            DockPanel doc = new DockPanel();

            doc.Text = "Plugin";
            manager.DockPanel(doc, DockStyle.Bottom);


            doc.OpenFloating();
            doc.Closing          += new DockPanel.ClosingHandler(CloseAdditionalDocContainer);
            doc.TabImage          = dcPlugin.TabImage;
            doc.Text              = dcPlugin.Text;
            doc.TabText           = dcPlugin.TabText;
            doc.AutoScrollMinSize = dcPlugin.AutoScrollMinSize;


            TD.SandDock.TabControl dc = new TD.SandDock.TabControl();
            dc.Manager = this.dc.Manager;
            dc.Text    = "Plugin";
            dc.Parent  = doc;
            dc.Dock    = DockStyle.Fill;
        }
Пример #5
0
        private void CloseAdditionalDocContainer(object sender, DockPanel.DockPanelClosingEvent e)
        {
            if (sender is TD.SandDock.DockControl)
            {
                TD.SandDock.DockControl doc = (TD.SandDock.DockControl)sender;
                if (doc.Controls[0] is TD.SandDock.TabControl)
                {
                    TD.SandDock.TabControl dc = (TD.SandDock.TabControl)doc.Controls[0];
                    bool closed = true;
                    for (int i = dc.TabPages.Count - 1; i >= 0; i--)
                    {
                        TD.SandDock.DockControl d = dc.TabPages[i];
                        if (!resloader.CloseDocument(d))
                        {
                            closed = false;
                        }
                        ;
                    }

                    e.Cancel = !closed;
                }
            }
        }
Пример #6
0
        private PropertyGrid SelectedPropertGrid(TD.SandDock.TabControl tabControl)
        {
            TD.SandDock.TabPage tabPage = tabControl.SelectedPage;
            if (tabPage == null)
            {
                return(null);
            }
            if (tabPage.Controls.Count == 0)
            {
                return(null);
            }

            if (tabPage.Controls[0] is TD.SandDock.TabControl)
            {
                return(this.SelectedPropertGrid((TD.SandDock.TabControl)tabPage.Controls[0]));
            }

            if (tabPage.Controls[0] is PropertyGrid)
            {
                return((PropertyGrid)tabPage.Controls[0]);
            }

            return(null);
        }
Пример #7
0
 /// <summary>
 /// Erforderliche Methode für die Designerunterstützung.
 /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
 /// </summary>
 private void InitializeComponent()
 {
     this.tabControl1 = new TD.SandDock.TabControl();
     this.tabPage1    = new TD.SandDock.TabPage();
     this.lv          = new SimPe.Plugin.NgbhItemsListView();
     this.tabPage2    = new TD.SandDock.TabPage();
     this.lvint       = new SimPe.Plugin.NgbhItemsListView();
     this.splitter1   = new System.Windows.Forms.Splitter();
     this.memprop     = new SimPe.Plugin.MemoryProperties();
     this.tabControl1.SuspendLayout();
     this.tabPage1.SuspendLayout();
     this.tabPage2.SuspendLayout();
     this.SuspendLayout();
     //
     // tabControl1
     //
     this.tabControl1.BorderStyle = TD.SandDock.Rendering.BorderStyle.None;
     this.tabControl1.Controls.Add(this.tabPage1);
     this.tabControl1.Controls.Add(this.tabPage2);
     this.tabControl1.Dock         = System.Windows.Forms.DockStyle.Fill;
     this.tabControl1.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400, System.Windows.Forms.Orientation.Horizontal, new TD.SandDock.LayoutSystemBase[] {
         new TD.SandDock.DocumentLayoutSystem(504, 165, new TD.SandDock.DockControl[] {
             this.tabPage1,
             this.tabPage2
         }, this.tabPage1)
     });
     this.tabControl1.Location = new System.Drawing.Point(0, 0);
     this.tabControl1.Name     = "tabControl1";
     this.tabControl1.Size     = new System.Drawing.Size(504, 165);
     this.tabControl1.TabIndex = 3;
     //
     // tabPage1
     //
     this.tabPage1.BackColor = System.Drawing.Color.Transparent;
     this.tabPage1.Controls.Add(this.lv);
     this.tabPage1.FloatingSize = new System.Drawing.Size(550, 400);
     this.tabPage1.Guid         = new System.Guid("951f2dbf-63ee-4eb5-8342-1e80d72570b8");
     this.tabPage1.Location     = new System.Drawing.Point(2, 22);
     this.tabPage1.Name         = "tabPage1";
     this.tabPage1.Size         = new System.Drawing.Size(500, 141);
     this.tabPage1.TabIndex     = 0;
     this.tabPage1.TabText      = "Memories";
     this.tabPage1.Text         = "Memories";
     //
     // lv
     //
     this.lv.BackColor = System.Drawing.Color.Transparent;
     this.lv.Dock      = System.Windows.Forms.DockStyle.Fill;
     this.lv.Font      = new System.Drawing.Font("Tahoma", 8.25F);
     this.lv.Location  = new System.Drawing.Point(0, 0);
     this.lv.Name      = "lv";
     this.lv.NgbhItems = null;
     this.lv.Size      = new System.Drawing.Size(500, 141);
     this.lv.Slot      = null;
     this.lv.SlotType  = SimPe.Data.NeighborhoodSlots.Sims;
     this.lv.TabIndex  = 0;
     //
     // tabPage2
     //
     this.tabPage2.BackColor = System.Drawing.Color.Transparent;
     this.tabPage2.Controls.Add(this.lvint);
     this.tabPage2.FloatingSize    = new System.Drawing.Size(550, 400);
     this.tabPage2.Guid            = new System.Guid("88419e31-43c9-4409-8d97-7ef80e549ee5");
     this.tabPage2.Location        = new System.Drawing.Point(2, 22);
     this.tabPage2.Name            = "tabPage2";
     this.tabPage2.Size            = new System.Drawing.Size(500, 117);
     this.tabPage2.TabIndex        = 1;
     this.tabPage2.TabText         = "Tokens (Skills, Badges...)";
     this.tabPage2.Text            = "Tokens (Skills, Badges...)";
     this.tabPage2.Visible         = false;
     this.tabPage2.VisibleChanged += new System.EventHandler(this.tabPage2_VisibleChanged);
     //
     // lvint
     //
     this.lvint.Dock      = System.Windows.Forms.DockStyle.Fill;
     this.lvint.Font      = new System.Drawing.Font("Tahoma", 8.25F);
     this.lvint.Location  = new System.Drawing.Point(0, 0);
     this.lvint.Name      = "lvint";
     this.lvint.NgbhItems = null;
     this.lvint.Size      = new System.Drawing.Size(500, 117);
     this.lvint.Slot      = null;
     this.lvint.SlotType  = SimPe.Data.NeighborhoodSlots.Sims;
     this.lvint.TabIndex  = 1;
     //
     // splitter1
     //
     this.splitter1.BackColor = System.Drawing.SystemColors.AppWorkspace;
     this.splitter1.Dock      = System.Windows.Forms.DockStyle.Bottom;
     this.splitter1.Location  = new System.Drawing.Point(0, 165);
     this.splitter1.Name      = "splitter1";
     this.splitter1.Size      = new System.Drawing.Size(504, 3);
     this.splitter1.TabIndex  = 3;
     this.splitter1.TabStop   = false;
     //
     // memprop
     //
     this.memprop.BackColor         = System.Drawing.Color.Transparent;
     this.memprop.Dock              = System.Windows.Forms.DockStyle.Bottom;
     this.memprop.Font              = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.memprop.Item              = null;
     this.memprop.Location          = new System.Drawing.Point(0, 168);
     this.memprop.Name              = "memprop";
     this.memprop.NgbhItemsListView = null;
     this.memprop.Size              = new System.Drawing.Size(504, 192);
     this.memprop.TabIndex          = 4;
     //
     // NgbhSlotUI
     //
     this.Controls.Add(this.tabControl1);
     this.Controls.Add(this.splitter1);
     this.Controls.Add(this.memprop);
     this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.Name = "NgbhSlotUI";
     this.Size = new System.Drawing.Size(504, 360);
     this.tabControl1.ResumeLayout(false);
     this.tabPage1.ResumeLayout(false);
     this.tabPage2.ResumeLayout(false);
     this.ResumeLayout(false);
 }