コード例 #1
0
 //-------------------------------------------------------------------------------------------------------------
 private void InitializeTemplate()
 {
     _template = new EntryComponentTemplate(SelectedType, Holder);
     _template.OnTemplateEditChanged += OnTemplateChanged;
     if (OnEditModeModified != null)
     {
         OnEditModeModified();
     }
 }
コード例 #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()));
 }
コード例 #3
0
    public object Clone()
    {
        EntryComponentTemplate returnVal = new EntryComponentTemplate(this);

        return(returnVal);
    }
コード例 #4
0
 protected override void Initialize(string componentName = "Object field name")
 {
     base.Initialize(componentName);
     _countLimiter = null;
     _template     = null;
 }