public MyPresenter(IConvertForm _form, IReader _reader, ITableToModel _tableToModel) { form = _form; reader = _reader; tableToModel = _tableToModel; reader.GetTableArrayProgress += form.Ptog; form.FileOpenClick += FileOpen; form.StationNameTextChange += StationNameChanged; form.TablesArrayListCommitted += ShowTable; form.NextClick += NextClickTableShow; form.AddTableClick += AddTableClick; form.FileSaveClick += SaveFile; }
public ExcelPresenter(IConvertForm _form, IReader _reader, ITableToModel _tableToMode, IFormEventsForExcel _excelEvent) : base(_form, _reader, _tableToMode) { excelEvent = _excelEvent; form.FileOpenClick -= FileOpen; form.AddTableClick -= AddTableClick; form.FileSaveClick -= SaveFile; form.TablesArrayListCommitted -= ShowTable; excelEvent.FileExcelOpenClick += FileOpen; excelEvent.SaveAsExcelClick += AddTableClick; excelEvent.SaveAsExcelClick += SaveFile; excelEvent.TablesArrayListCommittedExcel += ShowTable; }
private static Node NodeFromTable(string tableName, string filename, KindOfTable knd, out ITableToModel rep) { INodeBilder nodeBld = new NodeBilder(); rep = new TableToModel(nodeBld); IReader rd = new WrdReader(); DataTable tbl = rd.GetTable(2, filename).Result; var colNumber = new List <int> { 0, 1, 2, 3, 4 }; var tmpNumber = new List <int> { 5, 6 }; rep.TableToModelConv(tableName, tbl, colNumber, tmpNumber, "сут", knd); Node node = (NodeBilder)nodeBld; return(node); }