Esempio n. 1
0
        public CheckMultiBox
            (
            System.Windows.Forms.Control parentpal,
            string[] values,
            string group,
            bool single,
            float celldesc,
            float cellfit,
            int lineint,
            int lineflo,
            int descsize,
            System.Drawing.Size cellsize,
            System.Drawing.Size allsize,
            System.Drawing.Point point,
            System.Drawing.Font font,
            System.Drawing.Color pabgcolor,
            System.Drawing.Color linecolor,
            System.Drawing.Color foreColor,
            System.Drawing.Color fodecolor,
            System.Windows.Forms.AnchorStyles anchorstyle
            )
        {
            Size = allsize;
            Location = point;
            Anchor = anchorstyle;
            CheckValue = new System.Collections.Generic.List<string>();
            if (!single)
            {
                CheckValue.Add(values[0]);
            }

            new HDarge
                (
                this,
                group,
                font,
                new System.Drawing.Size(descsize, allsize.Height),
                new System.Drawing.Point(0, 0),
                pabgcolor,
                foreColor,
                Helper.Align,
                anchorstyle
                );
            var checkMultiPal = new LPanel
                (
                this,
                lineint,
                new System.Drawing.Size(allsize.Width - descsize, allsize.Height),
                new System.Drawing.Point(descsize, 0),
                linecolor,
                fodecolor,
                anchorstyle
                );
            var flyPal = new LFlyPal
                (
                checkMultiPal,
                new System.Drawing.Size(checkMultiPal.Width - 10, allsize.Height),
                new System.Drawing.Point(10, lineflo)
                );
            foreach (var value in values)
            {
                if (single)
                {
                    new CheckSingleBox
                        (
                        flyPal,
                        value,
                        false,
                        true,
                        group,
                        celldesc,
                        1,
                        cellsize,
                        new System.Drawing.Point(0, 0),
                        new System.Drawing.Font(Helper.FontSegoe, cellfit),
                        foreColor,
                        fodecolor,
                        Helper.AnchorTopRight
                        );
                }
                else
                {
                    if (value == values[0])
                    {
                        new CheckSingleBox
                            (
                            flyPal,
                            value,
                            true,
                            false,
                            group,
                            celldesc,
                            1,
                            cellsize,
                            new System.Drawing.Point(0, 0),
                            new System.Drawing.Font(Helper.FontSegoe, cellfit),
                            foreColor,
                            fodecolor,
                            Helper.AnchorTopRight
                            );
                    }
                    else
                    {
                        new CheckSingleBox
                            (
                            flyPal,
                            value,
                            false,
                            false,
                            group,
                            celldesc,
                            1,
                            cellsize,
                            new System.Drawing.Point(0, 0),
                            new System.Drawing.Font(Helper.FontSegoe, cellfit),
                            foreColor,
                            fodecolor,
                            Helper.AnchorTopRight
                            );
                    }
                }
            }
            parentpal.Controls.Add(this);
        }
Esempio n. 2
0
        public InputBoxWithDesc
            (
            System.Windows.Forms.Control parentpal,
            int lineint,
            int lineflo,
            string predesc,
            string preword,
            System.Drawing.Font descfont,
            System.Drawing.Size descsize,
            System.Drawing.Font font,
            System.Drawing.Size size,
            System.Drawing.Point point,
            System.Drawing.Color defrcolor,
            System.Drawing.Color debkcolor,
            System.Drawing.Color linecolor,
            System.Drawing.Color linelight,
            System.Drawing.Color backcolor,
            System.Drawing.Color backlight,
            System.Drawing.Color forecolor,
            System.Drawing.Color forelight,
            System.Windows.Forms.AnchorStyles anchorstyle
            )
        {
            Linecolor = linecolor;
            Linelight = linelight;
            Backcolor = backcolor;
            Backlight = backlight;
            Forecolor = forecolor;
            Forelight = forelight;

            var inputdesc = new HDarge
                (
                parentpal,
                predesc,
                descfont,
                descsize,
                point,
                defrcolor,
                debkcolor,
                Helper.Align,
                anchorstyle
                );

            var inputPal = new LPanel
                (
                parentpal,
                lineint,
                size,
                new System.Drawing.Point(inputdesc.Location.X + inputdesc.Width, inputdesc.Location.Y),
                Linecolor,
                Backcolor,
                anchorstyle
                );

            Text = preword.ToSafeValue();
            Multiline = true;
            Size = new System.Drawing.Size(inputPal.Size.Width - 8*lineint, inputPal.Size.Height - 4*lineint);
            Location = new System.Drawing.Point(4*lineint, (4 + lineflo)*lineint);
            BackColor = Backcolor;
            ForeColor = Forecolor;
            Font = font;
            Anchor = anchorstyle;

            Leave += LInput_Leave;
            Enter += LInput_Enter;

            inputPal.Controls.Add(this);
        }