private void addResults(ScrollableContainer SC)
        {
            criteriaResultLabelMap = new OrderedDictionary();
            var catHeader = CreateFixedLabel("Kategorien", 0, 0, 0, 0, 5, null, "headerresultsscrollbar");
            SC.AddElementToTheEndAndAdoptTheSize(catHeader as XControl, "categorie_HEADER", h1_leftMargin,5,SC.Width-190,20);
            SetProperty(catHeader, "FontHeight", h1_fontHieght);
            SetProperty(catHeader, "FontWeight", h1_fontWeight);
            SetProperty(catHeader, "MultiLine", true);
            //util.Debug.GetAllProperties(catHeader);
            var critHeader = CreateFixedLabel("Kriterien erfüllt", 0, 0, 0, 0, 5, null, "header_criterion");
            SC.AddElement(critHeader as XControl, "criterion_Header", SC.Width - 175, 10,100, 15);
            SetProperty(critHeader, "FontHeight", h2_fontHieght);
            SetProperty(critHeader, "FontWeight", h1_fontWeight);
                int caCount = 0;
                foreach (Category ca in getCategoriesFromMap())
                {
                    
                    /********************************************
                     * 
                     *          ScrollableContainer Test
                     * 
                     * ******************************************/


                 



                        var catLable = CreateFixedLabel(++caCount + ". " +ca.Name,  0, 0, 0, 0, 5, null, ca.Id + "result");
                        //SetProperty(introduction, "Tag", s.ToString()); //TODO: add the tag for the introduction
                        SetProperty(catLable, "FontHeight", h2_fontHieght);
                        SetProperty(catLable, "FontWeight", h2_fontWeight);
                        //SetProperty(catLable, "HelpText", ca.Id + "result");
                        SetProperty(catLable, "MultiLine", true);


                        //TODO: function to leave the with as ist was set
                        var placesControll = SC.AddElementToTheEndAndAdoptTheSize(catLable as XControl, "criterion_LABEL", h1_leftMargin, 7, SC.Width-190);





                        /********************************************************/
                        /*              PROGRESS BAR TEST                       */
                        /********************************************************/

                        Rectangle pos = new Rectangle(0, 0, 150, 15);
                        if (placesControll != null && placesControll is XWindow2)
                        {
                            Rectangle lablePos = ((XWindow2)placesControll).getPosSize();

                            pos.Y = lablePos.Y;
                            pos.X = SC.Width - pos.Width - 30;
                        }



                        var rating = ProgressBarControll.CreateProgressBar("pb", 0, 0, 0, 0, ca.Criteria.Count, ca.CountPassCategories(), false);

                        var ratingLabel = CreateFixedLabel(ca.CountPassCategories() + "/" + ca.Criteria.Count, 0, 0, 0, 0, 0, null);
                        
                        //util.OoUtils.SetProperty(rating, "ProgressValue", 2);


                        //util.OoUtils.SetProperty(rating, "FillColor", OoUtils.getColor(100, 0, 0));
                        //util.OoUtils.SetProperty(rating, "BackgroundColor", OoUtils.getColor(0, 100, 0));
                        //util.OoUtils.SetProperty(rating, "BorderColor", OoUtils.getColor(0, 0, 100));

                        //util.Debug.GetAllProperties(rating);

                        var placedRating = SC.AddElement(rating as XControl, OoUtils.GetStringProperty(rating, "Name"), pos.X, pos.Y, pos.Width, pos.Height);
                        OoUtils.SetBooleanProperty(placedRating, "EnableVisible", true);

                        var placedRatingLabel = SC.AddElement(ratingLabel as XControl, OoUtils.GetStringProperty(ratingLabel, "Name"), SC.Width - 20 - 3, pos.Y, 20, 15);
                        if (placedRating != null && placedRating is XWindow2)
                        {
                            ((XWindow2)placedRating).setPosSize(pos.X, pos.Y, pos.Width, pos.Height, PosSize.POSSIZE);
                        }
                        bool failLabeExsist = false;
                        bool warningLabelExsist = false;
                        int crCount = 1;
                        Dictionary<int, Criterion> warning = new Dictionary<int,Criterion>();
                        foreach (Criterion cr in ca.Criteria)
                        {

                            if (cr.Res.resultType == ResultType.fail)
                            {
                                if (failLabeExsist == false)
                                {
                                    var failLabel = CreateFixedLabel("Nicht erfüllte Kriterien:", 0, 0, 0, 0, 5, null,"");
                                    SetProperty(failLabel, "FontHeight", 12);
                                    SetProperty(failLabel, "FontWeight", 150);
                                    SetProperty(failLabel, "FontSlant", FontSlant.ITALIC);
                                    SetProperty(failLabel, "FontUnderline", FontUnderline.SINGLE);
                                    SC.AddElementToTheEndAndAdoptTheSize(failLabel as XControl, "", h3_leftMargin+3, 2);
                                    failLabeExsist = true;
                                }
                                var crLabel = CreateFixedLabel("- " + caCount + "." + crCount + ". " + cr.Name + " (Priorität:" + cr.Priority + ")", 0, 0, 0, 0, 5, this, "result" +cr.Id);

                                SetProperty(crLabel, "MultiLine", true);
                                var l = SC.AddElementToTheEndAndAdoptTheSize(crLabel as XControl, "result"+cr.Id, h4_lefMargin+10, 5);
                                criteriaResultLabelMap.Add(cr.Id,l);
                                SetProperty(crLabel, "HelpText", "result" + cr.Id);
                                SetProperty(crLabel, "HelpURL", "10");
                               
                             

                            }
                            if (cr.Res.resultType == ResultType.passwithwarning)
                            {
                                warning.Add(crCount, cr);
                            }
                          


                            /********************************************************/
                            /*              PROGRESS BAR TEST   END                 */
                            /********************************************************/
                            
                            
                            crCount++;
                        }
                        foreach (KeyValuePair<int, Criterion> entry in warning) 
                        {
                            if (warningLabelExsist == false) 
                            {
                                var failLabel2 = CreateFixedLabel("Verbesserungswürdige Kriterien:", 0, 0, 0, 0, 5, null,"");
                                    SetProperty(failLabel2, "FontHeight", 12);
                                    SetProperty(failLabel2, "FontWeight", 150);
                                    SetProperty(failLabel2, "FontSlant", FontSlant.ITALIC);
                                    SetProperty(failLabel2, "FontUnderline", FontUnderline.SINGLE);
                                    SC.AddElementToTheEndAndAdoptTheSize(failLabel2 as XControl, "", h3_leftMargin, 5);
                                    warningLabelExsist = true;
                            }
                            var crLabel = CreateFixedLabel("- "+caCount + "." + entry.Key + ". " + entry.Value.Name  + " (Priorität:" + entry.Value.Priority + ")", 0, 0, 0, 0, 5, this, "result"+ entry.Value);

                            SetProperty(crLabel, "MultiLine", true);
                            var l =  SC.AddElementToTheEndAndAdoptTheSize(crLabel as XControl,"result"+ entry.Value.Id, h4_lefMargin+5, 5);
                            SetProperty(crLabel, "HelpText", "result"+entry.Value.Id);
                            SetProperty(crLabel, "HelpURL",   "10");
                            criteriaResultLabelMap.Add(entry.Value.Id,l);
                        }
                       
                        



                        //if (ca.resultType == ResultType.pass)
                        //{
                        //    var catLable = CreateFixedLabel(++caCount + ". " + ca.Name, 0, 0, 0, 0, 5, null, ca.Id + "result");
                        //    //SetProperty(introduction, "Tag", s.ToString()); //TODO: add the tag for the introduction
                        //    SetProperty(catLable, "FontHeight", h2_fontHieght);
                        //    SetProperty(catLable, "FontWeight", h2_fontWeight);
                        //    //SetProperty(catLable, "HelpText", ca.Id + "result");
                        //    SetProperty(catLable, "MultiLine", true);

                        //    SC.addElementToTheEndAndAdoptTheSize(catLable as XControl, "criterion_LABEL", h1_leftMargin, 7);
                        //}

                        ////util.Debug.GetAllProperties(catLable);
                        ////var progressbar = InsertProgressBar(0,0,100,ca.Criteria.Count,ca.Id+"progressbar");
                        ////SC.addElementAndAdoptTheSize(progressbar as XControl, "progressBar", 100, 100);
                        //if (ca.resultType == ResultType.fail)
                        //{
                        //    var catLable2 = CreateFixedLabel(++caCount + ". " + ca.Name, 0, 0, 0, 0, 5, null, ca.Id + "result");
                        //    //SetProperty(introduction, "Tag", s.ToString()); //TODO: add the tag for the introduction
                        //    SetProperty(catLable2, "FontHeight", h2_fontHieght);
                        //    SetProperty(catLable2, "FontWeight", h2_fontWeight);
                        //    //SetProperty(catLable2, "HelpText", ca.Id + "result");
                        //    SetProperty(catLable2, "MultiLine", true);

                        //    SC.addElementToTheEndAndAdoptTheSize(catLable2 as XControl, "criterion_LABEL", h1_leftMargin, 7);
                        //    bool failLabelexsist = false;
                        //    bool warningLabel = false;
                        //    int crCount = 1;
                        //    foreach (Criterion cr in ca.Criteria)
                        //    {

                        //        if (cr.Res.resultType == ResultType.fail)
                        //        {
                        //            if (failLabelexsist == false)
                        //            {
                        //                var failLabel = CreateFixedLabel("Nicht erfüllte Kriterien", 0, 0, 0, 0, 5, null, cr.Id + "result");
                        //                SetProperty(failLabel, "FontHeight", 10);
                        //                SetProperty(failLabel, "FontWeight", 1000);
                        //                SC.addElementToTheEndAndAdoptTheSize(failLabel as XControl, "", h3_leftMargin, 5);
                        //                failLabelexsist = true;
                        //            }
                        //            var crLabel = CreateFixedLabel(caCount + "." + crCount + ". " + cr.Name + " (Priorität:" + cr.Priority + ")", 0, 0, 0, 0, 5, this, cr.Id+"result");

                        //            SetProperty(crLabel, "MultiLine", true);
                        //            SC.addElementToTheEndAndAdoptTheSize(crLabel as XControl, "", h4_lefMargin, 5);
                        //            SetProperty(crLabel, "HelpText", cr.Id);


                        //        }

                        //        if (cr.Res.resultType == ResultType.passwithwarning)
                        //        {

                        //        }
                        //        crCount++;
                        //    }


                        //}

                    }
                
            }
        private void addFailTestPoints(ScrollableContainer SC, Criterion cr)
        {
            if (cr.Rec.Type == CriterionType.all || cr.Rec.Type == CriterionType.count||cr.Rec.Type==CriterionType.one)
            {
                for (int i = 0; i < cr.Res.Rating.Count; i++)
                {
                    if (cr.Res.Rating[i] == 0)
                    {
                        var testPoint = CreateFixedLabel("-" + cr.Rec.Items[i].Desc + cr.Rec.Items[i].VarText, 0, 0, 0, 0, 10, null, "item" + i);
                        SetProperty(testPoint, "MultiLine", true);
                        var l = SC.AddElementToTheEndAndAdoptTheSize(testPoint as XControl, "item" + i, 5, 5);

                        testPointsMap.Add("item" + i, l);
                    }

                }
            }
            if (cr.Rec.Type == CriterionType.rating)
            {
                
                        var testPoint = CreateFixedLabel("-" + cr.Rec.Items[0].Desc + cr.Rec.Items[0].VarText+" (Ratingergebnis "+cr.Res.ratingerg* 100+"%)", 0, 0, 0, 0, 10, null, "item" + 0);
                        SetProperty(testPoint, "MultiLine", true);
                        var l = SC.AddElementToTheEndAndAdoptTheSize(testPoint as XControl, "item" + 0, 5, 5);

                        testPointsMap.Add("item" + 0, l);
                    

                }
            
            }
 private void addCommentarLabel(ScrollableContainer SC,String commentar)
 {
     if (commentResult != null) { 
         commentResult.dispose();
     }
         var commentResultLabel = CreateFixedLabel(commentar,0,0,0,0,20,null,"comment");
         SetProperty(commentResultLabel, "MultiLine", true);
         commentResult = SC.AddElementToTheEndAndAdoptTheSize(commentResultLabel as XControl, "comment", 5, 5,350);
     
 }