// public ToDoListToDoView(AbsViewController ctrl) : base(ctrl) // { // Init(); // } public void Init() { todoListInputView = new ToDoListInputView(AddAction); todoListItemsLayout = new VerticalLayout(); new SpaceView(4).AddTo(this); todoListInputView.AddTo(this); new SpaceView(4).AddTo(this); todoListItemsLayout.AddTo(new ScrollLayout().AddTo(this)); }
public ToDoListProductFoldoutDetailView(ToDoListProductDetailView _productDetailView , ToDoProduct _todoProduct, ToDoProductVersion _productVersion) : base("box") { productDetailView = _productDetailView; todoProduct = _todoProduct; productVersion = _productVersion; HorizontalLayout horView = new HorizontalLayout(); new FlexibleSpaceView().AddTo(horView); stateBoxView = new BoxView(String.Empty).Height(20).AddTo(horView); new ImageButtonView(ImageButtonIcon.editorIcon, OpenVersionDetailWindow).BackgroundColor(Color.black).Width(30).Height(20).AddTo(horView); new ImageButtonView(ImageButtonIcon.deleteIcon, DeleteItem).BackgroundColor(Color.red).Width(30).Height(20).AddTo(horView); foldoutView = new FoldoutView(false, productVersion.name + " "+ productVersion.version, horView) .FontBold().FontSize(15).MarginLeft(30).TextMiddleLeft().AddTo(this); var input = new ToDoListInputView(AddFoldoutItem); input.Show(); foldoutView.AddFoldoutView(input); RefreshStateWithView(); foreach (var todoItem in productVersion.todos) { AddToDoToFoldoutView(todoItem); } }