private void loadConfigForm(SaveConfigHolder configHolder) { if (this.settingsLoaded && configHolder != null && configHolder.type != ConfigType.None) { this.rescanDirectory = true; if (configHolder.type == ConfigType.Combat) { SaveConfigHolder holder = configHolder; Forms.ConfigCombatForm form = new Forms.ConfigCombatForm(configHolder); form.Location = new Point(this.Location.X + 10, this.Location.Y + 40); form.ShowDialog(); } else if (configHolder.type == ConfigType.Gathering) { SaveConfigHolder holder = configHolder; Forms.ConfigGatheringForm form = new Forms.ConfigGatheringForm(configHolder); form.Location = new Point(this.Location.X + 10, this.Location.Y + 40); form.ShowDialog(); } else if (configHolder.type == ConfigType.Fishing) { SaveConfigHolder holder = configHolder; Forms.ConfigFishingForm form = new Forms.ConfigFishingForm(configHolder); form.Location = new Point(this.Location.X + 10, this.Location.Y + 40); form.ShowDialog(); } } }
public ConfigFishingForm(SaveConfigHolder configHolder) { this.TopMost = true; InitializeComponent(); this.closeButton = new Controls.ImageButton(); this.closeButton.Parent = this; this.closeButton.ForeColor = Color.Transparent; this.closeButton.BackgroundImage = global::FFXIV_netBot.Properties.Resources.closeBtn; this.closeButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.closeButton.Location = new System.Drawing.Point(340, 11); this.closeButton.Name = "buttonClose"; this.closeButton.Size = new System.Drawing.Size(19, 18); this.closeButton.TabStop = false; this.closeButton.Click += new System.EventHandler(this.CancelButton_Click); this.Controls.Add(this.closeButton); /* * */ if (configHolder == null) { configHolder = new SaveConfigHolder(); } if (configHolder.fileName.Length == 0) { configHolder.fishingConfig = RestoreConfigDefault.defaultFishingConfig(); } configHolder.type = ConfigType.Fishing; this.fileNameLabel.Text = configHolder.fileName; this.renderFishingConfig(configHolder.fishingConfig); this.configHolder = configHolder; }
public SaveConfigForm(SaveConfigHolder configHolder, SaveConfigDelegate saveFinishDelegate) { this.currentDirectory = Path.GetDirectoryName(Application.ExecutablePath); this.configHolder = configHolder; this.saveFinishDelegate = saveFinishDelegate; this.defFileName = configHolder.fileName; this.TopMost = true; InitializeComponent(); this.closeButton = new Controls.ImageButton(); this.closeButton.Parent = this; this.closeButton.ForeColor = Color.Transparent; this.closeButton.BackgroundImage = global::FFXIV_netBot.Properties.Resources.closeBtn; this.closeButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.closeButton.Location = new System.Drawing.Point(220, 11); this.closeButton.Name = "buttonClose"; this.closeButton.Size = new System.Drawing.Size(19, 18); this.closeButton.TabStop = false; this.closeButton.Click += new System.EventHandler(this.CancelButton_Click); this.Controls.Add(this.closeButton); this.scanDirectoryForConfig(); String item = (string)this.existFileSelector.SelectedItem; this.saveButton.Enabled = (configHolder.type != ConfigType.None); }