Ejemplo n.º 1
0
        public void AddObject(Prototype obj)
        {
            for (int loop1 = 0; loop1 < styles.Count; loop1++)
                if (styles[loop1].prototype.Name == obj.Name)
                {
                    InitStyles(obj,styles[loop1]);
                    return;
                }

            StylesList te = new StylesList(this,obj,styles.Count==0 ? Top : styles[styles.Count-1].Top);
            InitStyles(obj, te);

            styles.Add(te);
        }
Ejemplo n.º 2
0
        public StylesList(Conveer conv,Prototype proto,int top=0)
        {
            tipok.IsBalloon = true;
            owner = conv;
            prototype = proto;

            currtop = top;

            onoff = new CheckBox();
            onoff.ThreeState = true;
            onoff.Checked = false;
            Name = prototype.Name;
            onoff.Text=Name;
            onoff.Left = 5;
            onoff.Top = top + 5;
            onoff.AutoSize = false;
            onoff.Width = owner.objectscontainer.Width - 20;
            onoff.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
            onoff.BackColor = System.Drawing.Color.LightBlue;

            currtop += 10 + onoff.Height;

            owner.objectscontainer.Controls.Add(onoff);
        }
Ejemplo n.º 3
0
        void InitStyles(Prototype pt, StylesList sl)
        {
            Style[] st = pt.InitStyles();

            for (int loop1 = 0; loop1 < st.Length; loop1++)
                if (sl.GetPos(st[loop1].name) == -1)
                    sl.Add(st[loop1]);
        }