public void loadSimeCastListToCombobox() { List <string> simpleCasteNames = T_SimpleCast.getSimpleCastNames(); T_SimpleCast.bindListToCombobox(comboBox_simplecast, simpleCasteNames); if (simpleCasteNames.Any()) { selectedSimpleCastName = simpleCasteNames[0]; } }
private void Settings_Load(object sender, EventArgs e) { _this = this; Load_Setups(); TabControl_ParagonPoints.BackColor = Color.Transparent; tabControl1.SelectedIndexChanged += TabControl1_SelectedIndexChanged; this.Top = Properties.Settings.Default.D3Helper_MainForm_StartPosition.Y; this.Left = Properties.Settings.Default.D3Helper_MainForm_StartPosition.X; // ----------- this.tb_assignedSkill1.ReadOnly = true; this.tb_assignedSkill2.ReadOnly = true; this.tb_assignedSkill3.ReadOnly = true; this.tb_assignedSkill4.ReadOnly = true; this.tb_assignedSkillRMB.ReadOnly = true; this.tb_assignedSkillLMB.ReadOnly = true; this.tb_assignedParagonPoints1.ReadOnly = true; this.tb_assignedParagonPoints2.ReadOnly = true; this.tb_assignedParagonPoints3.ReadOnly = true; this.tb_assignedParagonPoints4.ReadOnly = true; this.tb_assignedAutoGambleHotkey.ReadOnly = true; this.tb_assignedAutoPick.ReadOnly = true; this.tb_assignedAutoCube_UpgradeRare.ReadOnly = true; this.tb_assignedAutoCube_ConvertMaterial.ReadOnly = true; this.tb_assignedSkill1.KeyDown += tb_assignedSkill1_KeyDown; this.tb_assignedSkill2.KeyDown += tb_assignedSkill2_KeyDown; this.tb_assignedSkill3.KeyDown += tb_assignedSkill3_KeyDown; this.tb_assignedSkill4.KeyDown += tb_assignedSkill4_KeyDown; this.tb_assignedSkillRMB.KeyDown += tb_assignedSkillRMB_KeyDown; this.tb_assignedSkillLMB.KeyDown += tb_assignedSkillLMB_KeyDown; this.tb_assignedParagonPoints1.KeyDown += tb_assignedParagonPoints1_KeyDown; this.tb_assignedParagonPoints2.KeyDown += tb_assignedParagonPoints2_KeyDown; this.tb_assignedParagonPoints3.KeyDown += tb_assignedParagonPoints3_KeyDown; this.tb_assignedParagonPoints4.KeyDown += tb_assignedParagonPoints4_KeyDown; this.tb_assignedAutoGambleHotkey.KeyDown += Tb_assignedAutoGambleHotkey_KeyDown; this.tb_assignedAutoPick.KeyDown += Tb_assignedAutoPick_KeyDown; this.tb_assignedAutoCube_UpgradeRare.KeyDown += Tb_assignedAutoCube_UpgradeRare_KeyDown; this.tb_assignedAutoCube_ConvertMaterial.KeyDown += Tb_assignedAutoCube_ConvertMaterial_KeyDown; this.tb_assignedSkill1.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlot1).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlot1).Modifiers); this.tb_assignedSkill2.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlot2).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlot2).Modifiers); this.tb_assignedSkill3.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlot3).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlot3).Modifiers); this.tb_assignedSkill4.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlot4).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlot4).Modifiers); this.tb_assignedSkillRMB.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlotRmb).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlotRmb).Modifiers); this.tb_assignedSkillLMB.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlotLmb).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeySlotLmb).Modifiers); this.tb_assignedParagonPoints1.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyParagonPoints1).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyParagonPoints1).Modifiers); this.tb_assignedParagonPoints2.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyParagonPoints2).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyParagonPoints2).Modifiers); this.tb_assignedParagonPoints3.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyParagonPoints3).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyParagonPoints3).Modifiers); this.tb_assignedParagonPoints4.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyParagonPoints4).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyParagonPoints4).Modifiers); this.tb_assignedAutoGambleHotkey.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyAutoGamble).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyAutoGamble).Modifiers); this.tb_assignedAutoPick.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyAutoPick).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyAutoPick).Modifiers); this.tb_assignedAutoCube_UpgradeRare.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyAutoCube_UpgradeRare).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyAutoCube_UpgradeRare).Modifiers); this.tb_assignedAutoCube_ConvertMaterial.Text = get_HotkeyText(H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyAutoCube_ConvertMaterial).Key, H_Keyboard.get_HotkeyFromSettingsString(Properties.Settings.Default.HotkeyAutoCube_ConvertMaterial).Modifiers); this.cb_autopotion.Checked = Properties.Settings.Default.AutoPotionBool; this.tb_autopotionhpvalue.Text = Properties.Settings.Default.AutoPotionValue.ToString(); this.cb_fps.Checked = Properties.Settings.Default.overlayfps; this.cb_xptracker.Checked = Properties.Settings.Default.overlayxptracker; this.cb_skillbuttons.Checked = Properties.Settings.Default.overlayskillbuttons; this.cb_riftprogressinrange.Checked = Properties.Settings.Default.overlayriftprogress; this.cb_autogamble.Checked = Properties.Settings.Default.AutoGambleBool; this.CB_ExtendedLogging.Checked = Properties.Settings.Default.Logger_extendedLog; this.cb_skillbuttonsastext.Checked = Properties.Settings.Default.overlayskillbuttonsastext; this.cb_conventionelements.Checked = Properties.Settings.Default.overlayconventiondraws; this.CB_ApsAndSnapShotAPs.Checked = Properties.Settings.Default.Overlay_APS; this.CB_EliteCircles.Checked = Properties.Settings.Default.Overlay_EliteCircles; this.tb_updaterate.Text = Properties.Settings.Default.D3Helper_UpdateRate.ToString(); this.tb_riftprogressradius.Text = Properties.Settings.Default.riftprogress_radius.ToString(); this.CB_AutoPick_Gem.Checked = Properties.Settings.Default.AutoPickSettings_Gem; this.CB_AutoPick_Material.Checked = Properties.Settings.Default.AutoPickSettings_Material; this.CB_AutoPick_Legendary.Checked = Properties.Settings.Default.AutoPickSettings_Legendary; this.CB_AutoPick_LegendaryAncient.Checked = Properties.Settings.Default.AutoPickSettings_LegendaryAncient; this.CB_AutoPick_GreaterRiftKeystone.Checked = Properties.Settings.Default.AutoPickSettings_GreaterRiftKeystone; this.CB_AutoPick_Whites.Checked = Properties.Settings.Default.AutoPickSettings_Whites; this.CB_AutoPick_Magics.Checked = Properties.Settings.Default.AutoPickSettings_Magics; this.CB_AutoPick_Rares.Checked = Properties.Settings.Default.AutoPickSettings_Rares; this.TB_AutoPick_PickupRadius.Text = Properties.Settings.Default.AutoPickSettings_PickupRadius.ToString(); this.cb_DisableAutocastOnNoOverride.Checked = Properties.Settings.Default.DisableAutocastOnNoOverride; this.cbox_ConvertMaterialFromTo.Text = Properties.Settings.Default.ConvertMaterialText; //-------------------- // load simpleCaste settings T_SimpleCast.load_to_datagrid(dataGridView_simpleCast); }
private void button_simplecast_save_Click(object sender, EventArgs e) { T_SimpleCast.save_from_datagrid(dataGridView_simpleCast); Window_Main.d3helperform.loadSimeCastListToCombobox(); }
private void Window_Main_Load(object sender, EventArgs e) { typeof(Button).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, bt_Skill1, new object[] { true }); typeof(Button).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, bt_Skill2, new object[] { true }); typeof(Button).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, bt_Skill3, new object[] { true }); typeof(Button).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, bt_Skill4, new object[] { true }); typeof(Button).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, bt_SkillLmb, new object[] { true }); typeof(Button).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, bt_SkillRmb, new object[] { true }); directInput = new DirectInput(); keyboard = new SlimDX.DirectInput.Keyboard(directInput); keyboard.Acquire(); mouse = new SlimDX.DirectInput.Mouse(directInput); mouse.Acquire(); Point d3helpermainwindowpos = Properties.Settings.Default.D3Helper_MainForm_StartPosition; var screens = Screen.AllScreens.OrderByDescending(x => x.Bounds.X); if (d3helpermainwindowpos.X >= screens.Last().Bounds.Left&& d3helpermainwindowpos.X <= screens.First().Bounds.Right&& d3helpermainwindowpos.Y <= screens.First().Bounds.Bottom&& d3helpermainwindowpos.Y >= screens.First().Bounds.Top) { this.Top = Properties.Settings.Default.D3Helper_MainForm_StartPosition.Y; this.Left = Properties.Settings.Default.D3Helper_MainForm_StartPosition.X; } else { this.Top = 0; this.Left = 0; } //this.btn_donate.Image = new Bitmap(Properties.Resources.paypal_donate_button11, new Size(this.btn_donate.Width, this.btn_donate.Height)); this.btn_info.Image = new Bitmap(Properties.Resources._480px_Info_icon_002_svg, new Size(this.btn_info.Width, this.btn_info.Height)); this.btn_settings.Image = new Bitmap(Properties.Resources.pignon, new Size(this.btn_settings.Width, this.btn_settings.Height)); DateTime latestOnlineVersion = A_Tools.Version.AppVersion.LatestOnlineVersion; DateTime currentVersion = A_Tools.Version.AppVersion.get_CurrentVersionDate(); if (latestOnlineVersion > currentVersion) { this.lb_versionlb.Text = "New Version Available!" + System.Environment.NewLine + latestOnlineVersion.ToString("yy.MM.d.H"); //this.lb_versionlb.Invoke((MethodInvoker)(() => this.lb_versionlb.Text = "New Version Available!")); this.bt_update.Visible = true; } else { this.lb_versionlb.Text = ""; //this.lb_versionlb.Invoke((MethodInvoker)(() => this.lb_versionlb.Text = "")); } this.Text = "D3Helper - V" + A_Tools.Version.AppVersion.version; //Use SimpleCast! T_SimpleCast.StartSimpleCastThread(); //fill combobox for simple cast loadSimeCastListToCombobox(); //create thread waiting for d3 start! Thread t = new Thread(delegate() { //wait till d3 is running while (!isDiabloRunning()) { try { Thread.Sleep(1000); } catch { } } if (SupportedProcessVersion()) { //-- Initialize Collector and Handler Thread //if (!Program.SingleThreaded) A_Initialize.Th_ICollector.New_ICollector(); A_Initialize.Th_Handler.New_Handler(); System.Timers.Timer UpdateUI = new System.Timers.Timer(1000); UpdateUI.Elapsed += RefreshUI; UpdateUI.Start(); Load_CustomFonts(); } else { this.Text = "You are running a not supported D3Client(" + GetFileVersion() + ") Supported Version is " + SupportedVersion; } }); t.SetApartmentState(ApartmentState.STA); //must be STA Thread to access GUI t.Start(); //overlay if (SupportedProcessVersion()) { A_WPFOverlay.Overlay o = new A_WPFOverlay.Overlay(); o.Show(); } Me.Threads.AntiIdleThread = new Thread(() => { AntiIdle antiIdle = new AntiIdle(); }); if (Properties.Settings.Default.AntiIdleBool) { Me.Threads.AntiIdleThread.Start(); } try { if (Me.Threads.RosBotUpgradeKadalaThread.ThreadState == System.Threading.ThreadState.Unstarted) { Me.Threads.RosBotUpgradeKadalaThread = new Thread(() => { RosBotUpgradeKadala rosBotUpgradeKadala = new RosBotUpgradeKadala(); }); if (Properties.Settings.Default.RosBotUpgradeKadalaBool) { Me.Threads.RosBotUpgradeKadalaThread.Start(); } } } catch { Me.Threads.RosBotUpgradeKadalaThread = new Thread(() => { RosBotUpgradeKadala rosBotUpgradeKadala = new RosBotUpgradeKadala(); }); if (Properties.Settings.Default.RosBotUpgradeKadalaBool) { Me.Threads.RosBotUpgradeKadalaThread.Start(); } } Me.Threads.HomingPadsThread = new Thread(() => { HomingPadsHandler homingPadsHandler = new HomingPadsHandler(); }); // Probably best to not start this thread unless user has it turned on in settings // Will require a restart of D3helper any time it's turned on/off though if (Properties.Settings.Default.HomingPadsBool) { Me.Threads.HomingPadsThread.Start(); } }