コード例 #1
0
ファイル: QuickFixMain.cs プロジェクト: rebider/TradeLinkProj
        public QuickFixMain()
        {
            InitializeComponent();
            ContextMenu.MenuItems.Add("report", new EventHandler(report));
            _dc.Parent = this;
            _dc.Dock   = DockStyle.Fill;
            TradeLink.API.TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
            {
                tls = new TradeLink.Common.TLServer_WM();
            }
            else
            {
                tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            }

            tl = new ServerQuickFix(tls, Properties.Settings.Default.SettingsPath);
            tl.SendDebugEvent += new TradeLink.API.DebugDelegate(debug);
            if (tl.Start(string.Empty, string.Empty))
            {
                debug("login succeeded.");
            }
            else
            {
                debug("connection failed.");
            }
            FormClosing += new FormClosingEventHandler(QuickFixMain_FormClosing);
        }
コード例 #2
0
ファイル: QuickFixMain.cs プロジェクト: bluejack2000/core
        public QuickFixMain()
        {
            InitializeComponent();
            ContextMenu.MenuItems.Add("report", new EventHandler(report));
            _dc.Parent = this;
            _dc.Dock = DockStyle.Fill;
            TradeLink.API.TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
                tls = new TradeLink.Common.TLServer_WM();
            else
                tls = new TradeLink.Common.TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);

            tl = new ServerQuickFix(tls,Properties.Settings.Default.SettingsPath);
            tl.SendDebugEvent+=new TradeLink.API.DebugDelegate(debug);
            if (tl.Start(string.Empty, string.Empty))
                debug("login succeeded.");
            else
                debug("connection failed.");
            FormClosing += new FormClosingEventHandler(QuickFixMain_FormClosing);
        }