📄 llkconfig.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace 自娱自乐
{
/// <summary>
/// LLKConfig 的摘要说明。
/// </summary>
public class LLKConfig : System.Windows.Forms.Form
{
private System.Windows.Forms.Label labelTimeAddUnit;
private System.Windows.Forms.Label labelTimeAdd;
private System.Windows.Forms.NumericUpDown NumTimeAdd;
private System.Windows.Forms.Label labelHint;
private System.Windows.Forms.Label labelHintUnit;
private System.Windows.Forms.NumericUpDown NumHint;
private System.Windows.Forms.Label labelRedoUnit;
private System.Windows.Forms.NumericUpDown NumRedo;
private System.Windows.Forms.Label labelRedo;
private System.Windows.Forms.Button Apply;
private System.Windows.Forms.Button Cannel;
private 自娱自乐.LLKForm llk ;
private System.Windows.Forms.Label labelTimeMax;
private System.Windows.Forms.NumericUpDown NumTimeMax;
private System.Windows.Forms.Label labelTimeMaxUnit;
private System.Windows.Forms.Label labelLevUnit;
private System.Windows.Forms.NumericUpDown NumLev;
private System.Windows.Forms.Label labelLev;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public LLKConfig()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(LLKConfig));
this.labelTimeMax = new System.Windows.Forms.Label();
this.NumTimeMax = new System.Windows.Forms.NumericUpDown();
this.labelTimeMaxUnit = new System.Windows.Forms.Label();
this.labelTimeAddUnit = new System.Windows.Forms.Label();
this.NumTimeAdd = new System.Windows.Forms.NumericUpDown();
this.labelTimeAdd = new System.Windows.Forms.Label();
this.labelHintUnit = new System.Windows.Forms.Label();
this.NumHint = new System.Windows.Forms.NumericUpDown();
this.labelHint = new System.Windows.Forms.Label();
this.labelRedoUnit = new System.Windows.Forms.Label();
this.NumRedo = new System.Windows.Forms.NumericUpDown();
this.labelRedo = new System.Windows.Forms.Label();
this.Apply = new System.Windows.Forms.Button();
this.Cannel = new System.Windows.Forms.Button();
this.labelLevUnit = new System.Windows.Forms.Label();
this.NumLev = new System.Windows.Forms.NumericUpDown();
this.labelLev = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.NumTimeMax)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NumTimeAdd)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NumHint)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NumRedo)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NumLev)).BeginInit();
this.SuspendLayout();
//
// labelTimeMax
//
this.labelTimeMax.Location = new System.Drawing.Point(10, 10);
this.labelTimeMax.Name = "labelTimeMax";
this.labelTimeMax.Size = new System.Drawing.Size(100, 20);
this.labelTimeMax.TabIndex = 0;
this.labelTimeMax.Text = "游戏时间:";
this.labelTimeMax.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// NumTimeMax
//
this.NumTimeMax.Location = new System.Drawing.Point(110, 10);
this.NumTimeMax.Maximum = new System.Decimal(new int[] {
10,
0,
0,
0});
this.NumTimeMax.Name = "NumTimeMax";
this.NumTimeMax.Size = new System.Drawing.Size(50, 21);
this.NumTimeMax.TabIndex = 1;
this.NumTimeMax.Value = new System.Decimal(new int[] {
2,
0,
0,
0});
//
// labelTimeMaxUnit
//
this.labelTimeMaxUnit.Location = new System.Drawing.Point(170, 10);
this.labelTimeMaxUnit.Name = "labelTimeMaxUnit";
this.labelTimeMaxUnit.Size = new System.Drawing.Size(50, 20);
this.labelTimeMaxUnit.TabIndex = 2;
this.labelTimeMaxUnit.Text = "分 钟";
this.labelTimeMaxUnit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// labelTimeAddUnit
//
this.labelTimeAddUnit.Location = new System.Drawing.Point(170, 40);
this.labelTimeAddUnit.Name = "labelTimeAddUnit";
this.labelTimeAddUnit.Size = new System.Drawing.Size(50, 20);
this.labelTimeAddUnit.TabIndex = 5;
this.labelTimeAddUnit.Text = "秒 ";
this.labelTimeAddUnit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// NumTimeAdd
//
this.NumTimeAdd.Location = new System.Drawing.Point(110, 40);
this.NumTimeAdd.Maximum = new System.Decimal(new int[] {
10,
0,
0,
0});
this.NumTimeAdd.Name = "NumTimeAdd";
this.NumTimeAdd.Size = new System.Drawing.Size(50, 21);
this.NumTimeAdd.TabIndex = 4;
this.NumTimeAdd.Value = new System.Decimal(new int[] {
3,
0,
0,
0});
//
// labelTimeAdd
//
this.labelTimeAdd.Location = new System.Drawing.Point(10, 40);
this.labelTimeAdd.Name = "labelTimeAdd";
this.labelTimeAdd.Size = new System.Drawing.Size(100, 20);
this.labelTimeAdd.TabIndex = 3;
this.labelTimeAdd.Text = "奖励时间:";
this.labelTimeAdd.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelHintUnit
//
this.labelHintUnit.Location = new System.Drawing.Point(170, 70);
this.labelHintUnit.Name = "labelHintUnit";
this.labelHintUnit.Size = new System.Drawing.Size(50, 20);
this.labelHintUnit.TabIndex = 8;
this.labelHintUnit.Text = "次";
this.labelHintUnit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// NumHint
//
this.NumHint.Location = new System.Drawing.Point(110, 70);
this.NumHint.Maximum = new System.Decimal(new int[] {
10,
0,
0,
0});
this.NumHint.Name = "NumHint";
this.NumHint.Size = new System.Drawing.Size(50, 21);
this.NumHint.TabIndex = 7;
this.NumHint.Value = new System.Decimal(new int[] {
5,
0,
0,
0});
//
// labelHint
//
this.labelHint.Location = new System.Drawing.Point(10, 70);
this.labelHint.Name = "labelHint";
this.labelHint.Size = new System.Drawing.Size(100, 20);
this.labelHint.TabIndex = 6;
this.labelHint.Text = "提示次数:";
this.labelHint.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelRedoUnit
//
this.labelRedoUnit.Location = new System.Drawing.Point(170, 100);
this.labelRedoUnit.Name = "labelRedoUnit";
this.labelRedoUnit.Size = new System.Drawing.Size(50, 20);
this.labelRedoUnit.TabIndex = 11;
this.labelRedoUnit.Text = "次";
this.labelRedoUnit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// NumRedo
//
this.NumRedo.Location = new System.Drawing.Point(110, 100);
this.NumRedo.Maximum = new System.Decimal(new int[] {
10,
0,
0,
0});
this.NumRedo.Name = "NumRedo";
this.NumRedo.Size = new System.Drawing.Size(50, 21);
this.NumRedo.TabIndex = 10;
this.NumRedo.Value = new System.Decimal(new int[] {
3,
0,
0,
0});
//
// labelRedo
//
this.labelRedo.Location = new System.Drawing.Point(10, 100);
this.labelRedo.Name = "labelRedo";
this.labelRedo.Size = new System.Drawing.Size(100, 20);
this.labelRedo.TabIndex = 9;
this.labelRedo.Text = "洗牌次数:";
this.labelRedo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// Apply
//
this.Apply.Font = new System.Drawing.Font("宋体", 8F);
this.Apply.Location = new System.Drawing.Point(25, 150);
this.Apply.Name = "Apply";
this.Apply.Size = new System.Drawing.Size(80, 20);
this.Apply.TabIndex = 12;
this.Apply.Text = "应 用";
this.Apply.Click += new System.EventHandler(this.Apply_Click);
//
// Cannel
//
this.Cannel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Cannel.Font = new System.Drawing.Font("宋体", 8F);
this.Cannel.Location = new System.Drawing.Point(120, 150);
this.Cannel.Name = "Cannel";
this.Cannel.Size = new System.Drawing.Size(80, 20);
this.Cannel.TabIndex = 13;
this.Cannel.Text = "退 出";
this.Cannel.Click += new System.EventHandler(this.Cannel_Click);
//
// labelLevUnit
//
this.labelLevUnit.Location = new System.Drawing.Point(170, 125);
this.labelLevUnit.Name = "labelLevUnit";
this.labelLevUnit.Size = new System.Drawing.Size(50, 20);
this.labelLevUnit.TabIndex = 16;
this.labelLevUnit.Text = "级";
this.labelLevUnit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// NumLev
//
this.NumLev.Location = new System.Drawing.Point(110, 125);
this.NumLev.Maximum = new System.Decimal(new int[] {
9,
0,
0,
0});
this.NumLev.Minimum = new System.Decimal(new int[] {
1,
0,
0,
0});
this.NumLev.Name = "NumLev";
this.NumLev.Size = new System.Drawing.Size(50, 21);
this.NumLev.TabIndex = 15;
this.NumLev.Value = new System.Decimal(new int[] {
1,
0,
0,
0});
//
// labelLev
//
this.labelLev.Location = new System.Drawing.Point(10, 125);
this.labelLev.Name = "labelLev";
this.labelLev.Size = new System.Drawing.Size(100, 20);
this.labelLev.TabIndex = 14;
this.labelLev.Text = "起启级别:";
this.labelLev.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// LLKConfig
//
this.AcceptButton = this.Apply;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.CancelButton = this.Cannel;
this.ClientSize = new System.Drawing.Size(232, 173);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.labelLevUnit,
this.NumLev,
this.labelLev,
this.Cannel,
this.Apply,
this.labelRedoUnit,
this.NumRedo,
this.labelRedo,
this.labelHintUnit,
this.NumHint,
this.labelHint,
this.labelTimeAddUnit,
this.NumTimeAdd,
this.labelTimeAdd,
this.labelTimeMaxUnit,
this.NumTimeMax,
this.labelTimeMax});
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(240, 200);
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(240, 200);
this.Name = "LLKConfig";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "连连看参数配置";
this.Load += new System.EventHandler(this.LLKConfig_Load);
((System.ComponentModel.ISupportInitialize)(this.NumTimeMax)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NumTimeAdd)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NumHint)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NumRedo)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NumLev)).EndInit();
this.ResumeLayout(false);
}
#endregion
private void LLKConfig_Load(object sender, System.EventArgs e)
{
llk = (LLKForm)自娱自乐.LLKForm.ActiveForm ;
NumTimeMax.Value= (int)(llk.SetNumTimeMax/60) ;
NumTimeAdd.Value= llk.SetNumTimeAdd ;
NumHint.Value = llk.SetNumHint ;
NumRedo.Value = llk.SetNumRedo ;
NumLev.Value = llk.SetNumLev ;
}
private void Apply_Click(object sender, System.EventArgs e)
{
llk.SetNumTimeMax = (int)NumTimeMax.Value * 60 ;
llk.SetNumTimeAdd = (int)NumTimeAdd.Value ;
llk.SetNumHint = (int)NumHint.Value ;
llk.SetNumRedo = (int)NumRedo.Value ;
llk.SetNumLev = (int)NumLev.Value ;
Cannel_Click(sender,e);
}
private void Cannel_Click(object sender, System.EventArgs e)
{
this.Close();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -