public void Execute(object parameter) { if (tik == 60) { string ticker = stockChart.tickerTextBox.Text.ToString(); string year = stockChart.yearComboBox.SelectedItem.ToString(); string month = stockChart.monthComboBox.SelectedItem.ToString(); string day = stockChart.dayComboBox.SelectedItem.ToString(); if (int.Parse(day) < 10) { stockChart.webStockData.getCSVDataFromGoogle(ticker, "0" + day, month, year); } else { stockChart.webStockData.getCSVDataFromGoogle(ticker, day, month, year); } stockChart.refreshCSVChartAttribues(); timer1.Interval = new TimeSpan(0, 0, 0, 1); timer1.Tick += new EventHandler(timer1_Tick); timer1.Start(); stockChart.downloadButton.IsEnabled = false; } else { } }
public void Execute(object parameter) { if (action == "DownloadData") { if (tik == 20) { string ticker = stockChart.tickerTextBox.Text.ToString(); string date = stockChart._dateChoice; stockChart.webStockData.getCSVDataFromIEX(ticker, date); stockChart.refreshCSVChartAttribues(); timer1.Interval = new TimeSpan(0, 0, 0, 1); timer1.Tick += new EventHandler(timer1_Tick); timer1.Start(); stockChart.downloadButton.IsEnabled = false; } } }