コード例 #1
0
        private bool InvalidCheck()
        {
            AllParam allp    = m_iPrinterChange.GetAllParam();
            float    pgW     = allp.PrinterSetting.sBaseSetting.fPaperWidth;
            float    pgH     = allp.PrinterSetting.sBaseSetting.fPaperHeight;
            float    realPgW = PubFunc.CalcRealJobWidth(pgW, this.m_iPrinterChange.GetAllParam());

            float  JobW = this.m_PreviewJob.JobSize.Width;
            string info = string.Empty;

            if (JobW > realPgW)
            {
                info += SErrorCode.GetResString("Software_MediaTooSmall");
                MessageBox.Show(info, ResString.GetProductName(), MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return(false);
            }
            return(true);
        }
コード例 #2
0
        public MeasureQuestionForm(IPrinterChange ipc, bool isMeasureBeforePrint = false)
        {
            //
            // Windows 窗体设计器支持所必需的
            //
            InitializeComponent();

            //
            // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
            //
            this.Text             = ResString.GetProductName();
            this.frmMessage.Image = SystemIcons.Question.ToBitmap();
            this.frmMessage.Text  = SErrorCode.GetResString("COMCommand_Abort_NotifyMeasure");
            mIPrinterChange       = ipc;
            AllParam allp = mIPrinterChange.GetAllParam();

            checkBoxShowAttention.Visible = SPrinterProperty.IsFloraUv() && allp.PrinterProperty.IsZMeasurSupport;

            _isMeasureBeforePrint = zAixsSetting1.IsMeasureBeforePrint = isMeasureBeforePrint;

            zAixsSetting1.CustomButtonClicked += new EventHandler <Setting.csEventArgs>(zAixsSetting1_CostomButtonClicked);
        }