Exemplo n.º 1
0
        public void ShowForm(int nIndex)
        {
            VelixianForm MatchedTab = null;

            if (nIndex < 0 || nIndex >= _TabPages.Keys.Count)
            {
                return;
            }

            MatchedTab = _TabPages[nIndex];
            Global._mainForm.ShowEditForm(MatchedTab);
        }
Exemplo n.º 2
0
        public void ShowForm(String type)
        {
            String       szType     = type;
            VelixianForm MatchedTab = null;

            foreach (Int32 TabIndex in _TabPages.Keys)
            {
                MatchedTab = _TabPages[TabIndex];
                if (MatchedTab.Keyword == szType)
                {
                    Global._mainForm.ShowEditForm(MatchedTab);
                }
            }
        }
Exemplo n.º 3
0
        public VelixianForm FindForm(String type)
        {
            String       szType     = type;
            VelixianForm MatchedTab = null;

            foreach (Int32 TabIndex in _TabPages.Keys)
            {
                MatchedTab = _TabPages[TabIndex];
                if (MatchedTab.Keyword == szType)
                {
                    break;
                }
            }

            return(MatchedTab);
        }
Exemplo n.º 4
0
        public void Add(ToolStripComboBox cbFindType, EditForm _form, ValixianFormType editFormType, ListView lvMain, String keyword, bool bLoadingFailed, ToolStripMenuItem menu, TabInitializeHandler handler, TabSaveHandler save_handler)
        {
            int nIndex = (int)editFormType;

            VelixianForm newVellixianTab = new VelixianForm(_form, editFormType, lvMain, keyword, bLoadingFailed, menu, handler, save_handler);

            _TabPages.Add(nIndex, newVellixianTab);

            if (_form != null)
            {
                if (bLoadingFailed)
                {
                    _form.Text = _form.Text + "<Error>";
                }

                cbFindType.Items.Add(new VelixianFindType(_form.Text, _TabPages[nIndex]));
            }
        }
        private void pgConditionElement_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            TreeNode     node = null;
            ListView     lv   = null;
            TreeView     tv   = null;
            VelixianForm tab  = null;

            node = tvIConditionDetail.SelectedNode;
            lv   = lvIConditions;
            tv   = tvIConditionDetail;
            tab  = Global._VelixianForms.FindForm("ITEMCONDITION");

            if (node.Tag.GetType() == typeof(SHConditions))
            {
                SHConditions conds = (SHConditions)node.Tag;
                node.Text = conds.GetString(xmlCore);
            }
            else if (node.Tag.GetType() == typeof(SHCondition))
            {
                SHCondition cond = (SHCondition)node.Tag;
                node.Text = cond.GetString(xmlCore);
            }
            else if (node.Tag.GetType() == typeof(SHAnd))
            {
                SHAnd and = (SHAnd)node.Tag;
                node.Text = and.GetString(xmlCore);
            }
            else if (node.Tag.GetType() == typeof(SHOr))
            {
                SHOr or = (SHOr)node.Tag;
                node.Text = or.GetString(xmlCore);
            }

            if (node.Tag != null)
            {
                if (lv.SelectedItems[0].Tag == tv.TopNode.Tag)
                {
                    SHConditions conds = (SHConditions)tv.Nodes[0].Tag;
                    m_ListViewController.SetListText(lv.SelectedItems[0], conds);
                }
            }

            tab.Touch();
        }
Exemplo n.º 6
0
        /// <summary>
        /// 자바스크립트 호출용 인터페이스
        /// </summary>
        /// <param name="type">탭페이지 Keyword</param>
        /// <param name="key">검색할 ID를 문자열로 담은 것</param>

        public void Navigate(String type, String id)
        {
            String       szType     = type.ToUpper();
            Boolean      bFound     = false;
            VelixianForm MatchedTab = null;

            foreach (Int32 TabIndex in _Forms._TabPages.Keys)
            {
                MatchedTab = _Forms._TabPages[TabIndex];
                if (MatchedTab.Keyword == szType)
                {
                    MatchedTab.form.Show(dockPanel);

                    bFound = true;
                    break;
                }
            }

            if (bFound)
            {
                ListView     searchView   = MatchedTab.MainList;
                Int32        nSearchIndex = 0;
                ListViewItem lvi          = null;

                while ((lvi = searchView.FindItemWithText(id, false, 0, true)) != null)
                {
                    if (lvi.Text == id)
                    {
                        break;
                    }
                    nSearchIndex = lvi.Index;
                    lvi          = null;
                }

                if (lvi != null)
                {
                    SHListViewUtil.SelectIndex(searchView, lvi.Index);
                }
                else
                {
                    MessageBox.Show("잘못된 링크를 참조하고 있습니다.", Application.ProductName);
                }
            }
        }
Exemplo n.º 7
0
 public VelixianFindType(String text, VelixianForm tab)
 {
     Text = text;
     Tag  = tab;
 }
Exemplo n.º 8
0
 public void ShowEditForm(VelixianForm velixianForm)
 {
     velixianForm.form.Show(dockPanel);
 }