Exemplo n.º 1
0
        /// <summary>
        /// 加载界面
        /// </summary>
        public virtual void Load(INativeBase native, String xmlName, String windowName)
        {
            Native = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\" + xmlName + ".html";

            LoadFile(xmlPath, null);
            m_window      = FindControl(windowName) as WindowEx;
            m_invokeEvent = new ControlInvokeEvent(Invoke);
            m_window.RegisterEvent(m_invokeEvent, EVENTID.INVOKE);
            //注册点击事件
            RegisterEvents(m_window);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 销毁方法
 /// </summary>
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         if (m_window != null)
         {
             m_invokeEvent = null;
             m_window.Close();
             m_window.Dispose();
             m_window = null;
         }
         base.Dispose();
     }
 }
Exemplo n.º 3
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();
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// 创建登录窗体
        /// </summary>
        /// <param name="native">方法库</param>
        public LoginWindow(INativeBase native)
        {
            m_native = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\LoginWindow.xml";

            Native = m_native;
            LoadFile(xmlPath, null);
            m_window      = FindControl("windowLogin") as WindowEx;
            m_invokeEvent = new ControlInvokeEvent(Invoke);
            m_window.RegisterEvent(m_invokeEvent, EVENTID.INVOKE);
            //注册点击事件
            RegisterEvents(m_window);
            m_loginService           = DataCenter.LoginService;
            m_loginDataCallBackEvent = new ListenerMessageCallBack(LoginDataCallBack);
            m_loginService.RegisterListener(m_loginRequestID, m_loginDataCallBackEvent);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 创建条件选股界面
        /// </summary>
        /// <param name="native">方法库</param>
        public IndicatorLayoutList(INativeBase native)
        {
            m_native = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\IndicatorLayoutList.xml";

            Native = m_native;
            LoadFile(xmlPath, null);
            m_window      = FindControl("windowILL") as WindowEx;
            m_gridLayouts = GetGrid("gridLayouts");
            m_gridSelectedRowsChangedEvent = new ControlEvent(GridSelectedRowsChanged);
            m_gridLayouts.RegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED);
            m_invokeEvent = new ControlInvokeEvent(Invoke);
            m_window.RegisterEvent(m_invokeEvent, EVENTID.INVOKE);
            //注册点击事件
            RegisterEvents(m_window);
            m_indicatorLayoutService      = DataCenter.IndicatorLayoutService;
            m_indicatorLayoutDataCallBack = new ListenerMessageCallBack(IndicatorLayoutDataCallBack);
            m_indicatorLayoutService.RegisterListener(m_indicatorLayoutService.OperatorRequestID, m_indicatorLayoutDataCallBack);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 创建条件选股界面
        /// </summary>
        /// <param name="native">方法库</param>
        public SecurityFilterList(INativeBase native)
        {
            m_native = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\SecurityFilterList.xml";

            Native = m_native;
            LoadFile(xmlPath, null);
            m_window       = FindControl("windowSF") as WindowEx;
            m_gridTemplate = GetGrid("gridTemplates");
            m_gridSelectedRowsChangedEvent = new ControlEvent(GridSelectedRowsChanged);
            m_gridTemplate.RegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED);
            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_securityService                 = DataCenter.SecurityService;
            m_securityFilterService           = DataCenter.SecurityFilterService;
            m_securityFilterDataCallBackEvent = new ListenerMessageCallBack(SecurityFilterDataCallBack);
            m_securityFilterService.RegisterListener(m_securityFilterService.OperatorRequestID, m_securityFilterDataCallBackEvent);
        }
Exemplo n.º 7
0
        /// <summary>
        /// 创建股票列表窗体
        /// </summary>
        /// <param name="native">方法库</param>
        public SecurityList(INativeBase native)
        {
            m_native = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\SecurityList.xml";

            Native = m_native;
            LoadFile(xmlPath, null);
            m_window      = FindControl("windowSecurity") as WindowEx;
            m_invokeEvent = new ControlInvokeEvent(Invoke);
            m_window.RegisterEvent(m_invokeEvent, EVENTID.INVOKE);
            //注册点击事件
            RegisterEvents(m_window);
            m_gridSecurities       = GetGrid("gridSecurities");
            m_gridSelectSecurities = GetGrid("gridSelectSecurities");
            m_tvBlock = GetTree("tvBlock");
            m_gridSelectedRowsChangedEvent = new ControlEvent(GridSelectedRowsChanged);
            m_tvBlock.RegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED);
            //注册服务
            m_securityService      = DataCenter.SecurityService;
            m_securityDataCallBack = new ListenerMessageCallBack(SecurityDataCallBack);
            m_securityService.RegisterListener(m_securitiesRequestID, m_securityDataCallBack);
            m_userSecurityService = DataCenter.UserSecurityService;
        }
Exemplo n.º 8
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);
        }
Exemplo n.º 9
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();
     }
 }
Exemplo n.º 10
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);
        }