public static new AirfoilCsvAnalyzer GetInstance() { if (Instance == null) { Instance = new AirfoilCsvAnalyzer(); } return(Instance); }
// DelegateCommand Action ========================================================================== private void AirfoilSelectionMethod() { Models.AirfoilCsvAnalyzer airfoilCsvAnalyzer = Models.AirfoilCsvAnalyzer.GetInstance(); String _airfoil_path; // Issue the Messenger displaying OpenFileDialog _airfoil_path = General.Messenger.OpenFileMessenger.Show("CSV File (*.csv)|*.csv"); if (_airfoil_path == null) { return; } // Analyze the CSV file located in _airfoil_path var result = airfoilCsvAnalyzer.Analyze(_airfoil_path); // Get Airfoil's name from csv file name. var newAirfoil = new Airfoil.AirfoilManager(result); newAirfoil.AirfoilName = Path.GetFileName(_airfoil_path).Replace(".csv", ""); // Registrate imported Airfoil to the AirfoilGroupManager. ImportedAirfoil.Add(newAirfoil); }