Example #1
0
        private void VolumeTrackBar_ValueChanged(object sender, EventArgs e)
        {
            MetroTrackBar item = (MetroTrackBar)sender;

            playerControl.playerControl.SetVolume(item.Value);
            Functions.Volume = item.Value;
        }
        private void InitializeComponent()
        {
            m_rgbPicker               = new RGBPickerControl();
            m_rgbPicker.Top           = Height;
            m_rgbPicker.Width         = DEFAULT_HEIGHT;
            m_rgbPicker.Height        = DEFAULT_HEIGHT;
            m_rgbPicker.Anchor        = AnchorStyles.Top | AnchorStyles.Left;
            m_rgbPicker.Click        += new EventHandler(m_rgbPicker_Click);
            m_rgbPicker.ColorChanged += new RGBPickerControl.ColorChangedDelegate(m_rgbPicker_ColorChanged);
            Controls.Add(m_rgbPicker);

            m_aTextBox = new MetroTextBox();
            MetroSkinManager.ApplyMetroStyle(m_aTextBox);
            m_aTextBox.Top          = Height + (m_rgbPicker.Height / 2) - (m_aTextBox.Height / 2);
            m_aTextBox.Left         = m_rgbPicker.Right + 5;
            m_aTextBox.Width        = 40;
            m_aTextBox.Anchor       = AnchorStyles.Top | AnchorStyles.Left;
            m_aTextBox.TextChanged += new EventHandler(m_aTextBox_TextChanged);
            Controls.Add(m_aTextBox);

            m_aTrack = new MetroTrackBar();
            MetroSkinManager.ApplyMetroStyle(m_aTrack);
            m_aTrack.Top           = Height;
            m_aTrack.Left          = m_aTextBox.Right;
            m_aTrack.Width         = Width - m_aTextBox.Right;
            m_aTrack.Height        = m_rgbPicker.Height;
            m_aTrack.Anchor        = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
            m_aTrack.Maximum       = 255;
            m_aTrack.ValueChanged += new EventHandler(m_aTrack_ValueChanged);
            Controls.Add(m_aTrack);

            Height += m_rgbPicker.Height;
        }
Example #3
0
 public TrackBarSync(MetroTrackBar mytrackbar, Control assistant)
 {
     _trackbars  = new List <MetroTrackBar>();
     _mytrackbar = mytrackbar;
     _mytrackbar.ValueChanged += _mytrackbar_ValueChanged;
     _assistant = assistant;
 }
Example #4
0
 // Fov changer
 public static void Fov(CheckBox check, MetroTrackBar slider)
 {
     while (check.Checked)
     {
         Memory.Write(Player.LocalPlayer + Offsets.m_iFOV, slider.Value);
         Thread.Sleep(10);
     }
 }
Example #5
0
        // Pattern

        private void speedTrackBar_Scroll(object sender, ScrollEventArgs e)
        {
            MetroTrackBar senderTrackBar = (MetroTrackBar)sender;

            if (senderTrackBar.Value != presetSpeedTrackBar.Value)
            {
            }
            light.speed(senderTrackBar.Value * 2);
            onChange();
        }
Example #6
0
 public WeightController(
     WeightTextBoxController oew,
     WeightTextBoxController payload,
     WeightTextBoxController zfw,
     MetroTrackBar payloadTrackBar)
 {
     this.oew             = oew;
     this.payload         = payload;
     this.zfw             = zfw;
     this.payloadTrackBar = payloadTrackBar;
     _enabled             = false;
     _monitorWeightChange = false;
 }
Example #7
0
 // Anti flash
 public static void AntiFlash(CheckBox check, MetroTrackBar delayBar)
 {
     while (check.Checked)
     {
         int flashDur = 0;
         flashDur = Memory.Read <int>(Player.LocalPlayer + Offsets.m_flFlashDuration);
         if (flashDur != 0)
         {
             Thread.Sleep(delayBar.Value);
             Memory.Write(Player.LocalPlayer + Offsets.m_flFlashDuration, 0);
         }
         Thread.Sleep(10);
     }
 }
