Exemplo n.º 1
0
 private void M_GlobalHook_MouseWheel(object sender, MouseEventArgs e)
 {
     if (flowLayoutPanel1.Controls.Count <= 0)
     {
         return;
     }
     if (_focusControl != null)
     {
         SliderControl_MouseWheel(_focusControl, e);
     }
     else
     {
         _focusControl = (BunifuSlider)flowLayoutPanel1.Controls[0];
     }
 }
Exemplo n.º 2
0
 private void InitializeComponent()
 {
     this.SliderGQ          = new BunifuSlider();
     this.Label1            = new Label();
     this.LblGraphicQuality = new Label();
     this.LblLODAndBuff     = new Label();
     base.SuspendLayout();
     this.SliderGQ.BackColor         = Color.Transparent;
     this.SliderGQ.BackgroudColor    = Color.DarkGray;
     this.SliderGQ.BorderRadius      = 0;
     this.SliderGQ.IndicatorColor    = Color.SeaGreen;
     this.SliderGQ.Location          = new Point(170, 18);
     this.SliderGQ.MaximumValue      = 400;
     this.SliderGQ.Name              = "SliderGQ";
     this.SliderGQ.Size              = new System.Drawing.Size(380, 30);
     this.SliderGQ.TabIndex          = 0;
     this.SliderGQ.Value             = 100;
     this.Label1.AutoSize            = true;
     this.Label1.Font                = new System.Drawing.Font("Microsoft Sans Serif", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
     this.Label1.Location            = new Point(8, 20);
     this.Label1.Name                = "Label1";
     this.Label1.Size                = new System.Drawing.Size(117, 20);
     this.Label1.TabIndex            = 1;
     this.Label1.Text                = "Graphic Quality";
     this.LblGraphicQuality.AutoSize = true;
     this.LblGraphicQuality.Location = new Point(131, 25);
     this.LblGraphicQuality.Name     = "LblGraphicQuality";
     this.LblGraphicQuality.Size     = new System.Drawing.Size(33, 13);
     this.LblGraphicQuality.TabIndex = 2;
     this.LblGraphicQuality.Text     = "100%";
     this.LblLODAndBuff.AutoSize     = true;
     this.LblLODAndBuff.Location     = new Point(12, 40);
     this.LblLODAndBuff.Name         = "LblLODAndBuff";
     this.LblLODAndBuff.Size         = new System.Drawing.Size(144, 13);
     this.LblLODAndBuff.TabIndex     = 2;
     this.LblLODAndBuff.Text         = "LOD Bias -0.8  Buffer Ratio 1";
     base.AutoScaleDimensions        = new SizeF(6f, 13f);
     base.AutoScaleMode              = System.Windows.Forms.AutoScaleMode.Font;
     base.ClientSize = new System.Drawing.Size(555, 523);
     base.Controls.Add(this.LblLODAndBuff);
     base.Controls.Add(this.LblGraphicQuality);
     base.Controls.Add(this.Label1);
     base.Controls.Add(this.SliderGQ);
     base.Name = "FrmSettings";
     this.Text = "Settings";
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Exemplo n.º 3
0
        public Form1()
        {
            InitializeComponent();
            monitorCount = _brightnessControl.GetMonitors();
            var screen = Screen.PrimaryScreen.WorkingArea;
            var h      = 0;

            lastValues    = new int[monitorCount];
            newValues     = new int[monitorCount];
            valuesChanged = new bool[monitorCount];
            for (var i = 0; i < monitorCount; i++)
            {
                var brightnessInfo = _brightnessControl.GetBrightnessCapabilities(i);
                lastValues[i] = brightnessInfo.current;
                newValues[i]  = brightnessInfo.current;
                var sliderControl = new BunifuSlider
                {
                    Name           = $"slider{i}",
                    Tag            = i,
                    IndicatorColor = Color.FromArgb(255, 26, 177, 136),
                    Size           = new Size(313, 30),
                    BorderRadius   = 3,
                    Value          = brightnessInfo.current,
                    MaximumValue   = brightnessInfo.maximum
                };
                sliderControl.MouseEnter   += SliderControl_MouseEnter;
                sliderControl.ValueChanged += SliderControl_ValueChanged;
                flowLayoutPanel1.Controls.Add(sliderControl);
                h += 25;
            }
            Size = new Size(this.Size.Width, this.Size.Height + h);
            var newLocation = new Point(screen.Width - this.Size.Width, screen.Height - this.Size.Height);

            Location = newLocation;
            flowLayoutPanel1.Select();

            Subscribe(Hook.GlobalEvents());
        }
Exemplo n.º 4
0
 private void SliderControl_MouseEnter(object sender, EventArgs e)
 {
     _focusControl = (BunifuSlider)sender;
 }