Example #1
0
        /// <summary>
        /// 显示
        /// </summary>
        public override void Show()
        {
            List <Indicator> indicators = new List <Indicator>();

            m_indicatorService.GetIndicators(indicators);
            AddIndicatorsToTree(indicators);
            m_tvList.Update();
            m_window.Location = new POINT(-m_window.Width, -m_window.Height);
            m_window.AnimateShow(true);
            m_window.Invalidate();
            m_window.StartTimer(m_timerID, 10);
        }
Example #2
0
        /// <summary>
        /// 加载数据
        /// </summary>
        /// <param name="state">状态</param>
        /// <returns>加载状态</returns>
        public static int LoadData(int state)
        {
            ChatData chatData = new ChatData();

            m_chatService.Enter(m_chatService.RequestID, chatData);
            Indicator indicator = new Indicator();

            indicator.m_userID = m_userID;
            m_indicatorService.GetIndicators(m_indicatorService.GetListRequestID, indicator);
            SecurityFilterTemplate template = new SecurityFilterTemplate();

            template.m_userID = m_userID;
            m_securityFilterService.GetTemplates(m_securityFilterService.GetListRequestID, template);
            UserSecurityVisitsCount visitsCount = new UserSecurityVisitsCount();

            visitsCount.m_userID = DataCenter.UserID;
            m_userSecurityService.GetVisitsCount(m_userSecurityService.GetListRequestID, visitsCount);
            UserSecurityCategory category = new UserSecurityCategory();

            category.m_userID = m_userID;
            m_userSecurityService.GetCategories(m_userSecurityService.GetListRequestID, category);
            IndicatorLayout indicatorLayout = new IndicatorLayout();

            indicatorLayout.m_userID = m_userID;
            m_indicatorLayoutService.GetLayouts(m_indicatorLayoutService.GetListRequestID, indicatorLayout);
            Macro macro = new Macro();

            macro.m_userID = m_userID;
            m_macroService.GetMacros(m_macroService.GetListRequestID, macro);
            UserSession userSession = new UserSession();

            userSession.m_userID = m_userID;
            m_userSessionService.GetSessions(m_userSessionService.GetListRequestID, userSession);
            if (state == 1)
            {
                m_securityService.LoadSecurities();
            }
            if (m_mainUI != null)
            {
                m_mainUI.LoadData();
            }
            return(0);
        }