Example #8
0
        private void ValueChange(object sender, EventArgs e)
        {
            MetroTrackBar NewTrackBar = sender as MetroTrackBar;

            switch (NewTrackBar.Name)
            {
            case "FirstColor":
                Program.bootstate.BezierFirstColor = NewTrackBar.Value;
                break;

            case "SecondColor":
                Program.bootstate.BezierSecondColor = NewTrackBar.Value;
                break;

            case "LinkSize":
                Program.bootstate.BezierLinkSize = NewTrackBar.Value / 20;
                break;
            }
            this.ShowBezier.Invalidate();
        }
Example #9
0
 void MoveToHome(MetroTrackBar metroTrackBar, MetroToggle metroToggle, TextBox textBox)
 {
     timer1.Interval = 1;
     if (z >= 0 && movimentoNeg == false && metroToggle.Checked == false) // movimento negativo rapido
     {
         metroTrackBar.Value = z;
         textBox.Text        = z.ToString();
         z--;
     }
     if (z >= 0 && movimentoNeg == false && metroToggle.Checked == true && velocidade != 0) // movimento negativo lento
     {
         timer1.Interval     = n;
         metroTrackBar.Value = z;
         textBox.Text        = z.ToString();
         z--;
         n++;
         velocidade--;
         if (velocidade == 0)
         {
             movimentoNeg = true;
         }
     }
     if (z >= 0 && movimentoNeg == true && metroToggle.Checked == true && velocidade == 0) //
     {
         timer1.Interval     = 100;
         metroTrackBar.Value = z;
         textBox.Text        = z.ToString();
         z++;
     }
     if (z >= 0 && movimentoNeg == true && metroToggle.Checked == false) //
     {
         timer1.Stop();
         velocidade = 100;
         n          = 10; // valor de intervalo
         caseSwitch++;
         Repeat();
     }
 }
