示例#1
0
        /// <summary>Open file dialog and load chosen Iris flowers file.</summary>
        private void LoadFile()
        {
            OpenFileDialog fileDialog = new OpenFileDialog
            {
                DefaultExt       = ".csv",
                Filter           = "Comma Separated Values (*.csv)|*.csv",
                InitialDirectory = "X:\\Main\\Programming\\C#\\iris-flower-charts\\examples"
            };


            if (fileDialog.ShowDialog() == true)
            {
                string path = fileDialog.FileName;
                Calculator.LoadIrises(path);
            }
            else
            {
                return;
            }
        }