예제 #1
0
 private void UpdateInsertMode()
 {
     if (this.dockPanel.ActiveDocument != null)
     {
         if (this.dockPanel.ActiveDocument is frmRgxDoc)
         {
             this._lastActiveRgx        = this.dockPanel.ActiveDocument;
             this.statusLblInsMode.Text = (((frmRgxDoc)this.dockPanel.ActiveDocument).IsInsertMode) ? "OVR" : "INS";
         }
     }
 }
예제 #2
0
        /// <summary>
        /// Used to store layout.
        /// </summary>
        private WeifenLuo.WinFormsUI.Docking.IDockContent GetContentFromPersistString(string persistString)
        {
            // we skip the behaviour views for now
            if (persistString == "Brainiac.Design.BehaviorTreeViewDock")
            {
                return(null);
            }

            // we only create the generic property dock
            if (PropertiesDock.Count > 0 && persistString == "Brainiac.Design.PropertiesDock")
            {
                return(null);
            }

            // find the type of the dock which is supposed to be created
            Type type = Type.GetType(persistString);

            if (type == null)
            {
                type = Plugin.GetType(persistString);
            }

            // when we have no type we skip the window
            if (type == null)
            {
                return(null);
            }

            // create new window
            WeifenLuo.WinFormsUI.Docking.IDockContent dockContent = (WeifenLuo.WinFormsUI.Docking.IDockContent)type.InvokeMember(string.Empty, System.Reflection.BindingFlags.CreateInstance, null, null, new object[0]);

            // register the behaviour tree list when created
            BehaviorTreeListDock treeListDock = dockContent as BehaviorTreeListDock;

            if (treeListDock != null)
            {
                RegisterBehaviorTreeList(treeListDock);
            }

            return(dockContent);
        }