private void btn_export_Click(object sender, EventArgs e) { if (!InvalidSettingPara()) { return; } var outType = (OutFormat.Type)cbx_export_format.SelectedIndex; var excelFile = new ExcelFile() { SourcePath = tb_select_path.Text, ExportPath = tb_save_path.Text, OutFileName = Tb_OutputFileName.Text, StarSheet = Int32.Parse(edit_star_sheet.Text), StarReadRaw = Int32.Parse(edit_star_raw.Text), StarReadCloumn = Int32.Parse(edit_star_column.Text), }; var file = FormatFactory.Create(outType, excelFile); try { var decodeStr = file.Decode(); DisplayConsole("[Info]" + decodeStr); file.GenFile(); DisplayConsole($"[SUCCESS] Gen {outType} Finish"); } catch (Exception expection) { DisplayConsole("[ERROR]" + expection.Message); } }