Пример #1
0
            /// <summary>
            /// Initializes a new instance of the <see cref="Int32Container"/> class.
            /// </summary>
            /// <param name="intx">The intx.</param>
            /// <remarks></remarks>
            public Int32Container(IFPIO.IFPInt intx)
            {
                type = ContainerType.Int32;
                Label templabel = new Label();

                templabel.BorderStyle = BorderStyle.FixedSingle;
                templabel.BackColor   = Color.Silver;
                templabel.Text        = "Int32 (" + intx.name + ") • Offset: " + intx.offset.ToString("X");
                templabel.TextAlign   = ContentAlignment.MiddleCenter;
                templabel.Dock        = DockStyle.Left;
                templabel.Height      = 20;
                templabel.AutoSize    = true;
                DescriptionLabel      = templabel;

                IntTextBox        = new TextBox();
                IntTextBox.Dock   = DockStyle.Fill;
                IntTextBox.Height = 20;

                // IntTextBox.Text=

                // NameCombo.Dock = DockStyle.Top;
                panel        = new Panel();
                panel.Dock   = DockStyle.Top;
                panel.Height = 40;

                // panel.BorderStyle = BorderStyle.FixedSingle;
                panel.Controls.Add(DescriptionLabel);
                panel.Controls.Add(IntTextBox);
            }
Пример #2
0
        /// <summary>
        /// The make controls.
        /// </summary>
        /// <param name="y">The y.</param>
        /// <param name="ifpobjects">The ifpobjects.</param>
        /// <param name="reflex">The reflex.</param>
        /// <remarks></remarks>
        public void MakeControls(int y, object[] ifpobjects, ref ReflexiveContainer reflex)
        {
            foreach (object o in ifpobjects)
            {
                IFPIO.BaseObject tempbase = (IFPIO.BaseObject)o;

                switch (tempbase.ObjectType)
                {
                case IFPIO.ObjectEnum.Struct:
                    IFPIO.Reflexive r = (IFPIO.Reflexive)tempbase;

                    // if (r.visible == false) { break; }
                    ReflexiveContainer tempr = new ReflexiveContainer(r);
                    MakeControls(0, r.items, ref tempr);
                    reflex.Controls.Add(tempr);

                    break;

                case IFPIO.ObjectEnum.Ident:
                    IFPIO.Ident id = (IFPIO.Ident)tempbase;

                    // if (id.visible == false) { break; }
                    IdentContainer tempid = new IdentContainer(id);
                    reflex.Controls.Add(tempid);
                    break;

                case IFPIO.ObjectEnum.Int:
                    IFPIO.IFPInt int32 = (IFPIO.IFPInt)tempbase;

                    // if (int32.visible == false) { break; }
                    Int32Container tempint = new Int32Container(int32);
                    reflex.Controls.Add(tempint);
                    break;
                }
            }
        }