Ejemplo n.º 1
0
        public EsignalMain()
        {
            TLServer tls;
            if (Properties.Settings.Default.TLClientAddress == string.Empty)
                tls = new TLServer_WM();
            else
                tls = new TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);

            TrackEnabled = Util.TrackUsage();
            Program = PROGRAM;
            InitializeComponent();
            tl = new EsignalServer(tls);
            // set defaults
            tl.isPaperTradeEnabled = Properties.Settings.Default.PaperTrade;
            tl.isPaperTradeUsingBidAsk = Properties.Settings.Default.PaperTradeUseBidAsk;
            tl.AllowSendInvalidBars = Properties.Settings.Default.AllowSendOfInvalidBars;
            tl.DefaultBarsBack = Properties.Settings.Default.DefaultBarsBack;
            tl.VerboseDebugging = Properties.Settings.Default.VerboseDebugging;
            tl.ReleaseBarHistoryAfteRequest = Properties.Settings.Default.ReleaseBarHistoryAfterSending;
            tl.ReleaseDeadSymbols = Properties.Settings.Default.ReleaseDeadSymbols;
            tl.WaitBetweenEvents = Properties.Settings.Default.WaitBetweenEvents;
            tl.BarRequestsGetAllData = Properties.Settings.Default.BarRequestsuseAllData;
            // send debug messages to log file
            tl.GotDebug += new DebugFullDelegate(debug);
            debug("Started " + PROGRAM + Util.TLVersion());
            // attempt to connect to esignal
            _ok_Click(null, null);
            // handle connector exits
            FormClosing += new FormClosingEventHandler(EsignalMain_FormClosing);
        }
Ejemplo n.º 2
0
        public EsignalMain()
        {
            TLServer tls;

            if (Properties.Settings.Default.TLClientAddress == string.Empty)
            {
                tls = new TLServer_WM();
            }
            else
            {
                tls = new TLServer_IP(Properties.Settings.Default.TLClientAddress, Properties.Settings.Default.TLClientPort);
            }

            TrackEnabled = Util.TrackUsage();
            Program      = PROGRAM;
            InitializeComponent();
            tl = new EsignalServer(tls);
            // set defaults
            tl.isPaperTradeEnabled          = Properties.Settings.Default.PaperTrade;
            tl.isPaperTradeUsingBidAsk      = Properties.Settings.Default.PaperTradeUseBidAsk;
            tl.AllowSendInvalidBars         = Properties.Settings.Default.AllowSendOfInvalidBars;
            tl.DefaultBarsBack              = Properties.Settings.Default.DefaultBarsBack;
            tl.VerboseDebugging             = Properties.Settings.Default.VerboseDebugging;
            tl.ReleaseBarHistoryAfteRequest = Properties.Settings.Default.ReleaseBarHistoryAfterSending;
            tl.ReleaseDeadSymbols           = Properties.Settings.Default.ReleaseDeadSymbols;
            tl.WaitBetweenEvents            = Properties.Settings.Default.WaitBetweenEvents;
            tl.BarRequestsGetAllData        = Properties.Settings.Default.BarRequestsuseAllData;
            // send debug messages to log file
            tl.GotDebug += new DebugDelegate(debug);
            debug("Started " + PROGRAM + Util.TLVersion());
            // attempt to connect to esignal
            _ok_Click(null, null);
            // handle connector exits
            FormClosing += new FormClosingEventHandler(EsignalMain_FormClosing);
        }