Example #1
0
        public void AddNewTab(TriggerRoot root)
        {
            InternalScriptDescription newPage = new InternalScriptDescription();

            newPage.Name = root.Name;


            mInternalDefinitions.Add(newPage);

            AddNewTab(newPage, root, root.Name);
        }
Example #2
0
        void InternalScriptsList_NewObjectAdded(ObjectEditorControl sender, object selectedObject)
        {
            InternalScriptDescription newPage = selectedObject as InternalScriptDescription;

            //if(newPage != null)
            //{
            //   if(mParentTabs != null)
            //   {
            //TabPage p = new TabPage();
            //mParentTabs.Controls.Add(p);
            //TriggerEditor ed = new TriggerEditor();
            //p.Controls.Add(ed);
            //ed.Dock = DockStyle.Fill;
            //ed.mBaseClientParent = this.mBaseClientParent;

            //TriggerRoot newRoot = new TriggerRoot();
            //mSimMain.TriggerData.Add(newRoot);
            //ed.TriggerData = newRoot;

            //newPage.mOwnedPage = p;

            //newPage.Name = "Script";

            //p.Tag = ed;

            TriggerRoot newRoot = new TriggerRoot();

            mSimMain.TriggerData.Add(newRoot);

            AddNewTab(newPage, newRoot, "Script");
            //TabPage p = new TabPage();
            //mParentTabs.Controls.Add(p);
            //TriggerEditor ed = new TriggerEditor();
            //p.Controls.Add(ed);
            //ed.Dock = DockStyle.Fill;
            //ed.mBaseClientParent = this.mBaseClientParent;


            //ed.TriggerData = newRoot;

            //newPage.mOwnedPage = p;

            //newPage.Name = "Script";

            //p.Tag = ed;
            //   }

            //}
        }
Example #3
0
        public void AddNewTab(InternalScriptDescription newPage, TriggerRoot root, string name)
        {
            if (newPage != null && mParentTabs != null)
            {
                this.SuspendLayout();
                TabPage p = new TabPage();
                mParentTabs.Controls.Add(p);
                TriggerEditor ed = new TriggerEditor();
                p.Controls.Add(ed);
                ed.Dock = DockStyle.Fill;
                ed.mBaseClientParent = this.mBaseClientParent;

                ed.TriggerData = root;

                newPage.mTriggerRoot = root;
                newPage.mOwnedPage   = p;

                newPage.Name = name;// "Script";

                p.Tag = ed;
                this.ResumeLayout();
            }
        }