Exemplo n.º 1
0
 public ClassCouple(UltraProbe pro, UltraWedge wed, UTPosition pos, Groove gro, int startele, int skewflag)
 {
     probe        = pro;
     wedge        = wed;
     groove       = gro;
     position     = pos;
     grooveheight = groove.height.Sum();
     beamfile     = CoupleDelay(startele, skewflag);
 }
Exemplo n.º 2
0
 public FormFocus(MainForm mainform, Groove gro, UltraWedge wed, UltraProbe pro, UTPosition pos)
 {
     InitializeComponent();
     MultiLanguage.getNames(this);
     SetDefaultGate();
     formgatesetting = new FormGateSetting(this, gateB);
     //Getpara();
     this.mainform = mainform;
     groove        = gro;
     wedge         = wed;
     probe         = pro;
     position      = pos;
     grooveheight  = groove.height.Sum();
     AutoSetpara();
 }
Exemplo n.º 3
0
        public BeamPara(ClassChanpara chanpara, Groove gro, UltraWedge wed, UltraProbe pro, UTPosition pos, GateInformation gate)
        {
            this.gate    = gate;
            xd           = chanpara.defectX;
            yd           = chanpara.defectY;
            groove       = gro;
            wedge        = wed;
            probe        = pro;
            position     = pos;
            grooveheight = groove.height.Sum();

            skewflag = GetSkewflag(chanpara.skew);
            if (chanpara.method == (int)PathMethod.Direct)
            {
                activele[0] = chanpara.activenb[0];

                linepoint[0] = Direct(xd, yd, chanpara.interfaceAngle[0]);
                index        = linepoint[0].x[1];
                centerele[0] = Centerelement(index, chanpara.interfaceAngle[0], activele[0]);
            }
            else if (chanpara.method == (int)PathMethod.Reflect)
            {
                activele[0] = chanpara.activenb[0];

                linepoint[0] = Reflect(xd, yd, chanpara.interfaceAngle[0]);
                index        = linepoint[0].x[2];
                centerele[0] = Centerelement(index, chanpara.interfaceAngle[0], activele[0]);
            }
            else if (chanpara.method == (int)PathMethod.Series)
            {
                activele[0] = chanpara.activenb[0];
                activele[1] = chanpara.activenb[1];

                linepoint[0] = Reflect(xd, yd, chanpara.interfaceAngle[0]);
                index        = linepoint[0].x[2];
                centerele[0] = Centerelement(index, chanpara.interfaceAngle[0], activele[0]);

                linepoint[1] = DoubleReflect(xd, yd, chanpara.interfaceAngle[1]);
                index        = linepoint[1].x[3];
                centerele[1] = Centerelement(index, chanpara.interfaceAngle[1], activele[1]);
            }
            CaculateFocuspoint();
            beamfile   = GetBeamfile(xd, yd, centerele, chanpara.interfaceAngle, chanpara.method);
            arrowpoint = GetArrow(linepoint, chanpara.method);
            GetPathtime(chanpara.method);
        }
Exemplo n.º 4
0
        private void init()
        {
            tabControl1.Visible = true;
            GeneralFuc.ClearTextBox(this);
            mstxtDate.Text = "00000000";

            //cmbType.SelectedItem = null;
            cmbName.SelectedItem = null;
            probe = new UltraProbe();
            dataGridView1.Rows.Clear();
            openPath          = "";
            savePath          = "";
            cache_Zr          = new List <double>();
            cache_Zi          = new List <double>();
            cache_interCouple = new List <double>();
            cacheNum          = -1;
        }
Exemplo n.º 5
0
        public FormProbe(MainForm mainform)
        {
            InitializeComponent();

            probe               = new UltraProbe();
            openPath            = "";
            savePath            = "";
            tabControl1.Visible = false;
            this.mainform       = mainform;
            cache_Zr            = new List <double>();
            cache_Zi            = new List <double>();
            cache_interCouple   = new List <double>();
            cacheNum            = -1;
            dataGridView1.Columns[0].ReadOnly = true;

            initcmbName();
        }
Exemplo n.º 6
0
        private void cmbName_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbName.SelectedItem != null && isclick)
            {
                if (MessageBox.Show("是否载入参数", "确认", MessageBoxButtons.OKCancel) == DialogResult.OK)
                {
                    string path = Application.StartupPath + "\\resources\\probe\\" + cmbName.SelectedItem.ToString() + ".xml";
                    //InitInterface();
                    GeneralFuc.ClearTextBox(this);
                    dataGridView1.Rows.Clear();
                    mstxtDate.Text = "00000000";
                    //deserialize
                    probe = SystemConfig.DeserializeFromXml(path, probe);
                    ClassToUI();

                    openPath = path;

                    isclick = false;
                    int a = cmbName.SelectedIndex;
                    if (a < 0)
                    {
                        a = 0;
                    }
                    else
                    {
                        cmbName.Items[a] = probe.name;
                    }
                }
                else
                {
                    isclick = false;
                    int a = cmbName.SelectedIndex;
                    if (a < 0)
                    {
                        a = 0;
                    }
                    else
                    {
                        cmbName.Items[a] = probe.name;
                    }
                }
            }
        }
Exemplo n.º 7
0
        private void btnOpenXml_Click(object sender, EventArgs e)
        {
            OpenFileDialog openDialog = new OpenFileDialog();

            openDialog.Title            = "";
            openDialog.InitialDirectory = Application.StartupPath + "\\resources\\probe";
            openDialog.RestoreDirectory = false;
            if (openDialog.ShowDialog() == DialogResult.OK)
            {
                openPath = openDialog.FileName;

                //InitInterface();
                GeneralFuc.ClearTextBox(this);
                dataGridView1.Rows.Clear();
                mstxtDate.Text = "00000000";
                //deserialize
                probe = SystemConfig.DeserializeFromXml(openPath, probe);
                ClassToUI();
            }
        }
Exemplo n.º 8
0
        public void FormLoad()
        {
            string filename = "probe";
            string filepath = "";

            filepath = SystemConfig.GlobalLoad(filename);

            if (filepath == "")
            {
                MessageBox.Show("探头信息配置失败", "警告");
                return;
            }

            //InitInterface();
            GeneralFuc.ClearTextBox(this);
            mstxtDate.Text = "00000000";

            //deserialize
            probe = SystemConfig.DeserializeFromXml(filepath, probe);
            ClassToUI();

            mainform.Getprobe(probe);
        }
Exemplo n.º 9
0
        private void FormProbe_FormClosing(object sender, FormClosingEventArgs e)
        {
            UltraProbe probe1 = new UltraProbe();

            if (EnsurePrm() == true)
            {
                //if (probe != probe1)
                //{
                //    if (MessageBox.Show("探头参数已改变,是否保存到文件?", "确认", MessageBoxButtons.YesNo) == DialogResult.Yes)
                //    {
                //        btnSaveXml_Click(null, null);
                //    }
                //}
                e.Cancel = true;
                this.Hide();
                mainform.Getprobe(probe);
            }
            else
            {
                e.Cancel = true;
                this.Hide();
            }
        }