Beispiel #1
0
 private void ShowTabPages(GuideLineLinkItem _gLine)
 {
     string[] _guideLineIDs    = _gLine.GuideLineID.Split(',');
     string[] _guideLineTitles = _gLine.ExtendParams.Split(',');
     this.xtraTabControl1.TabPages.Clear();
     using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient())
     {
         for (int i = 0; i < _guideLineIDs.Length; i++)
         {
             string      _title = (_guideLineTitles.Length > i) ? _guideLineTitles[i] : _gLine.Title;
             XtraTabPage _tp    = this.xtraTabControl1.TabPages.Add();
             _tp.Text = _title;
             string       _glid     = _guideLineIDs[i];
             MD_GuideLine _glDefine = _msc.GetGuideLineByID(_glid);
             _tp.Tag = _glDefine;
             SinoSZUC_GuideLineQueryResult _qr = new SinoSZUC_GuideLineQueryResult();
             _qr.Dock = DockStyle.Fill;
             _tp.Controls.Add(_qr);
             if (i == 0)
             {
                 this.sinoSZUC_GuideLineDynamicInput21.InitForm(_glDefine);
                 this.sinoSZUC_GuideLineDynamicInput21.WriteParamValue(_gLine.Params);
             }
             _qr.QueryFinished  += new EventHandler(_qr_QueryFinished);
             _qr.ShowDetailData += new EventHandler(_qr_ShowDetailData);
         }
         if (this.xtraTabControl1.TabPages.Count > 0)
         {
             this.xtraTabControl1.SelectedTabPageIndex = 0;
         }
     }
 }
        private void navBarControl1_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            if (this.sinoSZUC_GuideLineQueryResult1.IsQuerying)
            {
                return;
            }
            GuideLineLinkItem _gLine = e.Link.Item.Tag as GuideLineLinkItem;

            this.xtraTabPage1.Text = _gLine.Title;
            using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient())
            {
                GuideLineDefine = _msc.GetGuideLineByID(_gLine.GuideLineID);
            }
            this.sinoSZUC_GuideLineDynamicInput1.InitForm(GuideLineDefine);
            this.sinoSZUC_GuideLineDynamicInput1.WriteParamValue(_gLine.Params);
            if (this.sinoSZUC_GuideLineDynamicInput1.ItemCount > 0)
            {
                this.xtraTabPage2.PageVisible = true;
            }
            else
            {
                this.xtraTabPage2.PageVisible = false;
            }
            this.xtraTabControl1.SelectedTabPageIndex = 0;
            if (this.sinoSZUC_GuideLineDynamicInput1.InputFinised)
            {
                QueryParameter = this.sinoSZUC_GuideLineDynamicInput1.GetParamters();
                this.sinoSZUC_GuideLineQueryResult1.ShowGuideLineResult(GuideLineDefine, QueryParameter);
            }
            this.Cursor = Cursors.WaitCursor;
        }
Beispiel #3
0
 private void ShowLinks(ArrayList _gList)
 {
     foreach (string _gItem in _gList)
     {
         GuideLineLinkItem _glink = new GuideLineLinkItem(_gItem);
         AddLink(_glink);
     }
 }
Beispiel #4
0
        private void navBarControl1_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            if (this.sinoSZUC_GuideLineQueryResult1.IsQuerying)
            {
                return;
            }
            GuideLineLinkItem _gLine = e.Link.Item.Tag as GuideLineLinkItem;

            ShowTabPages(_gLine);
            if (this.sinoSZUC_GuideLineDynamicInput21.InputFinised)
            {
                ReQuery();
            }
            //this.Cursor = Cursors.WaitCursor;
        }
Beispiel #5
0
        private void AddLink(GuideLineLinkItem _glink)
        {
            NavBarItem _nb = new DevExpress.XtraNavBar.NavBarItem();

            _nb.Caption    = _glink.Title;
            _nb.LargeImage = (SinoSZResources.Images.ContainsKey(_glink.IconName) ?
                              SinoSZResources.Images[_glink.IconName] : global::SinoSZMetaDataQuery.Properties.Resources.b23
                              );
            _nb.Name = _glink.GuideLineID;
            _nb.Tag  = _glink;
            NavBarGroup _group = this.navBarControl1.Groups[_glink.GroupName];

            if (_group != null)
            {
                _group.ItemLinks.Add(_nb);
            }
        }