Example #1
0
        public MainWindow()
        {
            InitializeComponent();
            InitializeNotificationBar();
            var page = new Dashboard();

            WindowMgr.CreateTabPage("欢迎页", "欢迎页", true, page);
            WindowMgr.RenderContextMenu();
        }
        public void CallCreateUserTabPage()
        {
            var tab  = WindowMgr.CreateTabPage("创建新用户", "创建新用户", false);
            var form = CallCreateUserControl((u) =>
            {
                WindowMgr.SendNotification("用户创建成功", NotificationLevel.Information);
                WindowMgr.CloseTabPage(tab);
            });

            tab.Content = form;
        }
        public void CallAddProductPage()
        {
            var dbcontext = new WarehouseContext();
            var tab       = WindowMgr.CreateTabPage("添加产品信息", "添加产品信息", false);
            var form      = CallAddProductControl(null, dbcontext, (u) =>
            {
                WindowMgr.SendNotification("添加产品信息成功", NotificationLevel.Information);
                WindowMgr.CloseTabPage(tab);
                dbcontext.Dispose();
            });

            tab.Content = form;
        }
        public void OpenManageUsersTabPage()
        {
            var usermgmtctl = new ManageUsers();

            WindowMgr.CreateTabPage("管理用户", "管理用户", true, usermgmtctl);
        }