Example #1
0
        public void Initialize()
        {
            panel.Children.Clear();
            commands = new List<ISelectable>(program.Count);

            for (int i=0; i<program.Count; ++i)
            {
                BorderedGraphics bg = new BorderedGraphics(
                    new LabeledGraphics(i.ToString(), new ScalarGraphics(new VapeTeam.Psimulex.Core.Types.String(program[i].ToString()))));
                (bg.Child as LabeledGraphics).LabelWidth = 75;
                bg.Margin = new System.Windows.Thickness(1.0);
                panel.Children.Add(bg);
                commands.Add(bg);
            }
        }
Example #2
0
        protected void CreateElements(AbstractCollection container)
        {
            graphics = new BorderedGraphics[size];

            IEnumerator<VapeTeam.Psimulex.Core.Types.BaseType> it = container.AsEnumerable().GetEnumerator();
            int i = 0;
            while (it.MoveNext())
            {
                BorderedGraphics elem = graphics[i] = new BorderedGraphics(
                    GraphicsElementFactory.Produce(it.Current));

                elem.ParentGraphics = this;

                elem.HorizontalAlignment = HorizontalAlignment.Stretch;
                elem.VerticalAlignment = VerticalAlignment.Stretch;
                elem.InitializeDraw();
                panel.Children.Add(elem);
                ++i;
            }
        }