MyNes_src/MyNes/MyNes/FormDetectSelection.cs
2024-07-03 18:15:19 +08:00

112 lines
3.2 KiB
C#

using System;
using System.ComponentModel;
using System.Windows.Forms;
namespace MyNes;
public class FormDetectSelection : Form
{
private IContainer components;
private RadioButton radioButton_snaps;
private RadioButton radioButton_covers;
private RadioButton radioButton_infos;
private Button button1;
private Button button2;
public DetectMode MODE
{
get
{
if (radioButton_snaps.Checked)
{
return DetectMode.SNAPS;
}
if (radioButton_covers.Checked)
{
return DetectMode.COVERS;
}
if (radioButton_infos.Checked)
{
return DetectMode.INFOS;
}
return DetectMode.NONE;
}
}
public FormDetectSelection()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
Close();
}
private void button1_Click(object sender, EventArgs e)
{
base.DialogResult = DialogResult.OK;
Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager componentResourceManager = new System.ComponentModel.ComponentResourceManager(typeof(MyNes.FormDetectSelection));
this.radioButton_snaps = new System.Windows.Forms.RadioButton();
this.radioButton_covers = new System.Windows.Forms.RadioButton();
this.radioButton_infos = new System.Windows.Forms.RadioButton();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
base.SuspendLayout();
componentResourceManager.ApplyResources(this.radioButton_snaps, "radioButton_snaps");
this.radioButton_snaps.Checked = true;
this.radioButton_snaps.Name = "radioButton_snaps";
this.radioButton_snaps.TabStop = true;
this.radioButton_snaps.UseVisualStyleBackColor = true;
componentResourceManager.ApplyResources(this.radioButton_covers, "radioButton_covers");
this.radioButton_covers.Name = "radioButton_covers";
this.radioButton_covers.UseVisualStyleBackColor = true;
componentResourceManager.ApplyResources(this.radioButton_infos, "radioButton_infos");
this.radioButton_infos.Name = "radioButton_infos";
this.radioButton_infos.UseVisualStyleBackColor = true;
componentResourceManager.ApplyResources(this.button1, "button1");
this.button1.Name = "button1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(button1_Click);
componentResourceManager.ApplyResources(this.button2, "button2");
this.button2.Name = "button2";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(button2_Click);
base.AcceptButton = this.button1;
componentResourceManager.ApplyResources(this, "$this");
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.Controls.Add(this.button2);
base.Controls.Add(this.button1);
base.Controls.Add(this.radioButton_infos);
base.Controls.Add(this.radioButton_covers);
base.Controls.Add(this.radioButton_snaps);
base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
base.MaximizeBox = false;
base.MinimizeBox = false;
base.Name = "FormDetectSelection";
base.ShowIcon = false;
base.ShowInTaskbar = false;
base.ResumeLayout(false);
base.PerformLayout();
}
}