/// ------------------------------------------------------------------------------------ public void SetFieldWorksDefaults(string fwProject) { txtProjName.Text = Path.GetFileNameWithoutExtension(fwProject); var isoCode = new ParseFwXml(fwProject).Code; txtLanguageCode.Text = isoCode; txtLanguageName.Text = new WritingSystemDefinition(isoCode).Language.Name; _dataSources.Add(new PaDataSource(PaField.GetDefaultFields(new Fw7CustomField(null)), new FwDataSourceInfo(fwProject, null, DataSourceType.FW7))); LoadGrid(-1); }
/// ------------------------------------------------------------------------------------ public SfmFieldMappingGrid(IEnumerable <PaField> potentialFields, IEnumerable <FieldMapping> mappings, Func <string> srcFldColHdgTextHandler, Func <string> tgtFldColHdgTextHandler) { m_sourceFieldColumnHeadingTextHandler = srcFldColHdgTextHandler; m_targetFieldColumnHeadingTextHandler = tgtFldColHdgTextHandler; m_potentialFields = potentialFields; m_mappings = mappings.ToList(); m_defaultFields = PaField.GetDefaultFields(); ShowFontColumn(false); RowCount = m_mappings.Count; }