private void addFieldBtn_Click(object sender, EventArgs e) { string fieldName = newFieldNameTextBox.Text; CustomDataEntryType fieldType = (CustomDataEntryType)newFieldType.SelectedIndex; CustomDataEntry customDataEntry = CustomDataEntry.CreateDefault(fieldName, fieldType); CustomDataEntries.Add(customDataEntry); PopulateListItems(); }
void SetCustomDataEntryType(CustomDataEntryType CustomDataEntryType) { switch (CustomDataEntryType) { case CustomDataEntryType.FileName: fieldTypeIcon.Image = FileNameIcon; break; case CustomDataEntryType.FolderName: fieldTypeIcon.Image = FolderNameIcon; break; } }
public static CustomDataEntry CreateDefault(string fieldTitle, CustomDataEntryType customDataEntryType) { return(new CustomDataEntry(fieldTitle, customDataEntryType)); }
private CustomDataEntry(string fieldTitle, CustomDataEntryType customDataEntryType) { FieldTitle = fieldTitle; CustomDataEntryType = customDataEntryType; }