Example #10
0
        /// <summary>
        /// Initializes the component.
        /// </summary>
        private void InitializeComponent(bool fillMode)
        {
            // Some fill must initialize before begin
            _colorTable = new[]
            {
                Color.FromArgb(0xff, 0, 0), Color.FromArgb(0xff, 0x80, 0x17),
                Color.FromArgb(0xff, 0xf7, 0x0), Color.FromArgb(0, 0xe8, 0),
                Color.FromArgb(0x19, 0x77, 0xff), Color.FromArgb(0xfc, 0x0c, 0x59),
                Color.FromArgb(0xff, 0xff, 0xff), Color.FromArgb(0, 0, 0)
            };

            _isBasic = true;

            _mpnMain = new MultiPanel();
            // Basic initialize
            _pgeBasic           = new MultiPanelPage();
            _tlpBasic           = new TableLayoutPanel();
            _llbSwitchAdvance   = new LinkLabel();
            _tlpBasicColorTable = new TableLayoutPanel();

            _csbColor = new ColorSelectorButton[8];

            _tlpBasicSizeBar = new TableLayoutPanel();
            _tkbBasicSize    = new MetroTrackBar();
            _lbBasicSize     = new Label();
            _btnNoFillBasic  = new MetroButton();
            // Advance initialize
            _pgeAdvance         = new MultiPanelPage();
            _tlpAdvance         = new TableLayoutPanel();
            _llbSwitchBasic     = new LinkLabel();
            _tlpColorSelector   = new TableLayoutPanel();
            _clrWheel           = new ColorWheel();
            _colorEditor        = new ColorEditor();
            _colorEditorManager = new ColorEditorManager();
            _cbxPenStyle        = new ComboBox();
            _tlpAdvanceSizeBar  = new TableLayoutPanel();
            _tkbAdvanceSize     = new MetroTrackBar();
            _txtSize            = new TextBox();
            _btnNoFillAdvance   = new MetroButton();

            _mpnMain.SuspendLayout();
            // Basic suspend layout
            _pgeBasic.SuspendLayout();
            _tlpBasic.SuspendLayout();
            _tlpBasicColorTable.SuspendLayout();
            if (!fillMode)
            {
                _tlpBasicSizeBar.SuspendLayout();
            }
            // Advance suspend layout
            _pgeAdvance.SuspendLayout();
            _tlpAdvance.SuspendLayout();
            _tlpColorSelector.SuspendLayout();

            if (!fillMode)
            {
                _tlpAdvanceSizeBar.SuspendLayout();
            }

            SuspendLayout();
            //
            // mpnMain
            //
            _mpnMain.BackColor = Color.Transparent;
            _mpnMain.Controls.Add(_pgeBasic);
            _mpnMain.Controls.Add(_pgeAdvance);
            _mpnMain.Dock         = DockStyle.Fill;
            _mpnMain.Location     = new Point(0, 0);
            _mpnMain.Margin       = new Padding(3, 4, 3, 4);
            _mpnMain.Name         = "_mpnMain";
            _mpnMain.SelectedPage = _pgeBasic;
            _mpnMain.Size         = new Size(210, 198);
            _mpnMain.TabIndex     = 0;
            //
            // pgeBasic
            //
            _pgeBasic.BackColor = Color.Transparent;
            _pgeBasic.Controls.Add(_tlpBasic);
            _pgeBasic.Dock     = DockStyle.Fill;
            _pgeBasic.Location = new Point(0, 0);
            _pgeBasic.Margin   = new Padding(3, 4, 3, 4);
            _pgeBasic.Name     = "_pgeBasic";
            _pgeBasic.Size     = new Size(210, 198);
            _pgeBasic.TabIndex = 0;
            _pgeBasic.Text     = @"Basic";
            //
            // tlpBasic
            //
            _tlpBasic.BackColor   = Color.Transparent;
            _tlpBasic.ColumnCount = 1;
            _tlpBasic.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
            _tlpBasic.Controls.Add(_llbSwitchAdvance, 0, 0);
            _tlpBasic.Controls.Add(_tlpBasicColorTable, 0, 1);
            if (fillMode)
            {
                _tlpBasic.Controls.Add(_btnNoFillBasic, 0, 2);
            }
            else
            {
                _tlpBasic.Controls.Add(_tlpBasicSizeBar, 0, 2);
            }
            _tlpBasic.Dock     = DockStyle.Fill;
            _tlpBasic.Location = new Point(0, 0);
            _tlpBasic.Margin   = new Padding(3, 4, 3, 4);
            _tlpBasic.Name     = "_tlpBasic";
            _tlpBasic.RowCount = 3;
            _tlpBasic.RowStyles.Add(new RowStyle());
            _tlpBasic.RowStyles.Add(new RowStyle(SizeType.Absolute, 120F));
            _tlpBasic.RowStyles.Add(new RowStyle(SizeType.Absolute, 26F));
            _tlpBasic.Size     = new Size(210, 198);
            _tlpBasic.TabIndex = 0;
            //
            // llbSwitchAdvance
            //
            _llbSwitchAdvance.LinkColor = Color.FromArgb(1, 123, 205);
            _llbSwitchAdvance.Location  = new Point(3, 0);
            _llbSwitchAdvance.Name      = @"_llbSwitchAdvance";
            _llbSwitchAdvance.Size      = new Size(204, 24);
            _llbSwitchAdvance.TabIndex  = 0;
            _llbSwitchAdvance.TabStop   = true;
            _llbSwitchAdvance.Text      = @"Advance";
            _llbSwitchAdvance.TextAlign = ContentAlignment.MiddleCenter;
            _llbSwitchAdvance.Click    += _llbSwitchAdvance_Click;
            //
            // tlpBasicColorTable
            //
            _tlpBasicColorTable.ColumnCount = 4;
            _tlpBasicColorTable.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
            _tlpBasicColorTable.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
            _tlpBasicColorTable.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
            _tlpBasicColorTable.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
            _tlpBasicColorTable.Dock     = DockStyle.Fill;
            _tlpBasicColorTable.Location = new Point(10, 34);
            _tlpBasicColorTable.Margin   = new Padding(10);
            _tlpBasicColorTable.Name     = "_tlpBasicColorTable";
            _tlpBasicColorTable.RowCount = 2;
            _tlpBasicColorTable.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
            _tlpBasicColorTable.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
            _tlpBasicColorTable.Size     = new Size(190, 100);
            _tlpBasicColorTable.TabIndex = 1;


            for (int i = 0; i < 2; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    //
                    // colorSelectorButton
                    //
                    int id = i * 4 + j;

                    _csbColor[id] = new ColorSelectorButton
                    {
                        BackColor = _colorTable[id],
                        Dock      = DockStyle.Fill,
                        Location  = new Point(10, 10),
                        Margin    = new Padding(10),
                        Name      = string.Format("csbColor{0}", id),
                        Size      = new Size(27, 30),
                        TabIndex  = id,
                        Text      = string.Format("Color{0}", id),
                        UseVisualStyleBackColor = true,
                    };
                    _csbColor[id].Click += ColorSizeControl_Click;

                    _tlpBasicColorTable.Controls.Add(_csbColor[id], j, i);
                }
            }
            if (fillMode)
            {
                //
                // btnNoFillBasic
                //
                _btnNoFillBasic.BackColor  = Color.White;
                _btnNoFillBasic.Dock       = DockStyle.Fill;
                _btnNoFillBasic.HoverColor = Color.FromArgb(230, 230, 230);
                _btnNoFillBasic.Location   = new Point(15, 230);
                _btnNoFillBasic.Margin     = new Padding(15);
                _btnNoFillBasic.Name       = "_btnNoFillBasic";
                _btnNoFillBasic.PressColor = Color.FromArgb(77, 77, 77);
                _btnNoFillBasic.Size       = new Size(180, 30);
                _btnNoFillBasic.TabIndex   = 4;
                _btnNoFillBasic.Text       = @"No Fill";
                _btnNoFillBasic.UseVisualStyleBackColor = false;
                _btnNoFillBasic.Click += NoFillButton_Click;
            }
            else
            {
                //
                // tlpBasicSizeBar
                //
                _tlpBasicSizeBar.ColumnCount = 2;
                _tlpBasicSizeBar.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
                _tlpBasicSizeBar.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F));
                _tlpBasicSizeBar.Controls.Add(_tkbBasicSize, 0, 0);
                _tlpBasicSizeBar.Controls.Add(_lbBasicSize, 1, 0);
                _tlpBasicSizeBar.Dock     = DockStyle.Fill;
                _tlpBasicSizeBar.Location = new Point(15, 159);
                _tlpBasicSizeBar.Margin   = new Padding(15);
                _tlpBasicSizeBar.Name     = "_tlpBasicSizeBar";
                _tlpBasicSizeBar.RowCount = 1;
                _tlpBasicSizeBar.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
                _tlpBasicSizeBar.Size     = new Size(180, 24);
                _tlpBasicSizeBar.TabIndex = 2;
                //
                // tkbSize
                //
                _tkbBasicSize.Dock     = DockStyle.Fill;
                _tkbBasicSize.Location = new Point(3, 3);
                _tkbBasicSize.Name     = @"_tkbBasicSize";
                _tkbBasicSize.Size     = new Size(124, 18);
                _tkbBasicSize.TabIndex = 0;
                _tkbBasicSize.Text     = @"metroTrackBar1";
                // synchronize trackbar mutualy
                var synTrkBasic = new TrackBarSync(_tkbBasicSize, _lbBasicSize);
                synTrkBasic.Add(_tkbAdvanceSize);
                synTrkBasic.ValueChanged += synTrackBar_ValueChanged;

                _tkbBasicSize.Value = (int)_selectedWidth;

                //
                // lbSize
                //
                _lbBasicSize.Dock      = DockStyle.Fill;
                _lbBasicSize.Location  = new Point(133, 0);
                _lbBasicSize.Name      = @"_lbBasicSize";
                _lbBasicSize.Size      = new Size(44, 24);
                _lbBasicSize.TabIndex  = 1;
                _lbBasicSize.Text      = ConvertWidthToString(_selectedWidth);
                _lbBasicSize.TextAlign = ContentAlignment.MiddleCenter;
            }
            //
            // _pgeAdvance
            //
            _pgeAdvance.Controls.Add(_tlpAdvance);
            _pgeAdvance.Dock     = DockStyle.Fill;
            _pgeAdvance.Location = new Point(0, 0);
            _pgeAdvance.Margin   = new Padding(3, 4, 3, 4);
            _pgeAdvance.Name     = "_pgeAdvance";
            _pgeAdvance.Size     = new Size(210, 275 + 26);
            _pgeAdvance.TabIndex = 1;
            _pgeAdvance.Text     = @"_pgeAdvance";
            //
            // _tlpAdvance
            //
            _tlpAdvance.BackColor   = Color.Transparent;
            _tlpAdvance.ColumnCount = 1;
            _tlpAdvance.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
            _tlpAdvance.Controls.Add(_llbSwitchBasic, 0, 0);
            _tlpAdvance.Controls.Add(_tlpColorSelector, 0, 1);
            if (fillMode)
            {
                _tlpAdvance.Controls.Add(_btnNoFillAdvance, 0, 2);
            }
            else
            {
                _tlpAdvance.Controls.Add(_tlpAdvanceSizeBar, 0, 2);
                _tlpAdvance.Controls.Add(_cbxPenStyle, 0, 3);
            }
            _tlpAdvance.Dock     = DockStyle.Fill;
            _tlpAdvance.Location = new Point(0, 0);
            _tlpAdvance.Margin   = new Padding(3, 4, 3, 4);
            _tlpAdvance.Name     = "_tlpAdvance";
            _tlpAdvance.RowCount = 4;
            _tlpAdvance.RowStyles.Add(new RowStyle(SizeType.Absolute, 25F));
            _tlpAdvance.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
            _tlpAdvance.RowStyles.Add(new RowStyle(SizeType.Absolute, 60F));
            if (!fillMode)
            {
                _tlpAdvance.RowStyles.Add(new RowStyle(SizeType.Absolute, 28F));
            }

            _tlpAdvance.Size     = new Size(210, 275 + 26);
            _tlpAdvance.TabIndex = 1;
            //
            // _llbSwitchBasic
            //
            _llbSwitchBasic.Dock      = DockStyle.Fill;
            _llbSwitchBasic.LinkColor = Color.FromArgb(1, 123, 205);
            _llbSwitchBasic.Location  = new Point(3, 0);
            _llbSwitchBasic.Name      = "_llbSwitchBasic";
            _llbSwitchBasic.Size      = new Size(204, 25);
            _llbSwitchBasic.TabIndex  = 0;
            _llbSwitchBasic.TabStop   = true;
            _llbSwitchBasic.Text      = @"Basic";
            _llbSwitchBasic.TextAlign = ContentAlignment.MiddleCenter;
            _llbSwitchBasic.Click    += _llbSwitchBasic_Click;
            //
            // _tlpColorSelector
            //
            _tlpColorSelector.ColumnCount = 1;
            _tlpColorSelector.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
            _tlpColorSelector.Controls.Add(_clrWheel, 0, 0);
            _tlpColorSelector.Controls.Add(_colorEditor, 0, 1);
            _tlpColorSelector.Dock     = DockStyle.Fill;
            _tlpColorSelector.Location = new Point(3, 28);
            _tlpColorSelector.Name     = "_tlpColorSelector";
            _tlpColorSelector.RowCount = 2;
            _tlpColorSelector.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
            _tlpColorSelector.RowStyles.Add(new RowStyle(SizeType.Absolute, 40F));
            _tlpColorSelector.Size     = new Size(204, 184);
            _tlpColorSelector.TabIndex = 3;
            //
            // _clrWheel
            //
            _clrWheel.Color    = _selectedColor;
            _clrWheel.Dock     = DockStyle.Fill;
            _clrWheel.Location = new Point(3, 3);
            _clrWheel.Name     = "_clrWheel";
            _clrWheel.Size     = new Size(198, 138);
            _clrWheel.TabIndex = 0;

            //
            // _colorEditor
            //
            _colorEditor.Color    = _selectedColor;
            _colorEditor.Dock     = DockStyle.Fill;
            _colorEditor.TabIndex = 1;

            //
            // colorEditorManager
            //
            _colorEditorManager.ColorEditor   = _colorEditor;
            _colorEditorManager.ColorWheel    = _clrWheel;
            _colorEditorManager.ColorChanged += ColorEditorManager_ColorChanged;

            if (fillMode)
            {
                //
                // btnNoFillAdvance
                //
                _btnNoFillAdvance.BackColor  = Color.White;
                _btnNoFillAdvance.Dock       = DockStyle.Fill;
                _btnNoFillAdvance.HoverColor = Color.FromArgb(230, 230, 230);
                _btnNoFillAdvance.Location   = new Point(15, 230);
                _btnNoFillAdvance.Margin     = new Padding(15);
                _btnNoFillAdvance.Name       = "_btnNoFillAdvance";
                _btnNoFillAdvance.PressColor = Color.FromArgb(77, 77, 77);
                _btnNoFillAdvance.Size       = new Size(180, 30);
                _btnNoFillAdvance.TabIndex   = 4;
                _btnNoFillAdvance.Text       = @"No Fill";
                _btnNoFillAdvance.UseVisualStyleBackColor = false;
                _btnNoFillAdvance.Click += NoFillButton_Click;
            }
            else
            {
                //
                // _tlpAdvanceSizeBar
                //
                _tlpAdvanceSizeBar.ColumnCount = 2;
                _tlpAdvanceSizeBar.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
                _tlpAdvanceSizeBar.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F));
                _tlpAdvanceSizeBar.Controls.Add(_tkbAdvanceSize, 0, 0);
                _tlpAdvanceSizeBar.Controls.Add(_txtSize, 1, 0);
                _tlpAdvanceSizeBar.Dock     = DockStyle.Fill;
                _tlpAdvanceSizeBar.Location = new Point(15, 230);
                _tlpAdvanceSizeBar.Margin   = new Padding(15);
                _tlpAdvanceSizeBar.Name     = "_tlpAdvanceSizeBar";
                _tlpAdvanceSizeBar.RowCount = 1;
                _tlpAdvanceSizeBar.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
                _tlpAdvanceSizeBar.Size     = new Size(180, 30);
                _tlpAdvanceSizeBar.TabIndex = 2;
                //
                // _tkbAdvanceSize
                //
                _tkbAdvanceSize.Dock     = DockStyle.Fill;
                _tkbAdvanceSize.Location = new Point(3, 3);
                _tkbAdvanceSize.Name     = "_tkbAdvanceSize";
                _tkbAdvanceSize.Size     = new Size(124, 24);
                _tkbAdvanceSize.TabIndex = 0;
                _tkbAdvanceSize.Text     = @"tkbAdvanceSize";
                // synchronize trackbar mutualy
                var synTrkAdvance = new TrackBarSync(_tkbAdvanceSize, _txtSize);
                synTrkAdvance.Add(_tkbBasicSize);
                synTrkAdvance.ValueChanged += synTrackBar_ValueChanged;

                _tkbAdvanceSize.Value = (int)_selectedWidth;

                //
                // _txtSize
                //
                _txtSize.Dock             = DockStyle.Fill;
                _txtSize.Location         = new Point(133, 3);
                _txtSize.Name             = "_txtSize";
                _txtSize.Text             = ConvertWidthToString(_selectedWidth);
                _txtSize.Size             = new Size(44, 25);
                _txtSize.TabIndex         = 1;
                _txtSize.CausesValidation = true;
                _txtSize.Validating      += _txtSize_Validating;
                //
                // _cbxPenStyle
                //
                _cbxPenStyle.Dock = DockStyle.Fill;
                _cbxPenStyle.FormattingEnabled = true;
                _cbxPenStyle.DataSource        = Enum.GetValues(typeof(DashStyle));
                _cbxPenStyle.Location          = new Point(3, 4);
                _cbxPenStyle.Margin            = new Padding(15, 0, 15, 0);
                _cbxPenStyle.Name                  = "_cbxPenStyle";
                _cbxPenStyle.Size                  = new Size(172, 25);
                _cbxPenStyle.TabIndex              = 2;
                _cbxPenStyle.SelectedIndex         = 0;
                _cbxPenStyle.SelectedIndexChanged += PenStyle_SelectedIndexChanged;
            }
            //
            // This Control
            //
            BackColor = Color.White;
            Controls.Add(_mpnMain);
            Font   = new Font("Segoe UI Light", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 0);
            Margin = new Padding(3, 4, 3, 4);
            Name   = "ColorToolControl";
            Size   = new Size(210, 198);
            _mpnMain.ResumeLayout(false);
            // Basic Resume Layout
            _pgeBasic.ResumeLayout(false);
            _tlpBasic.ResumeLayout(false);
            _tlpBasicColorTable.ResumeLayout(false);
            if (!fillMode)
            {
                _tlpBasicSizeBar.ResumeLayout(false);
            }
            // Advance Resume Layout
            _pgeAdvance.ResumeLayout(false);
            _tlpAdvance.ResumeLayout(false);
            _tlpColorSelector.ResumeLayout(false);
            if (!fillMode)
            {
                _tlpAdvanceSizeBar.ResumeLayout(false);
                _tlpAdvanceSizeBar.PerformLayout();
            }
            ResumeLayout(false);
        }
