Beispiel #1
0
        private void layGraphicSelection(int index)
        {
            Dictionary <int, StSelection> selection = mItems[index].Selections;
            List <UserControl>            list      = new List <UserControl>();

            GRAPH_SIZE size = mTest.GetTestAttribute().SelectionSize;

            for (int i = 0; i < selection.Count; i++)
            {
                CompGraph cg = new CompGraph(size, ref mExtractor);

                int resID = mItems[index].Selections[i].ResID;

                cg.SetGraph(resID);
                cg.SetText(mItems[index].Selections[i].Casual);

                mMainWindow.amCanvas.Children.Add(cg);

                list.Add(cg);
            }

            placeComGraphSelections(CompGraph.GetVarSize(size) + 10, list);

            mMainWindow.amCanvas.Height = mVerTaken + CompGraph.GetVarSize(size) + 150;
            mSelGrp.Set(list);
        }
Beispiel #2
0
        private void layGraphicCasual(int index)
        {
            GRAPH_SIZE size = mTest.GetTestAttribute().CasualSize;
            CompGraph  cg   = new CompGraph(size, ref mExtractor);

            int resID = mItems[index].ResID;

            cg.SetGraph(resID);
            cg.SetText(mItems[index].Casual);

            mMainWindow.amCanvas.Children.Add(cg);
            Canvas.SetTop(cg, 0);
            Canvas.SetLeft(cg, (mMainWindow.Width - cg.Width) / 2);

            mVerTaken += (int)cg.Height + CASUAL_ITEM_GAP;
        }