Beispiel #1
0
 //-----------------------------------------------------------------
 public EntryComponentTemplate(EntryComponent template)
 {
     if (template == null)
     {
         throw new ArgumentNullException();
     }
     _templateComponent = template;
     _holder            = template.Holder;
     _templateComponent.OnEditModeModified += OnTemplateEditChanged_UpdateObservers;
 }
Beispiel #2
0
 public EntryComponentTemplate(EntryComponentTemplate other)
 {
     if (other == null)
     {
         throw new ArgumentNullException();
     }
     _holder            = other._holder;
     _templateComponent = (EntryComponent)other.TemplateInstance.Clone();
     //note: the observers list was not cloned as it will mess up the "components entry template"
     // _observersList = other.ObserversList.Select(x => x.Clone() as EntryComponent).ToList();
     _templateComponent.OnEditModeModified += OnTemplateEditChanged_UpdateObservers;
     other.ObserversList.ForEach(x => x.CloneTo(AddObserver()));
 }
Beispiel #3
0
 public EntryComponentTemplate(Type componentType, Entry_Components holder)
 {
     _holder = holder;
     InitializeTemplate(componentType);
 }
Beispiel #4
0
 //constructors--------------------------------------------------------------------------------
 public void Initialize(Entry_Components holder, string componentName = "Field Name")
 {
     _holder = holder;
     Initialize(componentName);
 }