Ejemplo n.º 1
0
        private async void LoadImgShow(int pages, int stattmp)
        {
            try {
                bool loadfile = await LoadFile(stattmp);

                gArch.butLoad.Enabled = true;
                if (loadfile == true)
                {
                    if (!File.Exists(Clscheck.ScanFilePath))
                    {
                        Cledata();
                        return;
                    }
                    Himg.Filename = Clscheck.ScanFilePath;
                    Himg.LoadPage(pages);
                    ReadDict();
                    LoadContents();
                    Getuser();
                    Ispages();
                    return;
                }
                MessageBox.Show("文件加载失败或不存在!");
                Cledata();
            } catch {
                Cledata();
            }
        }
Ejemplo n.º 2
0
        private async void LoadArch()
        {
            if (ClsTwain.task)
            {
                return;
            }
            ClsTwain.task         = true;
            gArch.butLoad.Enabled = false;
            if (Common.Gettask(ClsTwain.Archid) > 0)
            {
                MessageBox.Show("正在任务中请稍后!");
                Cledata();
                return;
            }
            int stat = Common.GetArchWorkState(ClsTwain.Archid);

            if (stat >= (int)T_ConFigure.ArchStat.排序完)
            {
                MessageBox.Show("此卷已排序完成,不能再进入排序!");
                Cledata();
                return;
            }
            if (stat == (int)T_ConFigure.ArchStat.扫描中)
            {
                if (MessageBox.Show("您确认要强行进入扫描吗?", "强行进入扫描", MessageBoxButtons.OKCancel,
                                    MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) != DialogResult.OK)
                {
                    Cledata();
                    return;
                }
            }
            Himg.UserScanPage = 0;
            Common.WriteArchlog(ClsTwain.Archid, "进入案卷");
            bool loadfile = await LoadFile();

            Himg.Filename         = ClsTwain.ScanFileTmp;
            gArch.butLoad.Enabled = true;
            if (loadfile == true)
            {
                int pages = 1;
                if (!File.Exists(ClsTwain.ScanFileTmp))
                {
                    Cledata();
                    return;
                }
                Himg.LoadPage(pages);
            }
            Getuser();
            GetQspage();
            GetScanPage();
        }
Ejemplo n.º 3
0
 private void LoadFile()
 {
     try {
         if (FileName.Length <= 0)
         {
             return;
         }
         else
         {
             Himg.Filename = FileName;
             Himg.LoadPage(1);
         }
     } catch { ImgView.Image = null; }
 }