Example #1
0
        public void OnPreferenceChange(UIPreference up)
        {
            if (m_CurrentUnit != up.Unit)
            {
                OnUnitChange(up.Unit);
                m_CurrentUnit = up.Unit;
                //				this.isDirty = false;
            }

            if (SPrinterProperty.IsFloraUv())
            {
                numericUpDownMesureXCoor.Minimum = (decimal)UIPreference.ToDisplayLength(m_CurrentUnit, (float)(40 / 2.54));
                numericUpDownMesureXCoor.Maximum = (decimal)UIPreference.ToDisplayLength(m_CurrentUnit, (float)(350 / 2.54));

                numericUpDown7.Minimum = (decimal)UIPreference.ToDisplayLength(m_CurrentUnit, (float)(5 / 2.54));
                numericUpDown7.Maximum = (decimal)UIPreference.ToDisplayLength(m_CurrentUnit, (float)(155 / 2.54));
            }
        }
Example #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);
        }
Example #3
0
        public void OnGetPrinterSetting(ref SPrinterSetting ss, ref bool bZSettingChange)
        {
            if (SPrinterProperty.IsFloraUv())
            {
                CheckValue();
            }

            float temp = UIPreference.ToInchLength(m_CurrentUnit, Decimal.ToSingle(this.numericUpDownZspace.Value));

            if (temp != ss.ZSetting.fHeadToPaper)
            {
                ss.sBaseSetting.fZSpace = ss.ZSetting.fHeadToPaper = temp;
                bZSettingChange         = true;
            }
            if (ss.ZSetting.fMeasureSpeedZ != (short)this.numericUpDownZspeed.Value)
            {
                ss.ZSetting.fMeasureSpeedZ = (short)this.numericUpDownZspeed.Value;
                bZSettingChange            = true;
            }
            temp = UIPreference.ToInchLength(m_CurrentUnit, Decimal.ToSingle(this.numericUpDownMesureHeight.Value));
            if (temp != ss.ZSetting.fMesureHeight)
            {
                ss.ZSetting.fMesureHeight = temp;
                bZSettingChange           = true;
            }
            temp = UIPreference.ToInchLength(m_CurrentUnit, Decimal.ToSingle(this.numericUpDownZMax.Value));
            if (temp != ss.ZSetting.fMesureMaxLen)
            {
                ss.ZSetting.fMesureMaxLen = temp;
                bZSettingChange           = true;
            }
            temp = UIPreference.ToInchLength(m_CurrentUnit, Decimal.ToSingle(this.numericUpDownMesureXCoor.Value));
            if (temp != ss.ZSetting.fMesureXCoor)
            {
                ss.ZSetting.fMesureXCoor = temp;
                bZSettingChange          = true;
            }
            temp = UIPreference.ToInchLength(m_CurrentUnit, Decimal.ToSingle(this.numericUpDownSensorPosZ.Value));
            if (temp != ss.ZSetting.fSensorPosZ)
            {
                ss.ZSetting.fSensorPosZ = temp;
                bZSettingChange         = true;
            }
            temp = UIPreference.ToInchLength(m_CurrentUnit, Decimal.ToSingle(this.numericUpDown7.Value));
            if (temp != ss.ZSetting.fMesureYCoor)
            {
                ss.ZSetting.fMesureYCoor = temp;
                bZSettingChange          = true;
            }
            temp = UIPreference.ToInchLength(m_CurrentUnit, Decimal.ToSingle(this.numericUpDown8.Value));
            if (temp != ss.ZSetting.reserve1)
            {
                ss.ZSetting.reserve1 = temp;
                bZSettingChange      = true;
            }
            temp = UIPreference.ToInchLength(m_CurrentUnit, Decimal.ToSingle(m_NumericUpDownThickness.Value));
            if (temp != ss.sBaseSetting.fPaperThick)
            {
                ss.sBaseSetting.fPaperThick = temp;
                bZSettingChange             = true;
            }
        }