예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MetaEditor"/> class.
        /// </summary>
        /// <param name="ifp">The ifp.</param>
        /// <param name="split">The split.</param>
        /// <param name="mapx">The mapx.</param>
        /// <remarks></remarks>
        public MetaEditor(IFPIO ifp, SplitContainer split, Map mapx)
        {
            map = mapx;

            ReflexiveContainer tempr = new ReflexiveContainer("Header");
            MakeControls(0, ifp.items, ref tempr);
            Controls = tempr;
            DrawControls(ref split);
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MetaEditor"/> class.
        /// </summary>
        /// <param name="ifp">The ifp.</param>
        /// <param name="split">The split.</param>
        /// <param name="mapx">The mapx.</param>
        /// <remarks></remarks>
        public MetaEditor(IFPIO ifp, SplitContainer split, Map mapx)
        {
            map = mapx;

            ReflexiveContainer tempr = new ReflexiveContainer("Header");

            MakeControls(0, ifp.items, ref tempr);
            Controls = tempr;
            DrawControls(ref split);
        }
예제 #3
0
        /// <summary>
        /// The draw controls recursive.
        /// </summary>
        /// <param name="s">The s.</param>
        /// <param name="reflex">The reflex.</param>
        /// <remarks></remarks>
        private void DrawControlsRecursive(ref SplitContainer s, ref ReflexiveContainer reflex)
        {
            foreach (object o in reflex.Controls)
            {
                PluginControl tempbase = (PluginControl)o;
                bool          nospacer = true;
                switch (tempbase.type)
                {
                case ContainerType.Reflexive:
                    ReflexiveContainer r = (ReflexiveContainer)tempbase;

                    DrawControlsRecursive(ref r.Container, ref r);
                    reflex.height += 25;

                    s.Panel2.Controls.Add(r.Container);
                    s.Panel2.Controls[s.Panel2.Controls.Count - 1].BringToFront();
                    s.Panel2.Controls[s.Panel2.Controls.Count - 1].Update();
                    break;

                case ContainerType.Ident:
                    IdentContainer id = (IdentContainer)tempbase;
                    s.Panel2.Controls.Add(id.panel);
                    reflex.height += id.panel.Height;
                    s.Panel2.Controls[s.Panel2.Controls.Count - 1].BringToFront();
                    s.Panel2.Controls[s.Panel2.Controls.Count - 1].Update();
                    break;

                case ContainerType.Int32:
                    Int32Container int32 = (Int32Container)tempbase;
                    s.Panel2.Controls.Add(int32.panel);
                    reflex.height += int32.panel.Height;
                    s.Panel2.Controls[s.Panel2.Controls.Count - 1].BringToFront();
                    s.Panel2.Controls[s.Panel2.Controls.Count - 1].Update();
                    break;

                default:
                    nospacer = true;
                    break;
                }

                if (nospacer)
                {
                    continue;
                }

                Panel Spacerx = new Panel();
                Spacerx.Height    = 10;
                Spacerx.BackColor = Color.Transparent;
                Spacerx.Dock      = DockStyle.Top;
                s.Panel2.Controls.Add(Spacerx);
                s.Panel2.Controls[s.Panel2.Controls.Count - 1].BringToFront();
                s.Panel2.Controls[s.Panel2.Controls.Count - 1].Update();
                reflex.height += 10;
            }
        }
예제 #4
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;
                }
            }
        }
예제 #5
0
        /// <summary>
        /// The draw controls recursive.
        /// </summary>
        /// <param name="s">The s.</param>
        /// <param name="reflex">The reflex.</param>
        /// <remarks></remarks>
        private void DrawControlsRecursive(ref SplitContainer s, ref ReflexiveContainer reflex)
        {
            foreach (object o in reflex.Controls)
            {
                PluginControl tempbase = (PluginControl)o;
                bool nospacer = true;
                switch (tempbase.type)
                {
                    case ContainerType.Reflexive:
                        ReflexiveContainer r = (ReflexiveContainer)tempbase;

                        DrawControlsRecursive(ref r.Container, ref r);
                        reflex.height += 25;

                        s.Panel2.Controls.Add(r.Container);
                        s.Panel2.Controls[s.Panel2.Controls.Count - 1].BringToFront();
                        s.Panel2.Controls[s.Panel2.Controls.Count - 1].Update();
                        break;
                    case ContainerType.Ident:
                        IdentContainer id = (IdentContainer)tempbase;
                        s.Panel2.Controls.Add(id.panel);
                        reflex.height += id.panel.Height;
                        s.Panel2.Controls[s.Panel2.Controls.Count - 1].BringToFront();
                        s.Panel2.Controls[s.Panel2.Controls.Count - 1].Update();
                        break;
                    case ContainerType.Int32:
                        Int32Container int32 = (Int32Container)tempbase;
                        s.Panel2.Controls.Add(int32.panel);
                        reflex.height += int32.panel.Height;
                        s.Panel2.Controls[s.Panel2.Controls.Count - 1].BringToFront();
                        s.Panel2.Controls[s.Panel2.Controls.Count - 1].Update();
                        break;
                    default:
                        nospacer = true;
                        break;
                }

                if (nospacer)
                {
                    continue;
                }

                Panel Spacerx = new Panel();
                Spacerx.Height = 10;
                Spacerx.BackColor = Color.Transparent;
                Spacerx.Dock = DockStyle.Top;
                s.Panel2.Controls.Add(Spacerx);
                s.Panel2.Controls[s.Panel2.Controls.Count - 1].BringToFront();
                s.Panel2.Controls[s.Panel2.Controls.Count - 1].Update();
                reflex.height += 10;
            }
        }
예제 #6
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;
                }
            }
        }