Ejemplo n.º 1
0
        private void btnOpen_Click(object sender, EventArgs e)
        {
            var openFileDialog = new OpenFileDialog
            {
                InitialDirectory = Path.GetDirectoryName(ConfigurationManager.AppSettings["reportFile"])
            };

            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                tbDirectory.Text = openFileDialog.FileName;
                _chartDataUIEventManager.TriggerNewFileSelectedEvent(openFileDialog.FileName);
            }

            ReloadChartSeriesOptions();
        }
Ejemplo n.º 2
0
        public Form1(IChartDataUIEventManager chartDataUIEventManager, IValuationDataManager valuationDataManager)
        {
            InitializeComponent();

            lblChartInfo.Text        = "";
            _chartDataUIEventManager = chartDataUIEventManager;
            _valuationDataManager    = valuationDataManager;

            if (!File.Exists(ConfigurationManager.AppSettings["reportFile"]))
            {
                return;
            }

            tbDirectory.Text = ConfigurationManager.AppSettings["reportFile"];
            _chartDataUIEventManager.TriggerNewFileSelectedEvent(tbDirectory.Text);

            ReloadChartSeriesOptions();
        }