Exemple #1
0
        /// <summary>
        /// 初始化排序方式选择栏
        /// </summary>
        private void InitCmbs()
        {
            #region 类型下拉框

            comboBoxGenaral.Items.Clear();
            comboBoxGenaral.Items.AddRange(DesignStyleForm.GetStyles(StyleType.GeneralPageListPart));
            comboBoxGenaral.Items.Add(_editStyleText);

            comboBoxHome.Items.Clear();
            comboBoxHome.Items.AddRange(DesignStyleForm.GetStyles(StyleType.HomePageListPart));
            comboBoxHome.Items.Add(_editStyleText);

            comboBoxHr.Items.Clear();
            comboBoxHr.Items.AddRange(DesignStyleForm.GetStyles(StyleType.HrPageListPart));
            comboBoxHr.Items.Add(_editStyleText);

            comboBoxInviteBidding.Items.Clear();
            comboBoxInviteBidding.Items.AddRange(DesignStyleForm.GetStyles(StyleType.InviteBiddingPageListPart));
            comboBoxInviteBidding.Items.Add(_editStyleText);

            comboBoxKnowledge.Items.Clear();
            comboBoxKnowledge.Items.AddRange(DesignStyleForm.GetStyles(StyleType.KnowledgePageListPart));
            comboBoxKnowledge.Items.Add(_editStyleText);

            comboBoxProject.Items.Clear();
            comboBoxProject.Items.AddRange(DesignStyleForm.GetStyles(StyleType.ProjectPageListPart));
            comboBoxProject.Items.Add(_editStyleText);

            comboBoxProduct.Items.Clear();
            comboBoxProduct.Items.AddRange(DesignStyleForm.GetStyles(StyleType.ProductPageListPart));
            comboBoxProduct.Items.Add(_editStyleText);

            #endregion
        }
Exemple #2
0
        /// <summary>
        /// edit by  zhenghao at 2008-06-17 14:40
        /// 编辑样式
        /// </summary>
        /// <param name="type"></param>
        private void EditListBoxPart(PageType type)
        {
            DesignStyleForm form = new DesignStyleForm(StyleType.GeneralPageListPart);

            switch (type)
            {
            case PageType.None:
                break;

            case PageType.General:
                break;

            case PageType.Product:
                form = new DesignStyleForm(StyleType.ProductPageListPart);
                break;

            case PageType.Project:
                form = new DesignStyleForm(StyleType.ProjectPageListPart);
                break;

            case PageType.InviteBidding:
                form = new DesignStyleForm(StyleType.InviteBiddingPageListPart);
                break;

            case PageType.Knowledge:
                form = new DesignStyleForm(StyleType.KnowledgePageListPart);
                break;

            case PageType.Hr:
                form = new DesignStyleForm(StyleType.HrPageListPart);
                break;

            case PageType.Home:
                form = new DesignStyleForm(StyleType.HomePageListPart);
                break;

            default:
                break;
            }
            if (form != null)
            {
                form.Owner = this;
                form.ShowDialog();
            }
            //ListBoxPart lbPart = _listBoxPartsDic[type];
            //EditListBoxForm form = new EditListBoxForm(lbPart);
            //form.ShowDialog();
        }
Exemple #3
0
        /// <summary>
        /// edit by zhenghao at 2008-06-19 15:45
        /// 当下拉框的选择项改变时
        /// </summary>
        /// <param name="styleType"></param>
        private void ComboBoxPageType_SelectdIndexChanged(StyleType styleType, ComboBox comboBox, Label lab)
        {
            int _count = comboBox.Items.Count;

            if (_count < 1 || comboBox.SelectedIndex >= _count)
            {
                return;
            }
            if (comboBox.SelectedIndex == _count - 1)
            {
                DesignStyleForm form = new DesignStyleForm(styleType);
                form.Owner = this;
                if (form.ShowDialog() == DialogResult.OK)
                {
                }
                InitCmbs();
            }
            else
            {
                string styleFileName = comboBox.Text;
                _listBoxPartsDic[styleType].StyleElement = StyleXmlDocument.GetStyleDocument(styleType, styleFileName).StyleElement;
            }
        }