コード例 #1
0
        private void buttonVerify_Click(object sender, EventArgs e)
        {
            string     idversion  = string.Empty;
            SBoardInfo sBoardInfo = new SBoardInfo();

            if (CoreInterface.GetBoardInfo(0, ref sBoardInfo) != 0)
            {
                //idversion = sBoardInfo.m_nBoardSerialNum.ToString();
                idversion = sBoardInfo.m_nBoardManufatureID.ToString("X4") + sBoardInfo.m_nBoardProductID.ToString("X4");
            }
            else
            {
                this.labelMSG.Visible = true;
                this.labelMSG.Image   = SystemIcons.Error.ToBitmap();
                this.labelMSG.Text    = SErrorCode.GetEnumDisplayName(typeof(COMCommand_Abort), COMCommand_Abort.IllegalPwd);
                return;
            }
            if (idversion.ToUpper() == this.textBox1.Text.Trim().ToUpper())
            {
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                this.labelMSG.Visible = true;
                this.labelMSG.Image   = SystemIcons.Error.ToBitmap();
                this.labelMSG.Text    = SErrorCode.GetEnumDisplayName(typeof(COMCommand_Abort), COMCommand_Abort.IllegalPwd);
            }
        }
コード例 #2
0
 private void buttonAdd_Click(object sender, System.EventArgs e)
 {
     if (FileName1 != null && FileName1 != string.Empty &&
         FileName2 != null && FileName2 != string.Empty &&
         FileName1 != FileName2)
     {
         SPrtFileInfo jobInfo  = new SPrtFileInfo();
         SPrtFileInfo jobInfo1 = new SPrtFileInfo();
         Int32        bret     = 0;
         bret = CoreInterface.Printer_GetFileInfo(FileName1, ref jobInfo, 0);
         if (bret == 1)
         {
             bret = CoreInterface.Printer_GetFileInfo(FileName2, ref jobInfo1, 0);
             if (bret == 1)
             {
                 if (
                     jobInfo.sImageInfo.nImageResolutionX != jobInfo1.sImageInfo.nImageResolutionX ||
                     jobInfo.sImageInfo.nImageResolutionY != jobInfo1.sImageInfo.nImageResolutionY ||
                     jobInfo.sImageInfo.nImageWidth != jobInfo1.sImageInfo.nImageWidth ||
                     jobInfo.sImageInfo.nImageHeight != jobInfo1.sImageInfo.nImageHeight
                     //|| jobInfo.sImageInfo.nImageColorNum !=jobInfo1.sImageInfo.nImageColorNum
                     || jobInfo.sImageInfo.nImageColorDeep != jobInfo1.sImageInfo.nImageColorDeep
                     )
                 {
                     string info = "俩个文件属性不匹配.[分辨率,尺寸,色深]";                            //SErrorCode.GetEnumDisplayName(typeof(Software),Software.Parser);
                     MessageBox.Show(info, ResString.GetProductName(), MessageBoxButtons.OK, MessageBoxIcon.Information);
                 }
                 else
                 {
                     this.DialogResult = DialogResult.OK;
                 }
             }
         }
         if (bret != 1)
         {
             string info = SErrorCode.GetEnumDisplayName(typeof(Software), Software.Parser);
             info += ":" + FileName1;
             MessageBox.Show(info, ResString.GetProductName(), MessageBoxButtons.OK, MessageBoxIcon.Information);
             return;
         }
     }
     else
     {
         string info = "必须选择俩个文件,而且是不同的.";                //SErrorCode.GetEnumDisplayName(typeof(Software),Software.Parser);
         MessageBox.Show(info, ResString.GetProductName(), MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }