Exemplo n.º 1
0
        public void OnPrinterPropertyChange(SPrinterProperty sp)
        {
            bool isT50 = SPrinterProperty.IsFloraT50();

            panelSuckEnd.Visible             =
                panelCappingY.Visible        =
                    label7.Visible           =
                        numPreOffset.Visible = isT50;
            panelCleanMotorSpeed.Visible     =
                panelCleanSlotCount.Visible  = panelCleanSlotSpace.Visible = !isT50;
            numPreOffset.Minimum             = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, 0));
            numPreOffset.Maximum             = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, sp.fMaxPaperWidth));

            numSuckStartPlace.Minimum = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, 0));
            numSuckStartPlace.Maximum = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, sp.fMaxPaperWidth));
            numSuckEndPlace.Minimum   = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, 0));
            numSuckEndPlace.Maximum   = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, sp.fMaxPaperWidth));
            numCleanPosZ.Minimum      = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, 0));
            numCleanPosZ.Maximum      = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, sp.fMaxPaperWidth));
            numCappingPosZ.Minimum    = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, 0));
            numCappingPosZ.Maximum    = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, sp.fMaxPaperWidth));
            numCappingPosY.Minimum    = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, 0));
            numCappingPosY.Maximum    = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, sp.fMaxPaperHeight));

            numPurgeInkRecoverTime.Minimum = numPurgeInkTime.Minimum = 0;
            numPurgeInkRecoverTime.Maximum = numPurgeInkTime.Maximum = int.MaxValue;
            numCleanSlotCount.Minimum      = 0;
            numCleanSlotSpace.Minimum      = 0;
            numCleanMotorSpeed.Minimum     = 0;

            numScraperStart1.Minimum = numScraperStart2.Minimum = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, 0));
            numScraperStart1.Maximum = numScraperStart2.Maximum = new Decimal(UIPreference.ToDisplayLength(m_CurrentUnit, sp.fMaxPaperWidth));
        }