public EventPointsIndicatorsFileWriter( EventPointsReader eventPoints, IndicatorCollection indicators, DateTime targetDate) { _eventPoints = eventPoints; _indicators = indicators; _targetDate = targetDate; }
private void button1_Click(object sender, EventArgs e) { try { String epPath = textBox1.Text; DateTime targetDate = DateTime.ParseExact(textBox2.Text, "yyyy-MM-dd", null); String fileOutPath = textBox3.Text; EventPointsReader eventPoints = new EventPointsReader(epPath, true); IndicatorCollection indicators = new IndicatorCollection(); indicators.Add("YesMoveDiff", new KtbTenYesMoveDiff()); EventPointsIndicatorsFileWriter writer = new EventPointsIndicatorsFileWriter(eventPoints, indicators, targetDate); writer.WriteToFile(fileOutPath); } catch (System.Exception ex) { logger.Error(ex.ToString()); } }