/// <summary>
        /// 组件初始化之后调用,完成业务初始化和参数初始化
        /// </summary>
        ///
        public void Initialize()
        {
            VisualPanelChangedPriceCoice();

            #region 初始化Combox控件
            InitializeLevelComBox();
            InitializeBrandCombox();
            InitializeWareHouseCombox();
            #endregion

            RECT defult = new RECT();
            this.m_SelectBoard           = new MBorad();
            this.m_SelectBoard.Dock      = DockStyle.Fill;
            this.m_SelectBoard.Location  = new Point(0, 0);
            this.m_SelectBoard.Name      = "cBoard";
            this.m_SelectBoard.BackColor = Color.Black;
            //this.m_SelectBoard.Visible = Visible;
            //this.m_SelectBoard.Click += M_SelectBoard_Click;
            //this.m_SelectBoard.DoubleClick += Board_DoubleClick;
            //this.m_SelectBoard.MouseWheel += Board_MouseWheel;
            this.tableLayoutPanel1.Controls.Add(m_SelectBoard, 1, 0);

            #region  择框
            m_selectControl = new MSelect();
            m_selectControl.BackgroundImage               = Resources.select_normal;
            m_selectControl.MouseClickImage               = Resources.select_press;
            m_selectControl.MouseEnterImage               = Resources.select_normal;
            m_selectControl.Font                          = MCommonData.d4Font;
            m_selectControl.ForeColor                     = COLOR.RGB(MCommonData.fontColor4);
            m_selectControl.DropDownBoxForeColor          = COLOR.RGB(MCommonData.fontColor5);
            m_selectControl.DropDownBoxBackColor          = COLOR.RGB(MCommonData.fontColor4);
            m_selectControl.DropDownBoxRowMouseEnterColor = COLOR.RGB(MCommonData.fontColor13);
            m_selectControl.Text                          = "请选择";
            m_selectControl.TextChangeEvent              += M_selectControl_TextChangeEvent;
            m_selectControl.Visible                       = true;
            this.m_SelectBoard.AddControl(m_selectControl);

            this.m_SelectBoard.Size = this.m_SelectBoard.Size;
            this.m_SelectBoard.Draw();

            #endregion

            //更新查询一下资金和使用率(挂单成功且为保证金模式下,再刷新一次)
            RefrashAvaliableAndRadio();
            ResetControlSettings();

            Draw();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 初始化界面
        /// </summary>
        public void Initialize()
        {
            #region 窗口阴影
            WinAPI.SetClassLong(this.Handle, WinAPI.GCL_STYLE, WinAPI.GetClassLong(this.Handle, WinAPI.GCL_STYLE) | WinAPI.CS_DropSHADOW); //API函数加载,实现窗体边框阴影效果
            #endregion

            RECT defult = new RECT();
            this.board           = new MBorad();
            this.board.Dock      = DockStyle.Fill;
            this.board.Location  = new Point(0, 0);
            this.board.Name      = "cBoard";
            this.board.BackColor = Color.Black;
            //this.board.Click += Board_Click;
            //this.board.DoubleClick += Board_DoubleClick;
            //this.board.MouseWheel += Board_MouseWheel;

            this.Controls.Add(board);

            #region  钮
            btnPutBrand                     = new MButton();
            btnPutBrand.Text                = "挂牌";
            btnPutBrand.ForeColor           = COLOR.RGB(Color.White);
            btnPutBrand.MouseForeColor      = COLOR.RGB(MCommonData.fontColor8);
            btnPutBrand.BackColor           = COLOR.RGB(MCommonData.fontColor5);
            btnPutBrand.MouseBackColor      = COLOR.RGB(MCommonData.fontColor5);
            btnPutBrand.MouseClickBackColor = COLOR.RGB(MCommonData.fontColor5);
            btnPutBrand.Font                = MCommonData.d4Font;
            btnPutBrand.hasFrame            = false;
            btnPutBrand.Visible             = false;
            btnPutBrand.MouseDown          += BtnPutBrand_MouseDown;;
            //btnPutBrand.Click += BtnPutBrand_Click;

            btnDelistBrand                     = new MButton();
            btnDelistBrand.Text                = "摘牌";
            btnDelistBrand.ForeColor           = COLOR.RGB(Color.White);
            btnDelistBrand.MouseForeColor      = COLOR.RGB(MCommonData.fontColor8);
            btnDelistBrand.BackColor           = COLOR.RGB(MCommonData.fontColor5);
            btnDelistBrand.MouseBackColor      = COLOR.RGB(MCommonData.fontColor5);
            btnDelistBrand.MouseClickBackColor = COLOR.RGB(MCommonData.fontColor5);
            btnDelistBrand.Font                = MCommonData.d4Font;
            btnDelistBrand.hasFrame            = false;
            btnDelistBrand.Visible             = false;
            btnDelistBrand.MouseDown          += BtnDelistBrand_MouseDown;


            btnTradedBrand                     = new MButton();
            btnTradedBrand.Text                = "成交";
            btnTradedBrand.ForeColor           = COLOR.RGB(Color.White);
            btnTradedBrand.MouseForeColor      = COLOR.RGB(MCommonData.fontColor8);
            btnTradedBrand.BackColor           = COLOR.RGB(MCommonData.fontColor5);
            btnTradedBrand.MouseBackColor      = COLOR.RGB(MCommonData.fontColor5);
            btnTradedBrand.MouseClickBackColor = COLOR.RGB(MCommonData.fontColor5);
            btnTradedBrand.Font                = MCommonData.d4Font;
            btnTradedBrand.hasFrame            = false;
            btnTradedBrand.Visible             = false;
            btnTradedBrand.MouseDown          += BtnTradedBrand_MouseDown;


            this.board.AddControl(btnPutBrand);
            this.board.AddControl(btnDelistBrand);
            this.board.AddControl(btnTradedBrand);

            #endregion

            #region 添加Table
            table = new MUseTradedTable(TableStyleEnum.PutBrandTable);
            this.board.AddControl(table);
            #endregion

            Draw();
        }
Exemplo n.º 3
0
        /// <summary>
        /// 初始化界面
        /// </summary>
        protected void Initialize()
        {
            #region 窗口阴影
            WinAPI.SetClassLong(this.Handle, WinAPI.GCL_STYLE, WinAPI.GetClassLong(this.Handle, WinAPI.GCL_STYLE) | WinAPI.CS_DropSHADOW); //API函数加载,实现窗体边框阴影效果
            #endregion

            #region 画板初始化
            Logger.LogInfo("画板初始化!");
            RECT defult = new RECT();
            this.board              = new MBorad();
            this.board.Dock         = DockStyle.Fill;
            this.board.Location     = new Point(0, 0);
            this.board.Name         = "cBoard";
            this.board.BackColor    = Color.Black;
            this.board.Click       += Board_Click;
            this.board.DoubleClick += Board_DoubleClick;
            this.board.MouseWheel  += Board_MouseWheel;

            this.Controls.Add(board);
            #endregion

            #region 第二行

            #region 买卖基价
            lbs1 = new MLabels();
            Logger.LogInfo("初始化买入基价!");
            MLabel lbbuy = new MLabel();
            lbbuy.Text        = "买入基价:";
            lbbuy.ForeColor   = COLOR.RGB(Color.Red);
            lbbuy.BackColor   = -1;
            lbbuy.Font        = MCommonData.d2Font;
            lbbuy.LeftAligned = true;
            lbs1.lbs.Add(lbbuy);

            Logger.LogInfo("初始化买入基价值!");
            MLabel lbbuyvalue = new MLabel();
            lbbuyvalue.Text        = "     ";
            lbbuyvalue.ForeColor   = COLOR.RGB(Color.White);
            lbbuyvalue.BackColor   = -1;
            lbbuyvalue.Font        = MCommonData.d3Font;
            lbbuyvalue.LeftAligned = true;
            lbs1.lbs.Add(lbbuyvalue);

            Logger.LogInfo("初始化卖出基价!");
            MLabel lbsell = new MLabel();
            lbsell.Text        = "卖出基价:";
            lbsell.ForeColor   = COLOR.RGB(Color.Green);
            lbsell.BackColor   = -1;
            lbsell.Font        = MCommonData.d2Font;
            lbsell.LeftAligned = true;
            lbs1.lbs.Add(lbsell);

            Logger.LogInfo("初始化卖出基价值!");
            MLabel lbsellvalue = new MLabel();
            lbsellvalue.Text        = "     ";
            lbsellvalue.ForeColor   = COLOR.RGB(Color.White);
            lbsellvalue.BackColor   = -1;
            lbsellvalue.Font        = MCommonData.d3Font;
            lbsellvalue.LeftAligned = true;
            lbs1.lbs.Add(lbsellvalue);
            this.board.AddControl(lbs1);

            #endregion

            #endregion

            #region 表格

            table = new MUseTable();
            this.board.AddControl(table);

            #endregion

            #region  择框

            Logger.LogInfo("初始化第二行快捷按钮!");
            select = new MSelect();
            select.BackgroundImage               = Resources.select_normal;
            select.MouseClickImage               = Resources.select_press;
            select.MouseEnterImage               = Resources.select_normal;
            select.Font                          = MCommonData.d4Font;
            select.ForeColor                     = COLOR.RGB(MCommonData.fontColor4);
            select.DropDownBoxForeColor          = COLOR.RGB(MCommonData.fontColor5);
            select.DropDownBoxBackColor          = COLOR.RGB(MCommonData.fontColor4);
            select.DropDownBoxRowMouseEnterColor = COLOR.RGB(MCommonData.fontColor13);
            select.Text                          = "请选择";
            select.TextChangeEvent              += Select_TextChangeEvent;
            this.board.AddControl(select);
            #endregion

            Initialized();

            this.SizeChanged += Form1_SizeChanged;

            Draw();
        }