예제 #1
0
 /// <summary>
 /// 创建填空
 /// </summary>
 public Sky()
 {
     BackColor    = COLOR.ARGB(0, 0, 100, 255);
     BorderColor  = COLOR.EMPTY;
     Font         = new FONT("Arial", 16, false, false, false);
     ForeColor    = COLOR.ARGB(255, 255, 255);
     ResourcePath = DataCenter.GetAppPath() + "\\config";
 }
예제 #2
0
        /// <summary>
        /// 加载界面
        /// </summary>
        public virtual void Load(INativeBase native, string xmlName, string windowName)
        {
            Native = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\" + xmlName + ".html";

            Script = new GaiaScript(this);
            LoadFile(xmlPath, null);
            m_window      = FindControl(windowName) as WindowEx;
            m_invokeEvent = new ControlInvokeEvent(Invoke);
            m_window.RegisterEvent(m_invokeEvent, EVENTID.INVOKE);
            //注册点击事件
            RegisterEvents(m_window);
        }
예제 #3
0
        /// <summary>
        /// 创建聊天窗体
        /// </summary>
        /// <param name="native">方法库</param>
        /// <param name="indicator">指标</param>
        public ParametersWindow(INativeBase native, CIndicator indicator)
        {
            m_indicator = indicator;
            m_native    = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\ParametersWindow.xml";

            Native = m_native;
            LoadFile(xmlPath, null);
            m_window = FindControl("windowParameters") as WindowEx;
            GetParameters();
            //注册点击事件
            RegisterEvents(m_window);
        }
예제 #4
0
        /// <summary>
        /// 创建沙盘推演窗体
        /// </summary>
        /// <param name="native">方法库</param>
        public SandBoxWindow(INativeBase native)
        {
            m_native = native;
            String xmlPath = DataCenter.GetAppPath() + "\\config\\SandBoxWindow.xml";

            Native = m_native;
            LoadFile(xmlPath, null);
            m_window = FindControl("windowSB") as WindowEx;
            //注册秒表
            m_timerEvent = new ControlTimerEvent(CallTimer);
            m_window.RegisterEvent(m_timerEvent, EVENTID.TIMER);
            //注册点击事件
            RegisterEvents(m_window);
        }
예제 #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);
        }
예제 #6
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);
        }
예제 #7
0
 /// <summary>
 /// 加载
 /// </summary>
 /// <param name="name">名称</param>
 public void Load(String name)
 {
     if (name == "MainFrame")
     {
         m_xml = new MainFrame();
     }
     m_xml.CreateNative();
     m_native                = m_xml.Native;
     m_native.Paint          = new GdiPlusPaintEx();
     m_host                  = new WinHostEx();
     m_host.Native           = m_native;
     m_native.Host           = m_host;
     m_host.HWnd             = Handle;
     m_native.AllowScaleSize = true;
     m_native.DisplaySize    = new SIZE(ClientSize.Width, ClientSize.Height);
     m_xml.ResetScaleSize(GetClientSize());
     m_xml.Script = new GaiaScript(m_xml);
     m_xml.Load(DataCenter.GetAppPath() + "\\config\\" + name + ".html");
     m_native.Update();
     Invalidate();
 }
예제 #8
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);
        }
예제 #9
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;
        }
예제 #10
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);
        }
예제 #11
0
        /// <summary>
        /// 加载图标
        /// </summary>
        private void LoadIcons()
        {
            String dir = DataCenter.GetAppPath() + "\\config\\icons\\";

            m_gridIcons.ResourcePath = dir;
            List <String> files = new List <String>();

            CFileA.GetFiles(dir, files);
            int filesSize   = files.Count;
            int columnsSize = m_gridIcons.GetColumns().Count;

            m_gridIcons.BeginUpdate();
            GridRow row = null;

            for (int i = 0; i < filesSize; i++)
            {
                int col = i;
                if (i >= columnsSize)
                {
                    col = i % columnsSize;
                }
                if (col == 0)
                {
                    row        = new GridRow();
                    row.Height = 64;
                    m_gridIcons.AddRow(row);
                }
                String file = files[i];
                file = file.Substring(file.LastIndexOf('\\') + 1);
                GridIconCell iconCell = new GridIconCell();
                iconCell.SetString(file);
                row.AddCell(col, iconCell);
            }
            m_gridIcons.EndUpdate();
            m_gridIcons.Invalidate();
        }
예제 #12
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);
        }
예제 #13
0
 /// <summary>
 /// 创建单元格
 /// </summary>
 public UserSecurityCellT2()
 {
     AllowDrag    = true;
     BorderColor  = COLOR.EMPTY;
     ResourcePath = DataCenter.GetAppPath() + "\\config\\images";
 }