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; using PaintDotNet.Annotation.ImageCollect; using PaintDotNet.ImageCollect.CameraEDOF; using StageController; namespace PaintDotNet.ImageCollect.MultiDimensiona { public partial class ZAxisSettingDialog : Form { public event Action ZAxisSetting; private ParameterOneControl m_zscanSetting; private int m_index; private AxisController m_Stage; public ZAxisSettingDialog( int index, ZScanParameter zscan) { InitializeComponent(); InitializeLanguageText(); m_index = index; m_Stage = AxisController.GetInstance(); m_zscanSetting = new ParameterOneControl(m_Stage, zscan); m_zscanSetting.Location = new Point(40, 30); groupBox2.Controls.Add(m_zscanSetting); } #region 控件 /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } // Windows Form Designer generated code private void InitializeLanguageText() { this.groupBox1.Text = PdnResources.GetString("Menu.operation.text"); this.button3.Text = PdnResources.GetString("Menu.cancel.text"); this.btnOK.Text = PdnResources.GetString("Menu.ensure.text"); this.btnAllOK.Text = PdnResources.GetString("Menu.Alluse.Text"); this.groupBox2.Text = PdnResources.GetString("Menu.paramssettings.text"); this.Text = PdnResources.GetString("Menu.Zaxis.text") + PdnResources.GetString("Menu.Setting.Text"); } /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.groupBox1 = new System.Windows.Forms.GroupBox(); this.button3 = new System.Windows.Forms.Button(); this.btnOK = new System.Windows.Forms.Button(); this.btnAllOK = new System.Windows.Forms.Button(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox1.SuspendLayout(); this.SuspendLayout(); // // groupBox1 // this.groupBox1.Controls.Add(this.button3); this.groupBox1.Controls.Add(this.btnOK); this.groupBox1.Controls.Add(this.btnAllOK); this.groupBox1.Location = new System.Drawing.Point(12, 12); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(483, 83); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // // button3 // this.button3.Location = new System.Drawing.Point(372, 30); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(91, 33); this.button3.TabIndex = 2; this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.button3_Click); // // btnOK // this.btnOK.Location = new System.Drawing.Point(264, 30); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(91, 33); this.btnOK.TabIndex = 1; this.btnOK.UseVisualStyleBackColor = true; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // // btnAllOK // this.btnAllOK.Location = new System.Drawing.Point(154, 30); this.btnAllOK.Name = "btnAllOK"; this.btnAllOK.Size = new System.Drawing.Size(91, 33); this.btnAllOK.TabIndex = 0; this.btnAllOK.UseVisualStyleBackColor = true; this.btnAllOK.Click += new System.EventHandler(this.btnAllOK_Click); // // groupBox2 // this.groupBox2.Location = new System.Drawing.Point(12, 101); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(483, 435); this.groupBox2.TabIndex = 1; this.groupBox2.TabStop = false; // // ZAxisSettingDialog // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(507, 544); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Name = "ZAxisSettingDialog"; this.groupBox1.ResumeLayout(false); this.ResumeLayout(false); } private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Button button3; private System.Windows.Forms.Button btnOK; private System.Windows.Forms.Button btnAllOK; private System.Windows.Forms.GroupBox groupBox2; #endregion private void button3_Click(object sender, EventArgs e) { this.Close(); } private void btnAllOK_Click(object sender, EventArgs e) { m_index = 999999; this.Callback(); } private void btnOK_Click(object sender, EventArgs e) { this.Callback(); } private void Callback() { if (ZAxisSetting != null) { var zscanparm = m_zscanSetting.ZScanParameter; ZAxisSetting(zscanparm, m_index); } this.Close(); } } }