| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 | using PaintDotNet;using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;namespace Metis.DedicatedAnalysis.Inclusions{    public partial class InclusionViewSetting : PdnBaseForm    {        private Label label1;        private GroupBox groupBox1;        private Button button1;        private Button btn_close;        private NumericUpDown numericUpDown1;        private System.Action<int> closeCallback;        private int viewNum;        public InclusionViewSetting(int viewNum ,System.Action<int> closeCallback)        {            InitializeComponent();            this.closeCallback = closeCallback;            this.viewNum = viewNum;            Initialize();        }        private void InitializeComponent()        {            this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();            this.label1 = new System.Windows.Forms.Label();            this.groupBox1 = new System.Windows.Forms.GroupBox();            this.button1 = new System.Windows.Forms.Button();            this.btn_close = new System.Windows.Forms.Button();            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();            this.groupBox1.SuspendLayout();            this.SuspendLayout();            //             // numericUpDown1            //             this.numericUpDown1.DecimalPlaces = 0;            this.numericUpDown1.Location = new System.Drawing.Point(69, 87);            this.numericUpDown1.Maximum = new decimal(new int[] {            1241513983,            370409800,            542101,            0});            this.numericUpDown1.Name = "numericUpDown1";            this.numericUpDown1.Size = new System.Drawing.Size(111, 21);            this.numericUpDown1.TabIndex = 7;            this.numericUpDown1.Value = new decimal(new int[] {            71,            0,            0,            0});            //             // label1            //             this.label1.AutoSize = true;            this.label1.Location = new System.Drawing.Point(10, 89);            this.label1.Name = "label1";            this.label1.Size = new System.Drawing.Size(53, 12);            this.label1.TabIndex = 8;            this.label1.Text = "视场边长";            //             // groupBox1            //             this.groupBox1.Controls.Add(this.button1);            this.groupBox1.Controls.Add(this.btn_close);            this.groupBox1.Location = new System.Drawing.Point(12, 3);            this.groupBox1.Name = "groupBox1";            this.groupBox1.Size = new System.Drawing.Size(369, 53);            this.groupBox1.TabIndex = 13;            this.groupBox1.TabStop = false;            //             // button1            //             this.button1.Location = new System.Drawing.Point(198, 20);            this.button1.Name = "button1";            this.button1.Size = new System.Drawing.Size(75, 23);            this.button1.TabIndex = 5;            this.button1.Text = "恢复默认";            this.button1.UseVisualStyleBackColor = true;            this.button1.Click += new System.EventHandler(this.button1_Click);            //             // btn_close            //             this.btn_close.Location = new System.Drawing.Point(279, 20);            this.btn_close.Name = "btn_close";            this.btn_close.Size = new System.Drawing.Size(75, 23);            this.btn_close.TabIndex = 4;            this.btn_close.Text = "保存修改";            this.btn_close.UseVisualStyleBackColor = true;            this.btn_close.Click += new System.EventHandler(this.btn_close_Click);            //             // InclusionViewSetting            //             this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);            this.ClientSize = new System.Drawing.Size(393, 149);            this.Controls.Add(this.groupBox1);            this.Controls.Add(this.label1);            this.Controls.Add(this.numericUpDown1);            this.MaximizeBox = false;            this.MinimizeBox = false;            this.Name = "InclusionViewSetting";            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;            this.Text = "视场设置";            this.Controls.SetChildIndex(this.numericUpDown1, 0);            this.Controls.SetChildIndex(this.label1, 0);            this.Controls.SetChildIndex(this.groupBox1, 0);            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();            this.groupBox1.ResumeLayout(false);            this.ResumeLayout(false);            this.PerformLayout();        }        private void Initialize() {            this.FormClosed += new FormClosedEventHandler(formClosed);            this.numericUpDown1.Value = viewNum;        }        private void button1_Click(object sender, EventArgs e)        {            this.numericUpDown1.Value = 710;        }        private void btn_close_Click(object sender, EventArgs e)        {            this.viewNum = (int)this.numericUpDown1.Value;            this.Close();        }        private void formClosed(object sender, EventArgs e)        {            this.closeCallback(viewNum);        }    }}
 |