Example #1
0
 // Token: 0x0600033E RID: 830 RVA: 0x00009260 File Offset: 0x00007460
 protected virtual void OnMouseMove(MouseEventArgs e)
 {
     base.OnMouseMove(e);
     if (this.bool_0 && GControl17.smethod_3(e) > -1 && GControl17.smethod_3(e) < GControl17.smethod_1(this) + 1)
     {
         this.Int32_2 = this.int_3 + GControl17.smethod_2((float)(this.int_4 - this.int_3) * ((float)GControl17.smethod_3(e) / (float)GControl17.smethod_1(this)));
     }
 }
Example #2
0
    // Token: 0x06000354 RID: 852 RVA: 0x00009420 File Offset: 0x00007620
    protected virtual void OnPaint(PaintEventArgs e)
    {
        this.method_0();
        Bitmap   bitmap   = GControl17.smethod_11(GControl17.smethod_1(this), GControl17.smethod_10(this));
        Graphics graphics = GControl17.smethod_12(bitmap);

        this.int_0 = GControl17.smethod_1(this) - 1;
        this.int_1 = GControl17.smethod_10(this) - 1;
        Rectangle    rect          = new Rectangle(1, 6, this.int_0 - 2, 8);
        GraphicsPath graphicsPath  = GControl17.smethod_13();
        GraphicsPath graphicsPath2 = GControl17.smethod_13();
        Graphics     graphics2     = graphics;

        GControl17.smethod_14(graphics2, SmoothingMode.HighQuality);
        GControl17.smethod_15(graphics2, PixelOffsetMode.HighQuality);
        GControl17.smethod_16(graphics2, TextRenderingHint.ClearTypeGridFit);
        GControl17.smethod_18(graphics2, GControl17.smethod_17(this));
        this.int_2       = GControl17.smethod_2((float)(this.int_5 - this.int_3) / (float)(this.int_4 - this.int_3) * (float)(this.int_0 - 10));
        this.rectangle_0 = new Rectangle(this.int_2, 0, 10, 20);
        this.rectangle_1 = new Rectangle(this.int_2, 4, 11, 14);
        graphicsPath.AddRectangle(rect);
        graphics2.SetClip(graphicsPath);
        graphics2.FillRectangle(new SolidBrush(this.color_0), new Rectangle(0, 7, this.int_0, 8));
        graphics2.FillRectangle(new SolidBrush(this.color_1), new Rectangle(0, 7, this.rectangle_0.X + this.rectangle_0.Width, 8));
        graphics2.ResetClip();
        HatchBrush brush = new HatchBrush(HatchStyle.Plaid, this.Color_1, this.color_1);

        graphics2.FillRectangle(brush, new Rectangle(-10, 7, this.rectangle_0.X + this.rectangle_0.Width, 8));
        GControl17.GEnum4 genum = this.GEnum4_0;
        if (genum != GControl17.GEnum4.Slider)
        {
            if (genum == GControl17.GEnum4.Knob)
            {
                graphicsPath2.AddEllipse(this.rectangle_1);
                graphics2.FillPath(new SolidBrush(this.color_2), graphicsPath2);
            }
        }
        else
        {
            graphicsPath2.AddRectangle(this.rectangle_0);
            graphics2.FillPath(new SolidBrush(this.color_2), graphicsPath2);
        }
        if (this.Boolean_0)
        {
            graphics2.DrawString(this.Int32_2.ToString(), new Font("Segoe UI", 8f), Brushes.White, new Rectangle(1, 6, this.int_0, this.int_1), new StringFormat
            {
                Alignment     = StringAlignment.Far,
                LineAlignment = StringAlignment.Far
            });
        }
        base.OnPaint(e);
        graphics.Dispose();
        e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        e.Graphics.DrawImageUnscaled(bitmap, 0, 0);
        bitmap.Dispose();
    }
Example #3
0
 // Token: 0x0600033D RID: 829 RVA: 0x000091DC File Offset: 0x000073DC
 protected virtual void OnMouseDown(MouseEventArgs e)
 {
     base.OnMouseDown(e);
     if (GControl17.smethod_0(e) == MouseButtons.Left)
     {
         this.int_2       = GControl17.smethod_2((float)(this.int_5 - this.int_3) / (float)(this.int_4 - this.int_3) * (float)(GControl17.smethod_1(this) - 11));
         this.rectangle_0 = new Rectangle(this.int_2, 0, 10, 20);
         this.bool_0      = this.rectangle_0.Contains(e.Location);
     }
 }