Esempio n. 1
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;
     }
 }
Esempio n. 2
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();
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 创建键盘精灵
 /// </summary>
 public SearchDiv()
 {
     m_gridCellClickEvent       = new GridCellMouseEvent(GridCellClick);
     m_gridKeyDownEvent         = new ControlKeyEvent(GridKeyDown);
     m_textBoxInputChangedEvent = new ControlEvent(TextBoxInputChanged);
     m_textBoxKeyDownEvent      = new ControlKeyEvent(TextBoxKeyDown);
     BackColor = COLOR.EMPTY;
     IsWindow  = true;
 }
Esempio n. 4
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();
     }
 }
Esempio n. 5
0
        /// <summary>
        /// 创建选股结果界面
        /// </summary>
        /// <param name="native">方法库</param>
        public SecurityFilterResult(INativeBase native)
        {
            m_native = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\SecurityFilterResult.xml";

            m_xml        = new UIXmlEx();
            m_xml.Native = m_native;
            m_xml.LoadFile(xmlPath, null);
            m_window           = m_xml.FindControl("windowSFR") as WindowEx;
            m_gridFilterResult = m_xml.FindControl("gridFilterResult") as GridA;
            m_gridFilterResult.RowStyle.Font = new FONT("SimSun", 14, false, false, false);
            m_gridCellClick = new GridCellMouseEvent(GridCellClick);
            m_gridFilterResult.RegisterEvent(m_gridCellClick, EVENTID.GRIDCELLCLICK);
            //注册秒表
            m_timerEvent = new ControlTimerEvent(CallTimer);
            m_window.RegisterEvent(m_timerEvent, EVENTID.TIMER);
            //注册点击事件
            RegisterEvents(m_window);
        }
Esempio n. 6
0
        /// <summary>
        /// 创建自选股界面
        /// </summary>
        /// <param name="native">方法库</param>
        public UserSecurityList(INativeBase native)
        {
            m_native = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\UserSecurityList.xml";

            Native = m_native;
            LoadFile(xmlPath, null);
            m_window      = FindControl("windowUS") as WindowEx;
            m_invokeEvent = new ControlInvokeEvent(Invoke);
            m_window.RegisterEvent(m_invokeEvent, EVENTID.INVOKE);
            //注册秒表
            m_timerEvent = new ControlTimerEvent(CallTimer);
            m_window.RegisterEvent(m_timerEvent, EVENTID.TIMER);
            //注册点击事件
            RegisterEvents(m_window);
            m_gridCategory = GetGrid("gridCategory");
            m_gridSelectedRowsChangedEvent = new ControlEvent(GridSelectedRowsChanged);
            m_gridCategory.RegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED);
            m_gridCellEditEndEvent = new GridCellEvent(CategoryGridCellEditEnd);
            m_gridCategory.RegisterEvent(m_gridCellEditEndEvent, EVENTID.GRIDCELLEDITEND);
            m_gridSecurities = GetGrid("gridSecurities");
            m_gridCellClick  = new GridCellMouseEvent(GridCellClick);
            m_gridSecurities.RegisterEvent(m_gridCellClick, EVENTID.GRIDCELLCLICK);
            //注册服务
            m_securityService          = DataCenter.SecurityService;
            m_userSecurityService      = DataCenter.UserSecurityService;
            m_userSecurityDataCallBack = new ListenerMessageCallBack(UserSecurityDataCallBack);
            m_userSecurityService.RegisterListener(m_userSecurityService.OperatorRequestID, m_userSecurityDataCallBack);
            //注册行情
            m_quoteService       = DataCenter.QuoteService;
            m_latestDataCallBack = new ListenerMessageCallBack(LatestDataCallBack);
            m_quoteService.RegisterListener(m_latestDataRequestID, m_latestDataCallBack);
            //搜索文本框
            m_txtSearch             = GetTextBox("txtSearch");
            m_searchTextBoxGotFocus = new ControlEvent(SearchTextBoxGotFocus);
            m_txtSearch.RegisterEvent(m_searchTextBoxGotFocus, EVENTID.GOTFOCUS);
        }
Esempio n. 7
0
        /// <summary>
        /// 创建宏管理界面
        /// </summary>
        /// <param name="native">方法库</param>
        public MacroList(INativeBase native)
        {
            m_native = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\MacroList.xml";

            Native = m_native;
            LoadFile(xmlPath, null);
            m_window  = FindControl("windowMacro") as WindowEx;
            m_divIcon = GetDiv("divIcon");
            m_divIcon.ResourcePath = DataCenter.GetAppPath() + "\\config\\icons\\";
            m_gridIcons            = GetGrid("gridIcons");
            m_gridCellClickEvent   = new GridCellMouseEvent(GridCellClick);
            m_gridIcons.RegisterEvent(m_gridCellClickEvent, EVENTID.GRIDCELLCLICK);
            m_gridMacros = GetGrid("gridMacros");
            m_gridSelectedRowsChangedEvent = new ControlEvent(GridSelectedRowsChanged);
            m_gridMacros.RegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED);
            m_invokeEvent = new ControlInvokeEvent(Invoke);
            m_window.RegisterEvent(m_invokeEvent, EVENTID.INVOKE);
            //注册点击事件
            RegisterEvents(m_window);
            m_macroService      = DataCenter.MacroService;
            m_macroDataCallBack = new ListenerMessageCallBack(MacroDataCallBack);
            m_macroService.RegisterListener(m_macroService.OperatorRequestID, m_macroDataCallBack);
        }