示例#1
0
        private void Server_GetAvailableAccessListResponse(List <Access> args)
        {
            Dispatcher.Invoke(delegate()
            {
                args = args.Except(ContainElements, new Access.AccessComparer()).Cast <Access>().ToList();

                List <ISelectable> MyAccessList = new List <ISelectable>();
                foreach (Access element in args)
                {
                    MyAccessList.Add(new ContentElementPreview(element));
                }
                MultiselectWorker = new MultiselectWorker(MyAccessList, AccessList);
                MultiselectWorker.SelectedCountChanded += MultiselectWorker_SelectedCountChanded;
            });
        }
示例#2
0
        public TestPage(Test test)
        {
            InitializeComponent();

            Server          = Server.Instance;
            Test            = test;
            TestIsCompleted = true;
            ShowAnswer      = (test.ShowAnswerMode == 1 ? true : false);
            Score           = 0;
            MaxAnswers      = 0;

            CurrentQuestionID = 0;
            NextStepMode      = true;

            MultiselectWorker = new MultiselectWorker(AnswerList);
            LoadQuestion(Test.QuestionPageList[CurrentQuestionID]);
        }
示例#3
0
        private void Server_GetAvailableSubgroupListResponse(List <SubAccess> args)
        {
            Dispatcher.Invoke(delegate()
            {
                List <ISelectable> MySubAccessList = new List <ISelectable>();
                foreach (SubAccess element in args)
                {
                    if (AlreadyContains != null)
                    {
                        if (AlreadyContains.Contains(element, new SubAccess.SubAccessComparer()))
                        {
                            MySubAccessList.Add(new ContentElementPreview(element, true));
                            continue;
                        }
                    }
                    MySubAccessList.Add(new ContentElementPreview(element));
                }
                MultiselectWorker = new MultiselectWorker(MySubAccessList, SubAccessList);
                MultiselectWorker.SelectedCountChanded += MultiselectWorker_SelectedCountChanded;

                MultiselectWorker_SelectedCountChanded(MultiselectWorker.SelectCount);
            });
        }