public void ResetUI() { ModelColumnDefinitions columnDefs = new ModelColumnDefinitions(); latestImportUpdateStatus = null; SelectedFormatFile = ""; LabelLoadedFile.Content = "no file loaded"; //currentDBFieldsMetaInfo = new List<ColumnMetaInfo>(); MapConfigTable.ResetView(); ImportDataPreview.ResetData(); this.SelectedImportType = -1; ReSetRibbonEnabledStatus(true); }
public void SetColumnDefinitions(ModelColumnDefinitions defs) { colDefs = defs; }
private void LoadFileForPreview(string fileToLoad) { IOResults ares = new IOResults(); bool firstLineIsHeader = true;// (bool)dataEntryForm.checkBoxModelFirstRowHeader.IsChecked; var rawFileReader = new RawFileReader((fileToLoad.ToLower().IndexOf(".csv") > -1) ? ',' : '\t'); List<RawDataRow> dt = rawFileReader.LoadRawDataForPreview(fileToLoad, ares); rawFileReader.PerformColumnLoad(fileToLoad, ares, rawFileReader.MaxCols, firstLineIsHeader, workerLoadData); string ss = rawFileReader.GetColumnStats(); List<string> res = rawFileReader.DetermineColumnDataTypes(); columnDefs = new ModelColumnDefinitions(); // collect column assignments here rawFileReader.SetColumnDefinitions(columnDefs); }