private void FrmImgOcr_Load(object sender, EventArgs e) { try { Himg._Instimagtwain(this.ImgView, this.Handle, 1); Himg._Rectang(true); } catch (Exception ex) { MessageBox.Show("初始化失败请重新加载" + ex.ToString()); Himg.Dispose(); } }
private void FrmIndex_Load(object sender, EventArgs e) { try { Init(); Himg._Instimagtwain(this.ImgView, this.Handle, 0); Himg._Rectang(true); //Writeini.Fileini = Path.Combine(Application.StartupPath, "Csmkeyval.ini"); Getsqlkey(); pub = new Pubcls(); Startocr(); } catch (Exception ex) { MessageBox.Show("初始化失败请重新加载" + ex.ToString()); Himg.Dispose(); } }
public void Init(int id) { Himg._Instimagtwain(ImgView, this.Handle, 0); if (id == 0) { UcConten.Archid = ArchId; ucContents0 = new UcConten(); ucContents0.Dock = DockStyle.Fill; ucContents0.OneClickGotoPage += UcContents0_OneClickGotoPage; gr0.Controls.Add(ucContents0); } else { UcContents.ArchId = ArchId; UcContents.ContentsEnabled = ContentsEnabled; UcContents.ModuleVisible = ModuleVisible; ucContents1 = new UcContents(); ucContents1.Dock = DockStyle.Fill; ucContents1.OneClickGotoPage += UcContents1_OneClickGotoPage; gr0.Controls.Add(ucContents1); } LoadFile(); }