Example #1
0
 private void toolStripButton7_Click(object sender, EventArgs e)
 {
     try
     {
         using (CLDDataRetrieval form = new CLDDataRetrieval())
         {
             if (form.ShowDialog() == DialogResult.OK)
             {
                 AddFileToListBox(DataReader.FileSelectedList.ToArray(), listBox2, comboBox2);
                 CalcSample(listBox2, txtrightRatio);
             }
         }
     }
     catch (System.Exception ex)
     {
         toolStripStatusLabel1.Text = ex.Message;
     }
 }
Example #2
0
        private void GetSelectFiles(DataGridView gridRows, string xml)//bool isDayFile,
        {
            _fileSelectedList.Clear();
            //string dir = null;// dbargs.OutputDir;
            //int col;
            //if (isDayFile)
            //    col = 4;
            //else
            //    col = 7;
            string name = "文件路径", dir;
            int    col = -1;

            foreach (DataGridViewColumn cln in gridRows.Columns)
            {
                if (cln.HeaderText == name)
                {
                    col = cln.DisplayIndex;
                    break;
                }
            }
            if (col == -1)
            {
                return;
            }
            string localfname, fname;

            foreach (DataGridViewRow r in gridRows.Rows)
            {
                if (r.Selected)
                {
                    localfname = r.Cells[col].Value.ToString();
                    if (!string.IsNullOrEmpty(localfname))
                    {
                        dir   = CLDDataRetrieval.GetRootPathFromName(localfname);
                        fname = Path.Combine(dir, localfname.TrimStart('\\'));
                        _fileSelectedList.Add(fname);
                    }
                }
            }
        }
Example #3
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     try
     {
         using (CLDDataRetrieval form = new CLDDataRetrieval())
         {
             if (form.ShowDialog() == DialogResult.OK)
             {
                 foreach (string dbfile in DataReader.FileSelectedList.ToArray())
                 {
                     //if (!File.Exists(dbfile))
                     //    throw new FileLoadException(dbfile + "文件不存在,请确认归档路径设置正确!");
                 }
                 listBox1.Items.Clear();
                 AddFileToListBox(DataReader.FileSelectedList.ToArray(), listBox1, lvBands);
             }
         }
     }
     catch (SystemException ex)
     {
         _state(0, ex.Message);
     }
 }
Example #4
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     try
     {
         using (CLDDataRetrieval form = new CLDDataRetrieval())
         {
             if (form.ShowDialog() == DialogResult.OK)
             {
                 foreach (string dbfile in DataReader.FileSelectedList.ToArray())
                 {
                     //if (!File.Exists(dbfile))
                     //    throw new FileLoadException(dbfile + "文件不存在,请确认归档路径设置正确!");
                 }
                 listBox1.Items.Clear();
                 AddFileToListBox(DataReader.FileSelectedList.ToArray(), listBox1, comboBox1);
                 CalcSample(listBox1, txtleftRatio);
             }
         }
     }
     catch (System.Exception ex)
     {
         toolStripStatusLabel1.Text = ex.Message;
     }
 }