public ActionCreateEditForm(EditEntryFormMode mode, Entry entry, Type type, List <PropertyInfo> properties, DataChanged dataChanged, bool isCusom) { _mode = mode; _entry = entry; _type = type; _properties = properties; _dataChanged = dataChanged; _isCustom = isCusom; if (_entry == null) { _entry = Activator.CreateInstance(type) as Entry; _entry.Id = Guid.NewGuid(); } }
private IEditorValue CreateWrapper(Type controlType, EditEntryFormMode mode, string propertyName) { IEditorValue control = Activator.CreateInstance(controlType) as IEditorValue; if (control == null) { return(null); } LinkLabelTextBox linkLabelTextBox = control as LinkLabelTextBox; if (linkLabelTextBox != null) { linkLabelTextBox.DataChanged = DataChanged; } control.Mode = mode; control.Data = _entry; control.PropertyName = propertyName; control.Type = _type; return(control); }