Example #11
0
 public TrackBarSync(MetroTrackBar mytrackbar, Control assistant)
 {
     _trackbars = new List<MetroTrackBar>();
     _mytrackbar = mytrackbar;
     _mytrackbar.ValueChanged += _mytrackbar_ValueChanged;
     _assistant = assistant;
 }
Example #12
0
        // ===Aim===
        // Triggerbot
        public static void Triggerbot(CheckBox check, CheckBox needsScoped, CheckBox shootTeam, MetroTrackBar delay)
        {
            while (check.Checked)
            {
                int address       = Player.LocalPlayer + Offsets.m_iCrosshairId;
                int PlayerInCross = Memory.Read <int>(address);
                int WeaponIndex   = Memory.Read <int>(Player.LocalPlayer + Offsets.m_hActiveWeapon) & 0xFFF;
                int WeapInt       = Memory.Read <int>((Player.BaseClient + Offsets.dwEntityList + WeaponIndex * 0x10) - 0x10);
                int WeaponID      = Memory.Read <int>(WeapInt + Offsets.m_iItemDefinitionIndex);


                if (PlayerInCross > 0 && PlayerInCross < 65)
                {
                    address = Player.BaseClient + Offsets.dwEntityList + (PlayerInCross - 1) * Config.OEntityLoopDistance;
                    int PtrToPIC = Memory.Read <int>(address);

                    address = PtrToPIC + Offsets.m_iHealth;
                    int PICHealth = Memory.Read <int>(address);

                    address = PtrToPIC + Offsets.m_iTeamNum;
                    int PICTeam = Memory.Read <int>(address);

                    if (((PICTeam != Player.PlayerTeam) && (PICTeam > 1) && (PICHealth > 0)) || shootTeam.Checked && (PICTeam > 1) && (PICHealth > 0))
                    {
                        if (needsScoped.Checked)
                        {
                            if (WeaponID == 8 || WeaponID == 9 || WeaponID == 11 || WeaponID == 38 || WeaponID == 39 ||
                                WeaponID == 40)
                            {
                                if (Utils.IsScoped())
                                {
                                    Utils.Shoot(Convert.ToInt32(delay.Value));
                                }
                            }
                            else
                            {
                                Utils.Shoot(Convert.ToInt32(delay.Value));
                            }
                        }
                        else
                        {
                            Utils.Shoot(Convert.ToInt32(delay.Value));
                        }
                    }
                }
                Thread.Sleep(10);
            }
        }
        private void updateInpSignal_bar(object sender, EventArgs e)
        {
            MetroTrackBar senderBar = sender as MetroTrackBar;

            inSig.init(tagClicked, mBar.Value, fBar.Value, sBar.Value);
        }
        private void bar_MouseHover(object sender, EventArgs e)
        {
            MetroTrackBar senderBar = sender as MetroTrackBar;

            metroToolTip1.SetToolTip(senderBar, senderBar.Value.ToString());
        }
 public MetroTrackBarActionList(IComponent component) : base(component)
 {
     _metroTrackBar = (MetroTrackBar)component;
 }
