Exemplo n.º 1
0
        private void btnOpen_Click(object sender, EventArgs e)
        {
            OpenFileDialog fd = new OpenFileDialog(); //首先根据打开文件对话框,选择excel表格
            //      fd.Filter = "|*--Cal.txt";//打开文件对话框筛选器
            string strPath;                           //文件完整的路径名

            if (fd.ShowDialog() == DialogResult.OK)
            {
                strPath = fd.FileName;
                ProfileHelper.ReadCal(strPath, ref dataGridView1, ref dataGridView2);
            }
        }
Exemplo n.º 2
0
        public FrmCalibration()
        {
            InitializeComponent();
            addxyz(dataGridView1);
            addxyz(dataGridView2);

            string CalPath = Application.StartupPath + "\\data\\" + ModelsHelper.NowModels + "-cal.txt";         // string CalPath =$" {Application.StartupPath} //";
            var    res     = ProfileHelper.ReadCal(CalPath, ref dataGridView1, ref dataGridView2);

            if (!res)
            {
                // Global.frmMain.PushMess($"{CalPath} not find");
            }
        }