Exemplo n.º 1
0
        public void AddFastBtns(ContractCategoryDic cv, bool ischoose)
        {
            MButton btn = new MButton();

            btn.Text                = cv.categoryName;
            btn.hasChoose           = ischoose;
            btn.hasFrame            = false;
            btn.ForeColor           = COLOR.RGB(MCommonData.fontColor4);
            btn.MouseForeColor      = COLOR.RGB(MCommonData.fontColor2);
            btn.BackColor           = COLOR.RGB(MCommonData.fontColor0);
            btn.MouseBackColor      = COLOR.RGB(MCommonData.fontColor0);
            btn.MouseClickBackColor = COLOR.RGB(MCommonData.fontColor3);
            btn.MouseDown          += Btn_Click;
            btn.Tag = cv;
            btns4.btns.Add(btn);

            MLine vline = new MLine();

            vline.Width     = 1;
            vline.LineColor = COLOR.RGB(MCommonData.LineColor);
            btns4.vlines.Add(vline);
        }
Exemplo n.º 2
0
        protected int offset2 = 0;                            //下偏移量
        public MUseTable()
        {
            #region 表格

            image3 = new MImage();
            image3.BackgroundImage = Resources.tips;
            image3.Visible         = false;

            #region 标题栏
            //列头:标记,序号,采购/销售,等级,升贴水,绝对价格,数量,仓库,公司,备注,发布时间
            tableHeader                = new MLabels();
            tableHeader.BackColor      = COLOR.RGB(MCommonData.fontColor5);
            tableHeader.MouseBackColor = COLOR.RGB(MCommonData.fontColor5);
            for (int i = 0; i < 11; i++)
            {
                MLabel ml = new MLabel();
                ml.Font        = MCommonData.d2Font;
                ml.ForeColor   = COLOR.RGB(MCommonData.fontColor4);
                ml.BackColor   = -1;
                ml.LeftAligned = true;
                tableHeader.lbs.Add(ml);
            }

            tableHeader.lbs[0].Text  = "标记";
            tableHeader.lbs[1].Text  = "采购/销售";
            tableHeader.lbs[2].Text  = "等级";
            tableHeader.lbs[3].Text  = "参考合约";
            tableHeader.lbs[4].Text  = "升贴水\r\n(元/吨)";
            tableHeader.lbs[5].Text  = "绝对价格\r\n(元/吨)";
            tableHeader.lbs[6].Text  = "数量\r\n(吨)";
            tableHeader.lbs[7].Text  = "仓库";
            tableHeader.lbs[8].Text  = "公司";
            tableHeader.lbs[9].Text  = "备注";
            tableHeader.lbs[10].Text = "发布时间";

            #region 表格数据

            //横线
            line1           = new MLine();
            line1.Width     = 1;
            line1.LineColor = COLOR.RGB(MCommonData.fontColor2);

            #endregion

            //标记图片
            image2 = new MImage();
            image2.BackgroundImage = Resources.mark;

            #endregion

            //上表背景
            mrt1           = new MRectangle();
            mrt1.BackColor = COLOR.RGB(MCommonData.fontColor6);

            //下表背景
            mrt2           = new MRectangle();
            mrt2.BackColor = COLOR.RGB(MCommonData.fontColor6);

            #region 滚动条
            scrollbar1                     = new MVScrollBar();
            scrollbar1.BackColor           = COLOR.RGB(MCommonData.fontColor6);
            scrollbar1.MouseBackColor      = COLOR.RGB(MCommonData.fontColor6);
            scrollbar1.MouseClickBackColor = COLOR.RGB(MCommonData.fontColor6);
            scrollbar1.ForeColor           = COLOR.RGB(MCommonData.fontColor14);
            scrollbar1.MouseForeColor      = COLOR.RGB(MCommonData.fontColor15);
            scrollbar1.ValueChanged       += Scrollbar1_ValueChanged;
            scrollbar1.MinInitialized     += Scrollbar1_MinInitialized;

            scrollbar2                     = new MVScrollBar();
            scrollbar2.BackColor           = COLOR.RGB(MCommonData.fontColor6);
            scrollbar2.MouseBackColor      = COLOR.RGB(MCommonData.fontColor6);
            scrollbar2.MouseClickBackColor = COLOR.RGB(MCommonData.fontColor6);
            scrollbar2.ForeColor           = COLOR.RGB(MCommonData.fontColor14);
            scrollbar2.MouseForeColor      = COLOR.RGB(MCommonData.fontColor15);
            scrollbar2.ValueChanged       += Scrollbar2_ValueChanged;
            scrollbar2.MinInitialized     += Scrollbar2_MinInitialized;
            #endregion

            #endregion
        }