Esempio n. 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();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 加载界面
        /// </summary>
        public virtual void Load(INativeBase native, string xmlName, string windowName)
        {
            Native = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\" + xmlName + ".html";

            Script = new GaiaScript(this);
            LoadFile(xmlPath, null);
            m_window      = FindControl(windowName) as WindowEx;
            m_invokeEvent = new ControlInvokeEvent(Invoke);
            m_window.RegisterEvent(m_invokeEvent, EVENTID.INVOKE);
            //注册点击事件
            RegisterEvents(m_window);
        }
Esempio n. 3
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();
        }
Esempio n. 4
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();
        }