private void saveButton_Click(object sender, EventArgs e) { GeneralKeys generalKeys = new GeneralKeys(); generalKeys.forward = (UseableKeys)this.forwardComboBox.SelectedItem; generalKeys.backward = (UseableKeys)this.backwardComboBox.SelectedItem; generalKeys.rotateLeft = (UseableKeys)this.rotateLeftComboBox.SelectedItem; generalKeys.rotateRight = (UseableKeys)this.rotateRightComboBox.SelectedItem; generalKeys.action = (UseableKeys)this.actionComboBox.SelectedItem; FishingKeys fishingKeys = new FishingKeys(); fishingKeys.startFishing = (UseableKeys)this.startFishingCombobox.SelectedItem; fishingKeys.catchFish = (UseableKeys)this.catchFishCombobox.SelectedItem; FishingConfig fishingConfig = new FishingConfig(); fishingConfig.movement = generalKeys; fishingConfig.fishing = fishingKeys; fishingConfig.biteDelay = int.Parse(this.biteDelayTextbox.Text); this.configHolder.fishingConfig = fishingConfig; SaveConfigForm form = new SaveConfigForm(this.configHolder, this.saveConfigFormFinished); form.ShowDialog(); }
public FishingBot(FishingConfig config, List <Waypoint> waypointList) { this.timer = new System.Windows.Forms.Timer(); this.timer.Interval = SettingsSingleton.Instance.timings.movementUpdateTick; this.timer.Tick += new System.EventHandler(this.tickFishing); this.fishingConfig = config; this.waypointList = waypointList; this.gkeys = this.fishingConfig.movement; }
private void renderFishingConfig(FishingConfig config) { this.biteDelayTextbox.Text = config.biteDelay.ToString(); this.renderComboboxWithKeys(this.forwardComboBox, config.movement.forward); this.renderComboboxWithKeys(this.backwardComboBox, config.movement.backward); this.renderComboboxWithKeys(this.rotateLeftComboBox, config.movement.rotateLeft); this.renderComboboxWithKeys(this.rotateRightComboBox, config.movement.rotateRight); this.renderComboboxWithKeys(this.actionComboBox, config.movement.action); this.renderComboboxWithKeys(this.startFishingCombobox, config.fishing.startFishing); this.renderComboboxWithKeys(this.catchFishCombobox, config.fishing.catchFish); }