Пример #1
0
 public void SetControl(IMenuControl control)
 {
     m_Control = control;
     CreateMenuSections(m_Control.GetSections());
     UpdateGUI();
     m_Control.registerUpdateAction(UpdateGUI);
 }
Пример #2
0
 public void SetMenuControl(IMenuControl menuControl)
 {
     m_MenuControl = menuControl;
     CreateMenuSections(m_MenuControl.GetSections());
     updateControls();
     m_MenuControl.registerUpdateAction(updateControls);
 }
Пример #3
0
        private void ShowInputModelColumns(MD_InputModel _model)
        {
            UC_InputColumns _uc = new UC_InputColumns(_model);

            _uc.Dock = DockStyle.Fill;
            this.splitContainerControl1.Panel2.Controls.Add(_uc);
            CurrentControl = _uc as IMenuControl;
        }
Пример #4
0
        private void ShowInputModelWriteTableDefine(MD_InputModel_SaveTable _saveTable)
        {
            UC_WriteTable _uc = new UC_WriteTable(_saveTable);

            _uc.Dock = DockStyle.Fill;
            this.splitContainerControl1.Panel2.Controls.Add(_uc);
            CurrentControl = _uc as IMenuControl;
        }
Пример #5
0
        void SetNextControlBeginGroup(IMenuControl current, bool value)
        {
            IMenuControl nextControl = current.Parent[current.Index + 1];

            if (nextControl != null)
            {
                nextControl.BeginGroup = value;
            }
        }
Пример #6
0
        private void ShowInputModelChild(MD_InputModel_Child _InputModelChild)
        {
            UC_InputModel_Child _uc = new UC_InputModel_Child(_InputModelChild);

            _uc.Dock         = DockStyle.Fill;
            _uc.MenuChanged += new EventHandler <EventArgs>(_uc_MenuChanged);
            this.splitContainerControl1.Panel2.Controls.Add(_uc);
            CurrentControl = _uc as IMenuControl;
        }
Пример #7
0
        private void ShowNodeData(TreeListNode _selectedNode)
        {
            this.splitContainerControl1.Panel2.Controls.Clear();
            CurrentControl = null;
            if (_selectedNode != null)
            {
                object _selectedObj = _selectedNode.GetValue(this.treeListColumn1);
                if (_selectedObj is MD_Nodes)
                {
                }

                if (_selectedObj is MD_InputModel)
                {
                    MD_InputModel _model = _selectedObj as MD_InputModel;
                    UC_InputModel _uc    = new UC_InputModel(string.Format("{0}.{1}", _model.NameSpace, _model.ModelName));
                    _uc.Dock = DockStyle.Fill;
                    this.splitContainerControl1.Panel2.Controls.Add(_uc);
                    CurrentControl = _uc as IMenuControl;
                }
                if (_selectedObj is MD_InputModel_ColumnGroup)
                {
                    ShowInputModelColumns(_selectedObj as MD_InputModel_ColumnGroup);
                }

                if (_selectedObj is MD_InputModel_SaveTable)
                {
                    ShowInputModelWriteTableDefine(_selectedObj as MD_InputModel_SaveTable);
                }

                if (_selectedObj is MD_InputModel_Child)
                {
                    ShowInputModelChild(_selectedObj as MD_InputModel_Child);
                }

                if (_selectedObj is MD_Title)
                {
                    MD_Title _title = _selectedObj as MD_Title;
                    switch (_title.TitleType)
                    {
                    case "MD_INPUTGROUP":
                        ShowInputModelColumns(_title.FatherObj as MD_InputModel);
                        break;

                    case "MD_SAVEDEFINE":
                        break;

                    case "MD_CHILDDEFINE":

                        break;
                    }
                }
            }
        }
Пример #8
0
        void AsyncCallBack()
        {
            IEnumerator <IMenuControl> e = CodeRush.Menus.DXCore.GetEnumerator();

            while (e.MoveNext())
            {
                IMenuControl current = e.Current;
                if (current.Caption == "&Options...")
                {
                    SetNextControlBeginGroup(current, false);
                }
                else if (current.Caption == "&Templates...")
                {
                    SetNextControlBeginGroup(current, false);
                }
                else if (current.Caption == "&Shortcuts...")
                {
                    SetNextControlBeginGroup(current, true);
                    break;
                }
            }
        }
Пример #9
0
 public void OnDestroy()
 {
     m_Control.deregisterUpdateAction(UpdateGUI);
     m_Control = null;
 }
Пример #10
0
 public void OnDestroy()
 {
     m_MenuControl.deregisterUpdateAction(updateControls);
     m_MenuControl = null;
 }
Пример #11
0
 void SetNextControlBeginGroup(IMenuControl current, bool value)
 {
     IMenuControl nextControl = current.Parent[current.Index + 1];
     if (nextControl != null)
         nextControl.BeginGroup = value;
 }