Esempio n. 1
0
        public static SquareList createSquareList(SquareList simpleList)
        {
            SquareList newList = new SquareList();
            for (int i = simpleList.Count() - 1; i >= 0; i--)
            {
                Square cat = simpleList.Get(i);

                Square square = new Square(SurfaceWindow1.treeArea * cat.Ratio, cat.Name);
                square.setBackGround(cat.BackGroundColor);
                if (cat.TextColor == null)
                    square.setTextColor(Colors.Black);
                else
                    square.setTextColor(cat.TextColor);
                square.Ratio = cat.Ratio;
                if (cat.SubFile != null && !cat.SubFile.Equals(""))
                {
                    square.SubFile = cat.SubFile;
                }
                if (cat.Explanation != null && !cat.Explanation.Equals(""))
                {
                    square.Explanation = cat.Explanation;
                }

                if (cat.VideoString != null && !cat.VideoString.Equals(""))
                {
                    square.VideoString = cat.VideoString;
                }
                if(cat.ImageString !=null && !cat.ImageString.Equals("")){
                    square.ImageString = cat.ImageString;
                }
                newList.Add(square);
            }
            return newList;
        }
Esempio n. 2
0
 public StartMenu(SquareList list)
     : base(list)
 {
     children = list;
     baseAngle = 2 * Math.PI / (list.Count()-1) ;
 }