Пример #1
0
        ListItemEditor(EditAction editAction, ListItem listItem, ObservableList <ListContentType> contentTypes, ListContentType contentType)
        {
            this.editAction = editAction;
            ContentTypes    = contentTypes;
            ContentType     = contentType;


            switch (editAction.EditMode)
            {
            case EditMode.Edit:
                Title = string.Format("Edit item {0}", listItem.ID);
                break;

            case EditMode.Copy:
                Title = string.Format("Copy item {0}", listItem.ID);
                break;

            case EditMode.AddItem:
                Title = "Add new item";
                break;

            case EditMode.AddFolder:
                Title = "Add new folder";
                break;
            }

            ListItem          = listItem;
            window.Value.Data = this;
            window.Value.Show();
            disposable = ListItem.Advise(Notify);
        }
 internal ItemValuesDataSource(ListItem listItem, IEnumerable <Field> fields)
 {
     this.listItem = listItem;
     this.fields   = fields;
     if (listItem != null && fields != null)
     {
         disposable = listItem.Advise(Synchronize);
         Synchronize();
     }
 }