public void Init(IncomeFileType incomeFileType) { ExcelCommanderFactory factory = new ExcelCommanderFactory(); ExcelCommander = factory.CreateExcelCommander(incomeFileType); ExcelCommander.PrintMessage += OnExcelCommander_PrintMessage; ExcelCommander.PrintStatus += ExcelCommander_PrintStatus; ExcelCommander.SetProgressBarValue += ExcelCommander_SetProgressBarValue; }
public BaseExcelCommander CreateExcelCommander(IncomeFileType incomeFileType) { switch (incomeFileType.Id) { case 1: return new ECDinamo(); case 2: return new ECProboxing(); case 3: return new ECShop(); throw new NotImplementedException( $"Метод разбора файлов типа {incomeFileType.Description} ещё не реализован"); } return null; }
public ExcelConverter(IncomeFileType incomeFileType) { Init(incomeFileType); }
public static ChoicesDictionary Instance(IncomeFileType type) { return _instance ?? (_instance = new ChoicesDictionary(type)); }
public ChoicesDictionary(IncomeFileType type) { DictionaryPath = Path.Combine(Application.StartupPath, "Dictionaries", type.ChoicesDictionary); Init(); }