private void updateOffsetInformation() { int offsetsCountSet = 0, bonesCountSet = 0; List <Offset> offsets = OffsetList.List; List <Bone> bones = BoneList.List; foreach (Offset offset in offsets) { if (offset.GetValue() > 0) { offsetsCountSet++; } } foreach (Bone bone in bones) { if (bone.GetValue() > 0) { bonesCountSet++; } } lblOffsetsSet.Text = offsetsCountSet + "/" + offsets.Count; lblBonesSet.Text = bonesCountSet + "/" + bones.Count; OffsetList.RefreshOffsets(lbOffsets); BoneList.RefreshBones(lbBones); }
private void btnChangeValue_Click(object sender, EventArgs e) { try { int value = Convert.ToInt32(txtValue.Text); bone.SetValue(value); BoneList.RefreshBones(listBox); Hide(); MessageBox.Show("Bone value changed!\n" + bone.GetName() + " is now equal to " + value.ToString() + ".", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Information); Close(); } catch (System.FormatException) { MessageBox.Show("Invalid decimal value detected.\nThat couldn't be converted to an integer.", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } catch (Exception ex) { MessageBox.Show("An error has occurred while converting value.\n" + ex.Message, "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } }
private void btnSaveChanges_Click(object sender, EventArgs e) { int valid = 0; string boneData = txtBones.Text; foreach (Bone bone in bones) { Regex regex = new Regex(bone.GetName() + ":.*"); Match m = regex.Match(boneData); if (!m.Success) { goto bone_not_found; } string data = m.Value.Split(':').GetValue(1).ToString(); data = data.Trim(); if (data.Length < 1) { goto bone_not_found; } try { int value = Convert.ToInt32(data); bone.SetValue(value); valid++; continue; } catch (System.FormatException) { goto bone_error_converting; } catch (Exception) { goto bone_error_unknown; } bone_not_found: MessageBox.Show("An error has occurred while finding " + bone.GetName() + ".", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning); continue; bone_error_converting: MessageBox.Show("An error has occurred while converting " + bone.GetName() + ".", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning); continue; bone_error_unknown: MessageBox.Show("An unknown error has occurred while parsing data from " + bone.GetName() + ".", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Warning); continue; } BoneList.RefreshBones(listBox); Hide(); MessageBox.Show(valid + "/" + bones.Count + " bones were parsed and replaced successfully.", "Dynago", MessageBoxButtons.OK, MessageBoxIcon.Information); Close(); }
public Main() { InitializeComponent(); this.LockSize(); txtLog.MouseDown += (s, e) => FormMethod.HideCaret(txtLog.Handle); Text = Text.Replace("[0.0]", Program.currentVersion); // Custom.NET vertical tab control using default components. // I might've been able to do this better... pTabMain = new PanelTabControl(PanelTabType.VerticalAttatched); pTabMain.AddTab(new PanelTab(tabValues, lblValues, pnlValues)); pTabMain.AddTab(new PanelTab(tabAimbot, lblAimbot, pnlAimbot)); pTabMain.AddTab(new PanelTab(tabTriggerbot, lblTriggerbot, pnlTriggerbot)); pTabMain.AddTab(new PanelTab(tabVisuals, lblVisuals, pnlVisuals)); pTabMain.AddTab(new PanelTab(tabMisc, lblMisc, pnlMisc)); pTabMain.AddTab(new PanelTab(tabCompile, lblCompile, pnlCompile)); pTabMain.SelectTab(0); pTabValues = new PanelTabControl(PanelTabType.VerticalAttatched); pTabValues.AddTab(new PanelTab(tabOffsets, lblOffsets, pnlOffsets)); pTabValues.AddTab(new PanelTab(tabBones, lblBones, pnlBones)); pTabValues.AddTab(new PanelTab(tabValShare, lblValShare, pnlValShare)); pTabValues.TabChanged += (s, e) => updateOffsetInformation(); pTabValues.SelectTab(0); pTabMisc = new PanelTabControl(PanelTabType.ButtonBased, pTabMain); pTabMisc.AddTab(new PanelTab(tabFeatures, lblFeatures, pnlFeatures)); pTabMisc.AddTab(new PanelTab(tabConfig, lblConfig, pnlConfig)); pTabMisc.AddTab(new PanelTab(tabAccount, lblAccount, pnlAccount)); pTabMisc.SelectTab(0); cmb_config_source.SelectedIndex = 0; cmb_scrape_offsets.SelectedIndex = 0; cmb_scrape_bones.SelectedIndex = 0; cmb_aimbot_bone.SelectedIndex = 0; cmb_obfuscation_preset.SelectedIndex = 0; cmb_aimbot_type.SelectedIndex = 0; cmb_triggerbot_type.SelectedIndex = 0; cmb_trigger_magnet_bone.SelectedIndex = 0; txt_build_path.Text = "dynago.exe"; OffsetList.Initialize(); OffsetList.RefreshOffsets(lbOffsets); BoneList.Initialize(); BoneList.RefreshBones(lbBones); KeyManagement.InitializeKeys(); CheckForIllegalCrossThreadCalls = false; if (Program.currentUser.ToLower() != "justin") { cb_obfuscation_enabled.Required(); } lblCustomizeTriggerMagnetic.OnHover(Color.White); lblBackToTrigger.OnHover(Color.White); // account stuff lblLoggedIn.Text = Program.currentUser; lblAdvertisements.Text = "Removed"; lblAdvertisements.ForeColor = Color.Green; lblLoggedIn.Left = lblPreLoggedIn.Right; lblAdvertisements.Left = lblPreAdvertisements.Right; lblRemoveAds.OnHover(Color.FromArgb(51, 153, 255)); lblRemoveAds.Left = lblAdvertisements.Right; lblRemoveAds.Visible = false; // weapon config stuff (yikes?) general_settings = new WeaponSettings(this); pistol_settings = new WeaponSettings(this); sniper_settings = new WeaponSettings(this); }