public Form1() { InitializeComponent(); stopwatch = new Stopwatch(); RemoteClient = new RemoteServer.ServiceClient("RemoteTcpEndpoint"); LocalClient = new LocalServer.ServiceClient("LocalTcpEndpoint"); }
public List <StockInfo> LocalSearchJson(Stopwatch stopwatch, LocalServer.ServiceClient client) { stopwatch.Restart(); StockInfo[] stockInfo = client.SearchByStockIdJson(StockId.Text); //計時結束 stopwatch.Stop(); TimeSpan time = stopwatch.Elapsed; string strTime = time.ToString(@"hh\:mm\:ss\.fff"); TimeConsume.AppendText("耗時" + strTime + "\r\n"); return(stockInfo.ToList()); }
public List <StockInfo> LocalSearchJson(Stopwatch stopwatch, LocalServer.ServiceClient client) { //計時開始 stopwatch.Restart(); StockInfo[] stockInfo = client.SearchByDateJson(Date.Text); //計時結束 stopwatch.Stop(); TimeSpan time = stopwatch.Elapsed; string strTime = String.Format("{0:00}:{1:00}:{2:00}:{3:000}", time.Hours, time.Minutes, time.Seconds, time.Milliseconds); TimeConsume.AppendText("耗時" + strTime + "\r\n"); return(stockInfo.ToList()); }