private void comboBox_eleType_Leave(object sender, EventArgs e)
        {
            EletrodePreparation pre = new EletrodePreparation();
            int x = int.Parse(this.textBox_preparationX.Text);
            int y = int.Parse(this.textBox_preparationY.Text);
            int z = int.Parse(this.textBox_preparationZ.Text);

            int[] temp = new int[2] {
                x, y
            };
            pre.GetPreparation(ref temp);

            this.textBox_preparationX.Text = temp[0].ToString();
            this.textBox_preparationY.Text = temp[1].ToString();
        }
        private void comboBox_eleType_Leave(object sender, EventArgs e)
        {
            if (this.comboBox_material.Text.Equals("紫铜"))
            {
                pre = new EletrodePreparation("CuLength", "CuWidth");
            }
            else
            {
                pre = new EletrodePreparation("WuLength", "WuWidth");
            }
            int x = int.Parse(this.textBox_preparationX.Text);
            int y = int.Parse(this.textBox_preparationY.Text);
            int z = int.Parse(this.textBox_preparationZ.Text);

            int[] temp = new int[2] {
                x, y
            };
            pre.GetPreparation(ref temp);

            this.textBox_preparationX.Text = temp[0].ToString();
            this.textBox_preparationY.Text = temp[1].ToString();
        }
        private void buttOK_Click(object sender, EventArgs e)
        {
            if (comboBox_eleType.Text == null || comboBox_eleType.Text == "")
            {
                UI.GetUI().NXMessageBox.Show("错误!", NXMessageBox.DialogType.Error, "请选择电极类型!");
                return;
            }
            this.preview.DeleBuilder();
            GetEleInfo();
            EletrodePreparation pre = new EletrodePreparation();
            int x = int.Parse(this.textBox_preparationX.Text);
            int y = int.Parse(this.textBox_preparationY.Text);
            int z = int.Parse(this.textBox_preparationZ.Text);

            int[] tem = new int[2] {
                x, y
            };
            eleInfo.IsPreparation = pre.GetPreparation(ref tem);
            ElectrodeFactory factory = new ElectrodeFactory(head, eleInfo);

            factory.CreateEle();
            this.Close();
        }