Ejemplo n.º 1
0
        /**Add the chanpara*/
        public void Addpara(FormModify formModify, int cancelflag)
        {
            modifyisopen = 0;
            if (cancelflag == 0)
            {
                double        defectY  = formModify.yd;
                double        angle    = formModify.angled;
                int           channel  = chanPara.Count;
                ClassChanpara chanpara = new ClassChanpara();

                switch (groove.type)
                {
                case GrooveType.V:
                    AddVgroove(defectY, angle, formModify.method);
                    break;

                case GrooveType.X:
                    AddXgroove(defectY, angle, formModify.method);
                    break;

                case GrooveType.CRC:
                    AddCRCgroove(defectY, angle, formModify.method);
                    break;

                default:
                    MessageShow.show("testblock type error", "坡口类型错误");
                    break;
                }
                BeamRefresh();
            }
        }
Ejemplo n.º 2
0
        public void Modifypara(FormModify formModify, int cancelflag)
        {
            panelModify.Visible = false;
            if (cancelflag == 0)
            {
                int    i       = paraGrid.CurrentRow.Index;
                int    channel = (int)paraGrid.Rows[i].Cells["channel"].Value;
                double defectX = 0;
                double defectY = 0;
                double angle   = 0;

                ClassChanpara Chanpara = new ClassChanpara();
                angle   = BeamPara.TurntoRadian(testblock.VAngle);
                defectX = formModify.xd;
                defectY = testblock.BlockHeight - defectX * Math.Tan(angle);

                chanPara[channel].defectAngle[0]    = angle;
                chanPara[channel].interfaceAngle[0] = Chanpara.defectAngle[0] + testblock.VAngle - 90;;
                BeamPara beampara = new BeamPara(Chanpara, testblock, Wedge, Probe, Position);
                beamPara[channel] = beampara;
                beamlist[channel] = beampara.beamfile;

                chanPara[channel].index      = beampara.index;
                chanPara[channel].element[0] = beampara.centerele;
            }
        }
Ejemplo n.º 3
0
 private void chanAdd_Click(object sender, EventArgs e)
 {
     if (modifyisopen == 0)
     {
         FormModify myFormModify = new FormModify(this, ADDFLAG, groove, 0);
         myFormModify.Show();
         modifyisopen = 1;
     }
 }
Ejemplo n.º 4
0
        /**Open the FormModify*/
        private void paraModify_Click(object sender, EventArgs e)
        {
            int i       = paraGrid.CurrentRow.Index;
            int channel = (int)paraGrid.Rows[i].Cells["channel"].Value;

            if (modifyisopen == 0)
            {
                FormModify myFormModify = new FormModify(this, MODIFYFLAG, groove, chanPara[channel].method);
                myFormModify.Show();
                modifyisopen = 1;
            }
        }
Ejemplo n.º 5
0
        /**Change the chanpara after modify*/
        public void Modifypara(FormModify formModify, int cancelflag)
        {
            modifyisopen        = 0;
            panelModify.Visible = false;
            if (cancelflag == 0)
            {
                int i       = paraGrid.CurrentRow.Index;
                int channel = (int)paraGrid.Rows[i].Cells["channel"].Value;
                int method  = 0;

                ClassChanpara Chanpara = new ClassChanpara();
                method = chanPara[channel].method;
                chanPara[channel].defectAngle = formModify.angled;
                chanPara[channel].defectY     = formModify.yd;

                switch (groove.type)
                {
                case GrooveType.V:
                    ModifyVgroove(chanPara[channel].defectY, chanPara[channel].defectAngle, channel);
                    break;

                case GrooveType.X:
                    ModifyXgroove(chanPara[channel].defectY, chanPara[channel].defectAngle, channel);
                    break;

                case GrooveType.CRC:
                    ModifyCRCgroove(chanPara[channel].defectY, chanPara[channel].defectAngle, channel);
                    break;

                default:
                    MessageShow.show("testblock type error", "坡口类型错误");
                    break;
                }

                BeamPara beampara = new BeamPara(chanPara[channel], groove, wedge, probe, position, gateB);
                beamPara[channel] = beampara;
                beamlist[channel] = beampara.beamfile;

                chanPara[channel].delay      = beampara.pathtime - beampara.gatebefore;
                chanPara[channel].range      = 2 * beampara.gatebefore;
                chanPara[channel].index      = beampara.index;
                chanPara[channel].element[0] = beampara.centerele[0];
                if (method == (int)PathMethod.Series)
                {
                    chanPara[channel].element[1] = beampara.centerele[1];
                }

                BeamRefresh();
            }
        }
Ejemplo n.º 6
0
        private void paraModify_Click(object sender, EventArgs e)
        {
            FormModify myFormModify = new FormModify(this);

            myFormModify.Show();
        }