コード例 #1
0
        private void setPartyCustomActions(bool isgroup, string groupId)
        {
            userService.GetAllUserActionTypes((res, exp) => appController.BeginInvokeOnDispatcher(() =>
            {
                HideBusyIndicator();
                if (exp == null)
                {
                    res.ForEach(c =>
                    {
                        UserActions.Add((int)c, true);
                    });


                    PrivilegeList.Where(all => UserActions.Where(c => c.Value).Select(c => c.Key).Contains((int)all.ActionType))
                    .ToList().ForEach(p => p.IsGrant = true);

                    PrivilegeList.Where(all => UserActions.Where(c => !c.Value).Select(c => c.Key).Contains((int)all.ActionType))
                    .ToList().ForEach(p => p.IsGrant = false);
                }
                else
                {
                    appController.HandleException(exp);
                }
            }), Party.PartyName, isgroup, groupId);

            //PrivilegeList.Where(all => Party.CustomActions.Where(c => c.Value).Select(c => c.Key).Contains(all.ActionType.Id))
            //     .ToList().ForEach(p => p.IsGrant = true);

            // PrivilegeList.Where(all => Party.CustomActions.Where(c => !c.Value).Select(c => c.Key).Contains(all.ActionType.Id))
            //     .ToList().ForEach(p => p.IsDeny = true);
        }
コード例 #2
0
        public void AddNewAction()
        {
            QuickMediaSorterProjectBatch batch = new QuickMediaSorterProjectBatch();

            QuickMediaSorterProject.BatchList.Add(batch);
            ActionViewModel actvm = new ActionViewModel(batch, _qms.Path);

            UserActions.Add(actvm);
            actvm.OpenEditInNewWindow();
        }