Example #1
0
        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;
            }
        }
Example #3
0
 public static CustomDataEntry CreateDefault(string fieldTitle, CustomDataEntryType customDataEntryType)
 {
     return(new CustomDataEntry(fieldTitle, customDataEntryType));
 }
Example #4
0
 private CustomDataEntry(string fieldTitle, CustomDataEntryType customDataEntryType)
 {
     FieldTitle          = fieldTitle;
     CustomDataEntryType = customDataEntryType;
 }