Esempio n. 1
0
        public TLabel()
            : base()
        {
            ctl = new SolidBrush(Color.Fuchsia);
            pen = new Pen(new SolidBrush(SystemColors.ControlDark));
            Color ca = SystemColors.ControlLightLight;
            Color cb = SystemColors.Control;

            try
            {
                grb = Color.FromArgb(
                    cb.R + (ca.R - cb.R) / 3,
                    cb.G + (ca.G - cb.G) / 3,
                    cb.B + (ca.B - cb.B) / 3);
                grb = cb;
                gra = Color.FromArgb(
                    grb.R + (ca.R - cb.R) / 2,
                    grb.G + (ca.G - cb.G) / 2,
                    grb.B + (ca.B - cb.B) / 2);
            }
            catch
            {
                gra = ca;
                grb = cb;
            }
            ShadeBack = false;

            Skinner.add(this);
        }
Esempio n. 2
0
        public UC_Troggle()
        {
            bLoad = bSave = null;
            InitializeComponent();
            init();
            Resize       += UC_Troggle_Resize;
            pb.MouseDown += new MouseEventHandler(pb_MouseDown);

            Skinner.add(this);
        }
Esempio n. 3
0
        public Graden()
            : base()
        {
            co              = 1;
            Direction       = false;
            colorA          = SystemColors.Control;
            colorB          = SystemColors.ControlLight;
            renderedOpacity = 1;
            ca              = _ca = colorA;
            cb              = _cb = colorB;

            Skinner.add(this);
        }
Esempio n. 4
0
        public Verter()
        {
            InitializeComponent();
            _enabled      = true;
            _boost        = 1;
            _boostLock    = -1;
            defaultFG     = gLabel.ForeColor;
            defaultBG     = gLabel.BackColor;
            w8fuckOn      = new Padding(0, 4, 0, 0);
            w8fuckOff     = new Padding(1, 5, 1, 0);
            giSlider.Font = new Font(giSlider.Font.FontFamily, giSlider.Font.Size * 2);

            Skinner.add(this);
        }
Esempio n. 5
0
        public Pritch()
        {
            pre  = null;
            Text = "asdf";
            InitializeComponent();
            this.Resize += UC_Pritch_Resize;
            pre          = null;

            pad        = 8;
            pH.Height  = pV.Width = 5;
            bH.Visible = bV.Visible = false;

            magic();

            Skinner.add(this);
        }
        public Verter()
        {
            InitializeComponent();
            _enabled      = true;
            _boost        = 1;
            defaultFG     = gLabel.ForeColor;
            defaultBG     = gLabel.BackColor;
            w8fuckOn      = new Padding(0, 4, 0, 0);
            w8fuckOff     = new Padding(1, 5, 1, 0);
            giSlider.Font = new Font(giSlider.Font.FontFamily, giSlider.Font.Size * 2);

            graden1.MouseDown += slider_MouseDown;
            graden1.MouseMove += slider_MouseMove;
            graden1.MouseUp   += slider_MouseUp;
            graden2.MouseDown += slider_MouseDown;
            graden2.MouseMove += slider_MouseMove;
            graden2.MouseUp   += slider_MouseUp;

            Skinner.add(this);
        }
Esempio n. 7
0
        //int debounce;

        public LLabel()
            : base()
        {
            //debounce = 0;
            src    = null;
            tinval = null;
            agrad1 = SystemColors.ScrollBar;
            agrad2 = SystemColors.ScrollBar;
            //olevel = LicenseManager.UsageMode == LicenseUsageMode.Designtime ? 1 : 0;
            olevel = 0;
            applyGradient();
            //applyLevel();

            //bg = Bitmap.FromFile(@"C:\Users\ed\Documents\Visual Studio 2012\Projects\Loopstream\Loopstream\res\volbar.png");
            bg    = new Bitmap(16, 16);
            sha   = new Bitmap(96, 96);
            w     = bg.Width;
            h     = bg.Height;
            dark  = new Pen(new SolidBrush(SystemColors.ControlDark));
            light = new Pen(new SolidBrush(SystemColors.ControlLightLight));
            Color ca = SystemColors.ControlLight;
            Color cb = SystemColors.ControlLightLight;
            Color one, two;

            try
            {
                one = Color.FromArgb(
                    ca.R + (cb.R - ca.R) / 3,
                    ca.G + (cb.G - ca.G) / 3,
                    ca.B + (cb.B - ca.B) / 3);
                two = Color.FromArgb(
                    one.R + (cb.R - ca.R) / 3,
                    one.G + (cb.G - ca.G) / 3,
                    one.B + (cb.B - ca.B) / 3);
            }
            catch
            {
                // TODO: Check order
                one = ca;
                two = cb;
            }
            one = Color.FromArgb(64,
                                 SystemColors.ControlDark.R,
                                 SystemColors.ControlDark.G,
                                 SystemColors.ControlDark.B);
            two = Color.FromArgb(64,
                                 SystemColors.ControlLightLight.R,
                                 SystemColors.ControlLightLight.G,
                                 SystemColors.ControlLightLight.B);

            lightF = SystemColors.ControlLightLight;
            light0 = Color.FromArgb(0,
                                    lightF.R,
                                    lightF.G,
                                    lightF.B);

            using (Graphics g = Graphics.FromImage(bg))
            {
                g.FillRectangle(new SolidBrush(one), 0, 0, w, h);
                Pen pen = new Pen(new SolidBrush(two));
                for (int a = -16; a < w; a++)
                {
                    if (a > -8 && a < 0 || a > 8)
                    {
                        continue;
                    }
                    g.DrawLine(pen, new Point(a, 16), new Point(a + 16, 0));
                }
            }
            Image bbg = new Bitmap(bg.Width * 6, bg.Height * 6);

            using (Graphics g = Graphics.FromImage(bbg))
            {
                for (int x = 0; x < bbg.Width; x += w)
                {
                    for (int y = 0; y < bbg.Height; y += h)
                    {
                        g.DrawImageUnscaled(bg, x, y);
                    }
                }
            }
            bg.Dispose();
            bg = bbg;
            w  = bg.Width;
            h  = bg.Height;

            using (Graphics g = Graphics.FromImage(sha))
            {
                int zh = sha.Height;
                for (int y = 0; y < zh; y++)
                {
                    int    ih   = zh - y;
                    double opac = ih * 1.0 / zh;
                    opac = 0.9 * opac * opac;
                    g.DrawLine(new Pen(Color.FromArgb(
                                           (int)(opac * 255), lightF.R, lightF.G, lightF.B)),
                               0, y, sha.Width, y);
                }
            }

            Skinner.add(this);
        }