示例#1
0
        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
        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);
        }