public static ToDoListCategorySubWindow CreateCategorySubWindow(ToDoListCategoryListView listView,
                                                                 string name = "ToDoListCategorySubWindow")
 {
     //close 会自动destroy  所以都要重新new
     categorySubWindow = ToDoListCategorySubWindow.Open(listView, name);
     return(categorySubWindow);
 }
        public static ToDoListCategorySubWindow Open(ToDoListCategoryListView listView,
                                                     string name = "ToDoListCategorySubWindow")
        {
            var window = Open <ToDoListCategorySubWindow>(name);

            window.listView = listView;
            return(window);
        }
        protected override void SetUpView()
        {
            eventKey = GetHashCode();

            todoListNoteView         = new ToDoListNoteView(this);
            todoListView             = new ToDoListView(this);
            todoListCategoryListView = new ToDoListCategoryListView(this);
            todoListProductView      = new ToDoListProductView(this);

            todoListToolBarView = new ToolBarView {
                style = "box"
            }.FontSize(15).Height(40);
            AddView(todoListToolBarView);

            // todoListToolBarView
            //  .AddMenu("笔记", () => ChangePage(todoListNoteView.eventKey))
            //  .AddMenu("清单", () => ChangePage(todoListView.eventKey))
            //  .AddMenu("隐藏", () => ChangePage(todoListHideView.eventKey))
            //  .AddMenu("分类管理", () => ChangePage(todoListCategoryListView.eventKey))
            //  .AddMenu("已完成", () => ChangePage(todoListFinishedView.eventKey))
            //  .AddMenu("产品", () => ChangePage(todoListProductView.eventKey));
            // views.Add(todoListNoteView);
            // views.Add(todoListView);
            // views.Add(todoListHideView);
            // views.Add(todoListCategoryListView);
            // views.Add(todoListFinishedView);
            // views.Add(todoListProductView);

            AddMenu(todoListToolBarView,
                    ("笔记", todoListNoteView),
                    ("清单", todoListView),
                    ("分类管理", todoListCategoryListView),
                    ("产品", todoListProductView)
                    );


            todoListToolBarView.ForceClick(1);
        }