//选择字符文件夹中的图片添加到列表 private void butOpenCharFolder(object sender, EventArgs e) { if (this.inputImageFolder.ShowDialog() == DialogResult.OK) { this.listInputImage.Clear(); List <string> files = FileIO.OpenFile(inputImageFolder.SelectedPath); foreach (string f in files) { listInputImage.Items.Add(Path.GetFileName(f)); } } else { return; } this.listShowSplitImage.Items.Clear(); this.imgListSplitImage.Images.Clear(); this.showTypes = UserSetting.ShowTypes.CHAR; this.tabControl1.TabPages[0].Enabled = false; this.tabControl1.TabPages[1].Enabled = true; this.tabControl1.SelectedTab = this.tabControl1.TabPages[1]; //初始化一下tab界面 for (int i = this.tabShowDiffImage.TabPages.Count - 1; i >= 0; i--) { this.tabShowDiffImage.TabPages.RemoveAt(i); } }
//选择待识别文件夹中的图片添加到列表 private void butOpenPlateFolder(object sender, EventArgs e) { if (UserSetting.plateSVMPath == null || UserSetting.charSVMPath == null) { MessageBox.Show("请先在设置中添加识别库"); return; } PlateCategorySVM.Load(UserSetting.plateSVMPath); CharCategorySVM.Load(UserSetting.charSVMPath); if (this.inputImageFolder.ShowDialog() == DialogResult.OK) { this.listInputImage.Clear(); List <string> files = FileIO.OpenFile(inputImageFolder.SelectedPath); foreach (string f in files) { listInputImage.Items.Add(Path.GetFileName(f)); } } else { return; } this.listShowSplitImage.Items.Clear(); this.imgListSplitImage.Images.Clear(); this.showTypes = UserSetting.ShowTypes.All; this.tabControl1.TabPages[0].Enabled = false; this.tabControl1.TabPages[1].Enabled = false; //初始化一下tab界面 for (int i = this.tabShowDiffImage.TabPages.Count - 1; i >= 0; i--) { this.tabShowDiffImage.TabPages.RemoveAt(i); } }