Exemple #1
0
        /// <summary>
        /// 添加证券成份
        /// </summary>
        public void AddSecurities()
        {
            List <GridRow> selectedCategoryRows = m_gridCategory.SelectedRows;
            int            rowsSize             = selectedCategoryRows.Count;

            if (rowsSize > 0)
            {
                UserSecurityCategory category = new UserSecurityCategory();
                m_userSecurityService.GetCategory(selectedCategoryRows[0].GetCell(0).GetString(), ref category);
                SecurityList securityList = new SecurityList(m_native);
                securityList.Show();
                WindowEx window = securityList.Window;
                window.IsChildWindow = true;
                window.Tag           = securityList;
                if (category.m_codes != null && category.m_codes.Length > 0)
                {
                    List <Security> securities = new List <Security>();
                    m_securityService.GetSecuritiesByCodes(category.m_codes, securities);
                    securityList.AddSecuritiesToSecuritiesGrid(securities);
                }
                WindowClosingEvent windowClosingEvent = new WindowClosingEvent(SecurityListWindowClosed);
                window.RegisterEvent(windowClosingEvent, EVENTID.WINDOWCLOSING);
                m_native.Invalidate();
            }
        }
Exemple #2
0
        /// <summary>
        /// 选择指标
        /// </summary>
        public void SelectIndicator()
        {
            IndicatorList indicatorList = new IndicatorList(m_native);

            indicatorList.Show();
            WindowEx window = indicatorList.Window;

            window.IsChildWindow = true;
            window.Tag           = indicatorList;
            WindowClosingEvent windowClosingEvent = new WindowClosingEvent(IndicatorListWindowClosed);

            window.RegisterEvent(windowClosingEvent, EVENTID.WINDOWCLOSING);
            m_native.Invalidate();
        }
Exemple #3
0
        /// <summary>
        /// 选择股票
        /// </summary>
        public void SelectSecurities()
        {
            SecurityList securityList = new SecurityList(m_native);

            securityList.Show();
            WindowEx window = securityList.Window;

            window.IsChildWindow = true;
            window.Tag           = securityList;
            if (m_codes != null && m_codes.Length > 0)
            {
                List <Security> securities = new List <Security>();
                m_securityService.GetSecuritiesByCodes(m_codes, securities);
                securityList.AddSecuritiesToSecuritiesGrid(securities);
            }
            WindowClosingEvent windowClosingEvent = new WindowClosingEvent(SecurityListWindowClosed);

            window.RegisterEvent(windowClosingEvent, EVENTID.WINDOWCLOSING);
            m_native.Invalidate();
        }
Exemple #4
0
        /// <summary>
        /// 显示
        /// </summary>
        public override void Show()
        {
            UserCookieService cookieService = DataCenter.UserCookieService;
            UserCookie        cookie        = new UserCookie();

            if (cookieService.GetCookie("LOGININFO", ref cookie) > 0)
            {
                String[] strs = cookie.m_value.Split(',');
                if (strs.Length >= 2)
                {
                    TextBoxA txtUserName = GetTextBox("txtUserName");
                    TextBoxA txtPassword = GetTextBox("txtPassword");
                    txtUserName.Text = strs[0];
                    txtPassword.Text = strs[1];
                }
            }
            m_window.Location = new POINT(-m_window.Width, -m_window.Height);
            m_window.AnimateShow(true);
            m_window.Invalidate();
            m_sky      = new Sky();
            m_sky.Size = new SIZE(m_window.Width, 200);
            m_window.Frame.AddControl(m_sky);
            m_window.RegisterEvent(new ControlEvent(WindowLocationChanged), EVENTID.LOCATIONCHANGED);
        }