Exemplo n.º 1
0
        async void LoadMenus()
        {
            await MenuKit.LoadMenus();

            _lv.Data    = MenuKit.RootPageMenus;
            _lv.Loaded += OnLoaded;
        }
Exemplo n.º 2
0
        async void OnReset(object sender, Mi e)
        {
            int cntFixed = Kit.Stub.FixedMenus == null ? 0 : Kit.Stub.FixedMenus.Count;

            if (MenuKit.FavMenus.Count > cntFixed)
            {
                var cnt = AtState.Exec($"delete from menufav where userid={Kit.UserID}");
                if (cnt > 0)
                {
                    await MenuKit.LoadMenus();

                    _lv.Data     = MenuKit.RootPageMenus;
                    e.Visibility = Visibility.Collapsed;
                    Kit.Msg("重置常用菜单成功!");
                }
            }
        }