Example #16
0
 public void Add(MetroTrackBar trackbar)
 {
     _trackbars.Add(trackbar);
 }
Example #17
0
        // Chams
        public static void Chams(CheckBox check, MetroTrackBar rfs, MetroTrackBar gfs, MetroTrackBar bfs, MetroTrackBar res, MetroTrackBar ges, MetroTrackBar bes, MetroTrackBar brightnes)
        {
            while (check.Checked)
            {
                for (int i = 0; i < 64; i++)
                {
                    int entity     = Memory.Read <int>(Player.BaseClient + Offsets.dwEntityList + i * 0x10);
                    int entityTeam = Memory.Read <int>(entity + Offsets.m_iTeamNum);

                    if (Player.PlayerTeam == entityTeam)
                    {
                        //Model Color
                        Memory.Write(entity + 0x70, (byte)rfs.Value); // r
                        Memory.Write(entity + 0x71, (byte)gfs.Value); // g
                        Memory.Write(entity + 0x72, (byte)bfs.Value); // b
                    }
                    else
                    {
                        //Model Color
                        Memory.Write(entity + 0x70, (byte)res.Value); // r
                        Memory.Write(entity + 0x71, (byte)ges.Value); // g
                        Memory.Write(entity + 0x72, (byte)bes.Value); // b
                    }
                    // https://www.unknowncheats.me/forum/counterstrike-global-offensive/305257-clrrender-brightness-external-chams.html
                }
                float brightness = (float)brightnes.Value;
                int   thisPtr    = (int)(Player.EngineBase + Offsets.model_ambient_min - 0x2c);

                byte[] bytearray     = BitConverter.GetBytes(brightness);
                int    intbrightness = BitConverter.ToInt32(bytearray, 0);
                int    xored         = intbrightness ^ thisPtr;

                Memory.Write(Player.EngineBase + Offsets.model_ambient_min, xored);

                Thread.Sleep(10);
            }

            if (check.Checked == false)
            {
                for (int i = 0; i < 64; i++)
                {
                    int entity     = Memory.Read <int>(Player.BaseClient + Offsets.dwEntityList + i * 0x10);
                    int entityTeam = Memory.Read <int>(entity + Offsets.m_iTeamNum);

                    if (Player.PlayerTeam == entityTeam)
                    {
                        //Model Color
                        Memory.Write(entity + 0x70, (byte)255); // r
                        Memory.Write(entity + 0x71, (byte)255); // g
                        Memory.Write(entity + 0x72, (byte)255); // b
                    }
                    else
                    {
                        //Model Color
                        Memory.Write(entity + 0x70, (byte)255); // r
                        Memory.Write(entity + 0x71, (byte)255); // g
                        Memory.Write(entity + 0x72, (byte)255); // b
                    }
                    // https://www.unknowncheats.me/forum/counterstrike-global-offensive/305257-clrrender-brightness-external-chams.html
                }

                float brightness = (float)0;
                int   thisPtr    = (int)(Player.EngineBase + Offsets.model_ambient_min - 0x2c);

                byte[] bytearray     = BitConverter.GetBytes(brightness);
                int    intbrightness = BitConverter.ToInt32(bytearray, 0);
                int    xored         = intbrightness ^ thisPtr;

                Memory.Write(Player.EngineBase + Offsets.model_ambient_min, xored);
            }
        }