www.pudn.com > sudoku.rar > OptionsDialog.cs
//--------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: OptionsDialog.cs
//
// Description: Dialog for user configuration options.
//
//--------------------------------------------------------------------------
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace Microsoft.Sudoku
{
/// Presents configuration options to the user.
internal class OptionsDialog : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox chkShowIncorrectCells;
private System.Windows.Forms.CheckBox chkHighlightEasyCell;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.CheckBox chkCreateWithSymmetry;
private System.Windows.Forms.CheckBox chkPromptOnDelete;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOK;
private System.ComponentModel.Container components = null;
/// Initializes the OptionsDialog.
public OptionsDialog()
{
InitializeComponent();
}
/// Cleans up.
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(OptionsDialog));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.chkHighlightEasyCell = new System.Windows.Forms.CheckBox();
this.chkShowIncorrectCells = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.chkCreateWithSymmetry = new System.Windows.Forms.CheckBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.chkPromptOnDelete = new System.Windows.Forms.CheckBox();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.AccessibleDescription = resources.GetString("groupBox1.AccessibleDescription");
this.groupBox1.AccessibleName = resources.GetString("groupBox1.AccessibleName");
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("groupBox1.Anchor")));
this.groupBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("groupBox1.BackgroundImage")));
this.groupBox1.Controls.Add(this.chkHighlightEasyCell);
this.groupBox1.Controls.Add(this.chkShowIncorrectCells);
this.groupBox1.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("groupBox1.Dock")));
this.groupBox1.Enabled = ((bool)(resources.GetObject("groupBox1.Enabled")));
this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox1.Font = ((System.Drawing.Font)(resources.GetObject("groupBox1.Font")));
this.groupBox1.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("groupBox1.ImeMode")));
this.groupBox1.Location = ((System.Drawing.Point)(resources.GetObject("groupBox1.Location")));
this.groupBox1.Name = "groupBox1";
this.groupBox1.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("groupBox1.RightToLeft")));
this.groupBox1.Size = ((System.Drawing.Size)(resources.GetObject("groupBox1.Size")));
this.groupBox1.TabIndex = ((int)(resources.GetObject("groupBox1.TabIndex")));
this.groupBox1.TabStop = false;
this.groupBox1.Text = resources.GetString("groupBox1.Text");
this.groupBox1.Visible = ((bool)(resources.GetObject("groupBox1.Visible")));
//
// chkHighlightEasyCell
//
this.chkHighlightEasyCell.AccessibleDescription = resources.GetString("chkHighlightEasyCell.AccessibleDescription");
this.chkHighlightEasyCell.AccessibleName = resources.GetString("chkHighlightEasyCell.AccessibleName");
this.chkHighlightEasyCell.AccessibleRole = System.Windows.Forms.AccessibleRole.HotkeyField;
this.chkHighlightEasyCell.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkHighlightEasyCell.Anchor")));
this.chkHighlightEasyCell.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkHighlightEasyCell.Appearance")));
this.chkHighlightEasyCell.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkHighlightEasyCell.BackgroundImage")));
this.chkHighlightEasyCell.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkHighlightEasyCell.CheckAlign")));
this.chkHighlightEasyCell.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkHighlightEasyCell.Dock")));
this.chkHighlightEasyCell.Enabled = ((bool)(resources.GetObject("chkHighlightEasyCell.Enabled")));
this.chkHighlightEasyCell.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkHighlightEasyCell.FlatStyle")));
this.chkHighlightEasyCell.Font = ((System.Drawing.Font)(resources.GetObject("chkHighlightEasyCell.Font")));
this.chkHighlightEasyCell.Image = ((System.Drawing.Image)(resources.GetObject("chkHighlightEasyCell.Image")));
this.chkHighlightEasyCell.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkHighlightEasyCell.ImageAlign")));
this.chkHighlightEasyCell.ImageIndex = ((int)(resources.GetObject("chkHighlightEasyCell.ImageIndex")));
this.chkHighlightEasyCell.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkHighlightEasyCell.ImeMode")));
this.chkHighlightEasyCell.Location = ((System.Drawing.Point)(resources.GetObject("chkHighlightEasyCell.Location")));
this.chkHighlightEasyCell.Name = "chkHighlightEasyCell";
this.chkHighlightEasyCell.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkHighlightEasyCell.RightToLeft")));
this.chkHighlightEasyCell.Size = ((System.Drawing.Size)(resources.GetObject("chkHighlightEasyCell.Size")));
this.chkHighlightEasyCell.TabIndex = ((int)(resources.GetObject("chkHighlightEasyCell.TabIndex")));
this.chkHighlightEasyCell.Text = resources.GetString("chkHighlightEasyCell.Text");
this.chkHighlightEasyCell.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkHighlightEasyCell.TextAlign")));
this.chkHighlightEasyCell.Visible = ((bool)(resources.GetObject("chkHighlightEasyCell.Visible")));
//
// chkShowIncorrectCells
//
this.chkShowIncorrectCells.AccessibleDescription = resources.GetString("chkShowIncorrectCells.AccessibleDescription");
this.chkShowIncorrectCells.AccessibleName = resources.GetString("chkShowIncorrectCells.AccessibleName");
this.chkShowIncorrectCells.AccessibleRole = System.Windows.Forms.AccessibleRole.HotkeyField;
this.chkShowIncorrectCells.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkShowIncorrectCells.Anchor")));
this.chkShowIncorrectCells.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkShowIncorrectCells.Appearance")));
this.chkShowIncorrectCells.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkShowIncorrectCells.BackgroundImage")));
this.chkShowIncorrectCells.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkShowIncorrectCells.CheckAlign")));
this.chkShowIncorrectCells.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkShowIncorrectCells.Dock")));
this.chkShowIncorrectCells.Enabled = ((bool)(resources.GetObject("chkShowIncorrectCells.Enabled")));
this.chkShowIncorrectCells.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkShowIncorrectCells.FlatStyle")));
this.chkShowIncorrectCells.Font = ((System.Drawing.Font)(resources.GetObject("chkShowIncorrectCells.Font")));
this.chkShowIncorrectCells.Image = ((System.Drawing.Image)(resources.GetObject("chkShowIncorrectCells.Image")));
this.chkShowIncorrectCells.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkShowIncorrectCells.ImageAlign")));
this.chkShowIncorrectCells.ImageIndex = ((int)(resources.GetObject("chkShowIncorrectCells.ImageIndex")));
this.chkShowIncorrectCells.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkShowIncorrectCells.ImeMode")));
this.chkShowIncorrectCells.Location = ((System.Drawing.Point)(resources.GetObject("chkShowIncorrectCells.Location")));
this.chkShowIncorrectCells.Name = "chkShowIncorrectCells";
this.chkShowIncorrectCells.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkShowIncorrectCells.RightToLeft")));
this.chkShowIncorrectCells.Size = ((System.Drawing.Size)(resources.GetObject("chkShowIncorrectCells.Size")));
this.chkShowIncorrectCells.TabIndex = ((int)(resources.GetObject("chkShowIncorrectCells.TabIndex")));
this.chkShowIncorrectCells.Text = resources.GetString("chkShowIncorrectCells.Text");
this.chkShowIncorrectCells.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkShowIncorrectCells.TextAlign")));
this.chkShowIncorrectCells.Visible = ((bool)(resources.GetObject("chkShowIncorrectCells.Visible")));
this.chkShowIncorrectCells.CheckedChanged += new System.EventHandler(this.chkShowIncorrectCells_CheckedChanged);
//
// groupBox2
//
this.groupBox2.AccessibleDescription = resources.GetString("groupBox2.AccessibleDescription");
this.groupBox2.AccessibleName = resources.GetString("groupBox2.AccessibleName");
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("groupBox2.Anchor")));
this.groupBox2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("groupBox2.BackgroundImage")));
this.groupBox2.Controls.Add(this.chkCreateWithSymmetry);
this.groupBox2.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("groupBox2.Dock")));
this.groupBox2.Enabled = ((bool)(resources.GetObject("groupBox2.Enabled")));
this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox2.Font = ((System.Drawing.Font)(resources.GetObject("groupBox2.Font")));
this.groupBox2.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("groupBox2.ImeMode")));
this.groupBox2.Location = ((System.Drawing.Point)(resources.GetObject("groupBox2.Location")));
this.groupBox2.Name = "groupBox2";
this.groupBox2.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("groupBox2.RightToLeft")));
this.groupBox2.Size = ((System.Drawing.Size)(resources.GetObject("groupBox2.Size")));
this.groupBox2.TabIndex = ((int)(resources.GetObject("groupBox2.TabIndex")));
this.groupBox2.TabStop = false;
this.groupBox2.Text = resources.GetString("groupBox2.Text");
this.groupBox2.Visible = ((bool)(resources.GetObject("groupBox2.Visible")));
//
// chkCreateWithSymmetry
//
this.chkCreateWithSymmetry.AccessibleDescription = resources.GetString("chkCreateWithSymmetry.AccessibleDescription");
this.chkCreateWithSymmetry.AccessibleName = resources.GetString("chkCreateWithSymmetry.AccessibleName");
this.chkCreateWithSymmetry.AccessibleRole = System.Windows.Forms.AccessibleRole.HotkeyField;
this.chkCreateWithSymmetry.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkCreateWithSymmetry.Anchor")));
this.chkCreateWithSymmetry.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkCreateWithSymmetry.Appearance")));
this.chkCreateWithSymmetry.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkCreateWithSymmetry.BackgroundImage")));
this.chkCreateWithSymmetry.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkCreateWithSymmetry.CheckAlign")));
this.chkCreateWithSymmetry.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkCreateWithSymmetry.Dock")));
this.chkCreateWithSymmetry.Enabled = ((bool)(resources.GetObject("chkCreateWithSymmetry.Enabled")));
this.chkCreateWithSymmetry.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkCreateWithSymmetry.FlatStyle")));
this.chkCreateWithSymmetry.Font = ((System.Drawing.Font)(resources.GetObject("chkCreateWithSymmetry.Font")));
this.chkCreateWithSymmetry.Image = ((System.Drawing.Image)(resources.GetObject("chkCreateWithSymmetry.Image")));
this.chkCreateWithSymmetry.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkCreateWithSymmetry.ImageAlign")));
this.chkCreateWithSymmetry.ImageIndex = ((int)(resources.GetObject("chkCreateWithSymmetry.ImageIndex")));
this.chkCreateWithSymmetry.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkCreateWithSymmetry.ImeMode")));
this.chkCreateWithSymmetry.Location = ((System.Drawing.Point)(resources.GetObject("chkCreateWithSymmetry.Location")));
this.chkCreateWithSymmetry.Name = "chkCreateWithSymmetry";
this.chkCreateWithSymmetry.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkCreateWithSymmetry.RightToLeft")));
this.chkCreateWithSymmetry.Size = ((System.Drawing.Size)(resources.GetObject("chkCreateWithSymmetry.Size")));
this.chkCreateWithSymmetry.TabIndex = ((int)(resources.GetObject("chkCreateWithSymmetry.TabIndex")));
this.chkCreateWithSymmetry.Text = resources.GetString("chkCreateWithSymmetry.Text");
this.chkCreateWithSymmetry.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkCreateWithSymmetry.TextAlign")));
this.chkCreateWithSymmetry.Visible = ((bool)(resources.GetObject("chkCreateWithSymmetry.Visible")));
//
// groupBox3
//
this.groupBox3.AccessibleDescription = resources.GetString("groupBox3.AccessibleDescription");
this.groupBox3.AccessibleName = resources.GetString("groupBox3.AccessibleName");
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("groupBox3.Anchor")));
this.groupBox3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("groupBox3.BackgroundImage")));
this.groupBox3.Controls.Add(this.chkPromptOnDelete);
this.groupBox3.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("groupBox3.Dock")));
this.groupBox3.Enabled = ((bool)(resources.GetObject("groupBox3.Enabled")));
this.groupBox3.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox3.Font = ((System.Drawing.Font)(resources.GetObject("groupBox3.Font")));
this.groupBox3.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("groupBox3.ImeMode")));
this.groupBox3.Location = ((System.Drawing.Point)(resources.GetObject("groupBox3.Location")));
this.groupBox3.Name = "groupBox3";
this.groupBox3.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("groupBox3.RightToLeft")));
this.groupBox3.Size = ((System.Drawing.Size)(resources.GetObject("groupBox3.Size")));
this.groupBox3.TabIndex = ((int)(resources.GetObject("groupBox3.TabIndex")));
this.groupBox3.TabStop = false;
this.groupBox3.Text = resources.GetString("groupBox3.Text");
this.groupBox3.Visible = ((bool)(resources.GetObject("groupBox3.Visible")));
//
// chkPromptOnDelete
//
this.chkPromptOnDelete.AccessibleDescription = resources.GetString("chkPromptOnDelete.AccessibleDescription");
this.chkPromptOnDelete.AccessibleName = resources.GetString("chkPromptOnDelete.AccessibleName");
this.chkPromptOnDelete.AccessibleRole = System.Windows.Forms.AccessibleRole.HotkeyField;
this.chkPromptOnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("chkPromptOnDelete.Anchor")));
this.chkPromptOnDelete.Appearance = ((System.Windows.Forms.Appearance)(resources.GetObject("chkPromptOnDelete.Appearance")));
this.chkPromptOnDelete.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkPromptOnDelete.BackgroundImage")));
this.chkPromptOnDelete.CheckAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkPromptOnDelete.CheckAlign")));
this.chkPromptOnDelete.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("chkPromptOnDelete.Dock")));
this.chkPromptOnDelete.Enabled = ((bool)(resources.GetObject("chkPromptOnDelete.Enabled")));
this.chkPromptOnDelete.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("chkPromptOnDelete.FlatStyle")));
this.chkPromptOnDelete.Font = ((System.Drawing.Font)(resources.GetObject("chkPromptOnDelete.Font")));
this.chkPromptOnDelete.Image = ((System.Drawing.Image)(resources.GetObject("chkPromptOnDelete.Image")));
this.chkPromptOnDelete.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkPromptOnDelete.ImageAlign")));
this.chkPromptOnDelete.ImageIndex = ((int)(resources.GetObject("chkPromptOnDelete.ImageIndex")));
this.chkPromptOnDelete.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("chkPromptOnDelete.ImeMode")));
this.chkPromptOnDelete.Location = ((System.Drawing.Point)(resources.GetObject("chkPromptOnDelete.Location")));
this.chkPromptOnDelete.Name = "chkPromptOnDelete";
this.chkPromptOnDelete.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("chkPromptOnDelete.RightToLeft")));
this.chkPromptOnDelete.Size = ((System.Drawing.Size)(resources.GetObject("chkPromptOnDelete.Size")));
this.chkPromptOnDelete.TabIndex = ((int)(resources.GetObject("chkPromptOnDelete.TabIndex")));
this.chkPromptOnDelete.Text = resources.GetString("chkPromptOnDelete.Text");
this.chkPromptOnDelete.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("chkPromptOnDelete.TextAlign")));
this.chkPromptOnDelete.Visible = ((bool)(resources.GetObject("chkPromptOnDelete.Visible")));
//
// btnCancel
//
this.btnCancel.AccessibleDescription = resources.GetString("btnCancel.AccessibleDescription");
this.btnCancel.AccessibleName = resources.GetString("btnCancel.AccessibleName");
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnCancel.Anchor")));
this.btnCancel.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnCancel.BackgroundImage")));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnCancel.Dock")));
this.btnCancel.Enabled = ((bool)(resources.GetObject("btnCancel.Enabled")));
this.btnCancel.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnCancel.FlatStyle")));
this.btnCancel.Font = ((System.Drawing.Font)(resources.GetObject("btnCancel.Font")));
this.btnCancel.Image = ((System.Drawing.Image)(resources.GetObject("btnCancel.Image")));
this.btnCancel.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnCancel.ImageAlign")));
this.btnCancel.ImageIndex = ((int)(resources.GetObject("btnCancel.ImageIndex")));
this.btnCancel.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnCancel.ImeMode")));
this.btnCancel.Location = ((System.Drawing.Point)(resources.GetObject("btnCancel.Location")));
this.btnCancel.Name = "btnCancel";
this.btnCancel.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnCancel.RightToLeft")));
this.btnCancel.Size = ((System.Drawing.Size)(resources.GetObject("btnCancel.Size")));
this.btnCancel.TabIndex = ((int)(resources.GetObject("btnCancel.TabIndex")));
this.btnCancel.Text = resources.GetString("btnCancel.Text");
this.btnCancel.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnCancel.TextAlign")));
this.btnCancel.Visible = ((bool)(resources.GetObject("btnCancel.Visible")));
//
// btnOK
//
this.btnOK.AccessibleDescription = resources.GetString("btnOK.AccessibleDescription");
this.btnOK.AccessibleName = resources.GetString("btnOK.AccessibleName");
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnOK.Anchor")));
this.btnOK.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnOK.BackgroundImage")));
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnOK.Dock")));
this.btnOK.Enabled = ((bool)(resources.GetObject("btnOK.Enabled")));
this.btnOK.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnOK.FlatStyle")));
this.btnOK.Font = ((System.Drawing.Font)(resources.GetObject("btnOK.Font")));
this.btnOK.Image = ((System.Drawing.Image)(resources.GetObject("btnOK.Image")));
this.btnOK.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnOK.ImageAlign")));
this.btnOK.ImageIndex = ((int)(resources.GetObject("btnOK.ImageIndex")));
this.btnOK.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnOK.ImeMode")));
this.btnOK.Location = ((System.Drawing.Point)(resources.GetObject("btnOK.Location")));
this.btnOK.Name = "btnOK";
this.btnOK.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnOK.RightToLeft")));
this.btnOK.Size = ((System.Drawing.Size)(resources.GetObject("btnOK.Size")));
this.btnOK.TabIndex = ((int)(resources.GetObject("btnOK.TabIndex")));
this.btnOK.Text = resources.GetString("btnOK.Text");
this.btnOK.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnOK.TextAlign")));
this.btnOK.Visible = ((bool)(resources.GetObject("btnOK.Visible")));
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// OptionsDialog
//
this.AcceptButton = this.btnOK;
this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
this.AccessibleName = resources.GetString("$this.AccessibleName");
this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.CancelButton = this.btnCancel;
this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
this.MaximizeBox = false;
this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
this.MinimizeBox = false;
this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
this.Name = "OptionsDialog";
this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
this.Text = resources.GetString("$this.Text");
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// The configuration options for this dialog.
private ConfigurationOptions _options = new ConfigurationOptions();
/// Gets the configuration options.
public ConfigurationOptions ConfiguredOptions { get { return _options; } }
/// Sets up the form based on the current configuration options.
protected override void OnVisibleChanged(EventArgs e)
{
if (Visible)
{
chkHighlightEasyCell.Checked = _options.SuggestEasyCells;
chkShowIncorrectCells.Checked = _options.ShowIncorrectCells;
chkCreateWithSymmetry.Checked = _options.CreatePuzzlesWithSymmetry;
chkPromptOnDelete.Checked = _options.PromptOnPuzzleDelete;
ConfiguredEnabledCheckboxes();
btnOK.Select();
}
base.OnVisibleChanged (e);
}
/// Sets up the configuration options based on the status of the form.
private void btnOK_Click(object sender, System.EventArgs e)
{
_options.SuggestEasyCells = chkHighlightEasyCell.Checked;
_options.ShowIncorrectCells = chkShowIncorrectCells.Checked;
_options.CreatePuzzlesWithSymmetry = chkCreateWithSymmetry.Checked;
_options.PromptOnPuzzleDelete = chkPromptOnDelete.Checked;
}
/// Enables or disables the highlight easy cells option based on the show incorrect values option.
private void chkShowIncorrectCells_CheckedChanged(object sender, System.EventArgs e)
{
ConfiguredEnabledCheckboxes();
}
/// Configures chkHighlightEasyCell based on whether chkShowIncorrectCells is checked.
private void ConfiguredEnabledCheckboxes()
{
if (chkShowIncorrectCells.Checked)
{
chkHighlightEasyCell.Enabled = true;
}
else
{
chkHighlightEasyCell.Enabled = false;
chkHighlightEasyCell.Checked = false;
}
}
}
}