static void Main() { if (!ConfigurationManager.AppSettings.AllKeys.Contains("FilePath")) { throw new KeyNotFoundException("Не указан файл для хранения данных."); } var filePath = ConfigurationManager.AppSettings["FilePath"]; var storage = new FileStorage(filePath); var stageStorage = new StageStorage(storage); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm(stageStorage)); }
public StageController(IConfiguration config) { _storage = new StageStorage(config); }