Exemple #1
0
    protected void CopyFrom (TComponentModel alias)
    {
      if (alias.NotNull ()) {
        SettingsModel.CopyFrom (alias.SettingsModel);

        InfoModel.CopyFrom (alias.InfoModel);
        StatusModel.CopyFrom (alias.StatusModel);
                
        ImageModel.CopyFrom (alias.ImageModel);
        GeometryModel.CopyFrom (alias.GeometryModel);
        LayoutModel.CopyFrom (alias.LayoutModel);
        TextModel.CopyFrom (alias.TextModel);
        NodeModel.CopyFrom (alias.NodeModel);
        ContentModel.CopyFrom (alias.ContentModel);

        NodeModelCollection = new Collection<ExtensionNode> (alias.NodeModelCollection);
        ContentModelCollection = new Collection<ExtensionContent> (alias.ContentModelCollection);
      }
    }
Exemple #2
0
    public void SelectModel (TComponentModel componentModel)
    {
      if (componentModel.NotNull ()) {
        ComponentModel = componentModel;

        Id = ComponentModel.Id;

        ModelAction.SettingsModel.CopyFrom (ComponentModel.SettingsModel);

        ModelAction.ComponentInfoModel.CopyFrom (ComponentModel.InfoModel);
        ModelAction.ComponentStatusModel.CopyFrom (ComponentModel.StatusModel);
        
        ModelAction.ExtensionImageModel.CopyFrom (ComponentModel.ImageModel);
        ModelAction.ExtensionGeometryModel.CopyFrom (ComponentModel.GeometryModel);
        ModelAction.ExtensionLayoutModel.CopyFrom (ComponentModel.LayoutModel);
        ModelAction.ExtensionTextModel.CopyFrom (ComponentModel.TextModel);
        ModelAction.ExtensionNodeModel.CopyFrom (ComponentModel.NodeModel);

        CollectionAction.SetCollection (ComponentModel.NodeModelCollection);
      }
    }