Beispiel #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();
            }
        }
Beispiel #2
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         int divsSize = m_divs.Count;
         for (int i = 0; i < divsSize; i++)
         {
             SandBoxCandleDiv div = m_divs[i];
             if (div.Moving)
             {
                 m_native.RemoveControl(div);
             }
             else
             {
                 m_window.RemoveControl(div);
             }
             div.Dispose();
         }
         m_divs.Clear();
         if (m_window != null)
         {
             m_window.UnRegisterEvent(m_timerEvent, EVENTID.TIMER);
             m_timerEvent = null;
             m_window.StopTimer(m_timerID);
             m_window.Close();
             m_window.Dispose();
             m_window = null;
         }
         base.Dispose();
     }
 }
Beispiel #3
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_chart = null;
         if (m_gridLayouts != null)
         {
             m_gridLayouts.UnRegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED);
             m_gridSelectedRowsChangedEvent = null;
             m_gridLayouts = null;
         }
         if (m_indicatorLayoutService != null)
         {
             m_indicatorLayoutService.UnRegisterListener(m_indicatorLayoutService.OperatorRequestID, m_indicatorLayoutDataCallBack);
             m_indicatorLayoutDataCallBack = null;
             m_indicatorLayoutService      = null;
         }
         if (m_window != null)
         {
             m_window.UnRegisterEvent(m_invokeEvent, EVENTID.INVOKE);
             m_invokeEvent = null;
             m_window.Close();
             m_window.Dispose();
             m_window = null;
         }
         base.Dispose();
     }
 }
Beispiel #4
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_chart = null;
         if (m_gridIcons != null)
         {
             m_gridIcons.UnRegisterEvent(m_gridCellClickEvent, EVENTID.GRIDCELLCLICK);
             m_gridCellClickEvent = null;
             m_gridIcons          = null;
         }
         if (m_gridMacros != null)
         {
             m_gridMacros.UnRegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED);
             m_gridSelectedRowsChangedEvent = null;
             m_gridMacros = null;
         }
         if (m_macroService != null)
         {
             m_macroService.UnRegisterListener(m_macroService.OperatorRequestID, m_macroDataCallBack);
             m_macroDataCallBack = null;
             m_macroService      = null;
         }
         if (m_window != null)
         {
             m_window.UnRegisterEvent(m_invokeEvent, EVENTID.INVOKE);
             m_invokeEvent = null;
             m_window.Close();
             m_window.Dispose();
             m_window = null;
         }
         base.Dispose();
     }
 }
Beispiel #5
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public void Dispose()
 {
     if (!m_isDisposed)
     {
         m_chart = null;
         if (m_gridFilterResult != null)
         {
             m_gridFilterResult.UnRegisterEvent(m_gridCellClick, EVENTID.GRIDCELLCLICK);
             m_gridCellClick    = null;
             m_gridFilterResult = null;
         }
         if (m_window != null)
         {
             m_window.StopTimer(m_timerID);
             m_window.UnRegisterEvent(m_timerEvent, EVENTID.TIMER);
             m_timerEvent = null;
             m_window.Close();
             m_window.Dispose();
             m_window = null;
         }
         if (m_xml != null)
         {
             m_xml.Dispose();
             m_xml = null;
         }
         m_isDisposed = true;
     }
 }
Beispiel #6
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         if (m_indicatorService != null)
         {
             m_indicatorService.UnRegisterListener(m_indicatorService.OperatorRequestID, m_indicatorDataCallBackEvent);
             m_indicatorDataCallBackEvent = null;
             m_indicatorService           = null;
         }
         if (m_tvList != null)
         {
             m_tvList.UnRegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED);
             m_gridSelectedRowsChangedEvent = null;
             m_tvList = null;
         }
         if (m_window != null)
         {
             m_window.UnRegisterEvent(m_invokeEvent, EVENTID.INVOKE);
             m_invokeEvent = null;
             m_window.UnRegisterEvent(m_timerEvent, EVENTID.TIMER);
             m_timerEvent = null;
             m_window.Close();
             m_window.Dispose();
             m_window = null;
         }
         base.Dispose();
     }
 }
