private void buttonDoImport_Click(object sender, EventArgs e) { LoggingForm logger = new LoggingForm(); logger.Show(this); string excelFilePath = textBoxExcelFilePath.Text; string codeFolderPath = GetMacroFolderPath(false); MacroEnv env = new MacroEnv(codeFolderPath); ExcelOperator access = new ExcelOperator(); if (checkBoxRemoveAllMacrosBeforeImport.Checked) access.AddCommand(new RemoveMacros(logger)); access.AddCommand(new ImportMacros(logger, env, cbOverrideImport.Checked)); access.invoke(excelFilePath, true); }
private void bRemoveAllMacros_Click(object sender, EventArgs e) { LoggingForm logger = new LoggingForm(); logger.Show(this); string excelFilePath = textBoxExcelFilePath.Text; ExcelOperator access = new ExcelOperator(); access.AddCommand(new RemoveMacros(logger)); access.invoke(excelFilePath, true); }