Пример #1
0
        public void createNewHistory(Share oriShare)
        {
            if (mScreens.size() > 30)
            {
                return;
            }

            xTabPage         exist = getTabPageOfShare(oriShare);
            ViewHistoryChart his;

            if (exist != null)
            {
                mTab.selectPage(exist);
                return;
            }
            //--------------------

            Share share = oriShare;

            if (share != null && share.getShareID() > 0)
            {
                share = new Share(Share.MAX_CANDLE_CHART_COUNT);
                share.setCode(oriShare.getCode(), 0);
                share.setID(oriShare.getShareID());
                share.mIsRealtime   = oriShare.mIsRealtime;
                share.mIsGroupIndex = oriShare.mIsGroupIndex;
            }

            his = new ViewHistoryChart(share);
            his.setSize(mTab.getW(), mTab.getH());
            //his.onActivate();
            mScreens.addElement(his);

            String title = "Lọc mã";

            if (share != null)
            {
                if (share.getCode() != null & share.getCode().Length > 0)
                {
                    title = share.getCode();
                }
            }
            xTabPage page = new xTabPage(title);

            page.userData  = oriShare;
            page.userData2 = his;

            his.Tag = page;

            page.addControl(his);
            mTab.addPage(page);

            mTab.selectLastPage();

            utils.AsyncUtils.DelayCall(500, () =>
            {
                his.onActivate();
            });
        }