Beispiel #7
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         if (m_window != null)
         {
             m_window.Close();
             m_window.Dispose();
             m_window = null;
         }
         base.Dispose();
     }
 }
Beispiel #8
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         if (m_gridCategory != null)
         {
             m_gridCategory.UnRegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED);
             m_gridSelectedRowsChangedEvent = null;
             m_gridCategory.UnRegisterEvent(m_gridCellEditEndEvent, EVENTID.GRIDCELLEDITEND);
             m_gridCellEditEndEvent = null;
             m_gridCategory         = null;
         }
         if (m_gridSecurities != null)
         {
             m_gridSecurities.UnRegisterEvent(m_gridCellClick, EVENTID.GRIDCELLCLICK);
             m_gridCellClick  = null;
             m_gridSecurities = null;
         }
         if (m_quoteService != null)
         {
             m_quoteService.UnRegisterListener(m_latestDataRequestID, m_latestDataCallBack);
             m_latestDataCallBack = null;
             m_quoteService       = null;
         }
         m_latestDatas.Clear();
         if (m_txtSearch != null)
         {
             m_txtSearch.UnRegisterEvent(m_searchTextBoxGotFocus, EVENTID.GOTFOCUS);
             m_searchTextBoxGotFocus = null;
             m_txtSearch             = null;
         }
         if (m_userSecurityService != null)
         {
             m_userSecurityService.UnRegisterListener(m_userSecurityService.OperatorRequestID, m_userSecurityDataCallBack);
             m_userSecurityDataCallBack = null;
             m_userSecurityService      = null;
         }
         if (m_window != null)
         {
             m_window.UnRegisterEvent(m_invokeEvent, EVENTID.INVOKE);
             m_invokeEvent = null;
             m_window.UnRegisterEvent(m_timerEvent, EVENTID.TIMER);
             m_timerEvent = null;
             m_window.Close();
             m_window.Dispose();
             m_window = null;
         }
         base.Dispose();
     }
 }
Beispiel #9
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();
        }
Beispiel #10
0
        /// <summary>
        /// 查看
        /// </summary>
        public void Watch()
        {
            SecurityFilterTemplate template = new SecurityFilterTemplate();

            GetTemplate(ref template);
            SecurityFilterTask task = m_securityFilterService.GetTask(template.m_templateID);

            if (task != null)
            {
                SecurityFilterResult securityFilterResult = new SecurityFilterResult(m_native);
                securityFilterResult.Chart = m_chart;
                securityFilterResult.Task  = task;
                securityFilterResult.Show();
                WindowEx window = securityFilterResult.Window;
                window.IsChildWindow = true;
                m_native.Invalidate();
            }
        }
Beispiel #11
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         if (m_gridServers != null)
         {
             m_gridServers.UnRegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED);
             m_gridSelectedRowsChangedEvent = null;
             m_gridServers = null;
         }
         if (m_window != null)
         {
             m_window.Close();
             m_window.Dispose();
             m_window = null;
         }
         base.Dispose();
     }
 }
Beispiel #12
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();
        }
Beispiel #13
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         if (m_loginService != null)
         {
             if (m_loginDataCallBackEvent != null)
             {
                 m_loginService.UnRegisterListener(m_loginRequestID, m_loginDataCallBackEvent);
                 m_loginDataCallBackEvent = null;
             }
             m_loginService = null;
         }
         if (m_window != null)
         {
             m_window.UnRegisterEvent(m_invokeEvent, EVENTID.INVOKE);
             m_invokeEvent = null;
             m_window.Close();
             m_window.Dispose();
             m_window = null;
         }
         base.Dispose();
     }
 }