public Directory(string path) { files = null; bool exists = System.IO.Directory.Exists(path); if (!exists) { return; } files = System.IO.Directory.GetFiles(path); if (table != null) { table.Clear(); } else { table = new ImgDB.FilesDataTable(); } foreach (string fi in files) { ImgDB.FilesRow f = table.NewFilesRow(); f.Path = path + "\\"; f.Filename = fi.Replace(f.Path, null); table.AddFilesRow(f); } }
private void filesBS_PositionChanged(object sender, EventArgs e) { DataRowView drv = (DataRowView)filesBS.Current; ImgDB.FilesRow first = (ImgDB.FilesRow)drv.Row; string filename = first.Filename; imagen.GetImg(filename, 5); imagen.GetImgToCompare(filename, 5); imagen.ExpandTwice(); // imagen.UIOne = imagen.imgUtil.expandedOne[0]; originalBox.Image = imagen.UIOne.Bitmap; imagen.GetBasicInfo(); basicInfoBindingSource.DataSource = imagen.BInfo.table; this.basicInfoDGV.AutoGenerateColumns = true; this.basicInfoDGV.DataSource = this.basicInfoBindingSource; // histogramBox.ZedGraphControl.SaveFileDialog.OverwritePrompt = true; // histogramBox.ZedGraphControl.SaveFileDialog.CreatePrompt = false; // histogramBox.ZedGraphControl.SaveAs(imagen.path + "\\" + imagen.curentfilename.Replace(".jpg", ".Histo.jpg")); // if (w != null) w.Dispose(); // int Codec = Emgu.Util.C('D', 'I', 'V', '3'); // w = new VideoWriter(filename + ".mp4",-1, 5, new Size(200,200), true); getRGB_Click(sender, e); threshold_Click(sender, e); lastSum = 0; imagen.imgUtil.rotated = null; }