public ServerNxCoreMain() { InitializeComponent(); ContextMenu = new ContextMenu(); ContextMenu.MenuItems.Add(new MenuItem("report", new EventHandler(report))); 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); string start = Properties.Settings.Default.HistoricalFile == string.Empty ? ServerNxCore.LIVEFEED : Properties.Settings.Default.HistoricalFile; tl = new ServerNxCore(tls,start,Properties.Settings.Default.StateSaveInterval, Properties.Settings.Default.VerboseDebugging,debug); debug((tl.VerboseDebugging ? "Verbose is on" : "Verbose is off")); debug("save state interval: " + tl.SaveStateIntervalSec); FormClosing += new FormClosingEventHandler(ServerNxCoreMain_FormClosing); tl.Start(); }
public ServerNxCoreMain() { InitializeComponent(); ContextMenu = new ContextMenu(); ContextMenu.MenuItems.Add(new MenuItem("report", new EventHandler(report))); 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); } string start = Properties.Settings.Default.HistoricalFile == string.Empty ? ServerNxCore.LIVEFEED : Properties.Settings.Default.HistoricalFile; tl = new ServerNxCore(tls, start, Properties.Settings.Default.StateSaveInterval, Properties.Settings.Default.VerboseDebugging, debug); debug((tl.VerboseDebugging ? "Verbose is on" : "Verbose is off")); debug("save state interval: " + tl.SaveStateIntervalSec); FormClosing += new FormClosingEventHandler(ServerNxCoreMain_FormClosing); tl.Start(); }