Пример #1
0
        public void OnPrinterPropertyChange(SPrinterProperty sp)
        {
            spp = sp;
            this.m_GroupBoxInkStripe.Visible = sp.bSupportWhiteInk;
            this.m_groupOffset.Visible       = sp.bSupportWhiteInkYoffset;

            bool bsupportwhite   = (sp.nWhiteInkNum & 0x0F) > 0;
            bool bsupportVarnish = (sp.nWhiteInkNum >> 4) > 0;

            checkBoxWhiteNoPrint.Visible           =
                this.spotColorMaskSetting1.Visible = bsupportwhite;
            checkBoxVarnishNoPrint.Visible         =
                this.spotColorMaskSetting2.Visible = bsupportVarnish;
            if (!bsupportwhite && bsupportVarnish)
            {
                this.spotColorMaskSetting2.Location = this.spotColorMaskSetting1.Location;
            }

            this.spotColorMaskSetting1.OnPrinterPropertyChange(sp);
            this.spotColorMaskSetting2.OnPrinterPropertyChange(sp);
            this.spotColorMaskSetting1.Title = ResString.GetResString("EnumLayerType_White");
            this.spotColorMaskSetting2.Title = ResString.GetResString("EnumLayerType_Varnish");

            grouper3.Visible = false;//白墨不显示反向功能
            if (sp.bSupportWhiteInk)
            {
                this.table.BeginUpdate();
                TextColumn textColumn = new TextColumn(ResString.GetResString("ColorLayer"), table.Width / 2 - 2);
                textColumn.Editable = false;
                ComboBoxColumn comboboxColumn = new ComboBoxColumn("Ink Type", table.Width / 2 - 2);
                this.table.ColumnModel = new ColumnModel(new Column[] { textColumn, comboboxColumn });
                ComboBoxCellEditor cbeditor = (ComboBoxCellEditor)this.table.ColumnModel.GetCellEditor(1);
                cbeditor.Items.Clear();
                cbeditor.Items.Add(ResString.GetResString("EnumLayerType_Color"));
                if (bsupportwhite)
                {
                    cbeditor.Items.Add(ResString.GetResString("EnumLayerType_White"));
                }
                if (bsupportVarnish)
                {
                    cbeditor.Items.Add(ResString.GetResString("EnumLayerType_Varnish"));
                }
                cbeditor.Items.Add(string.Format("{0}2", ResString.GetResString("EnumLayerType_Color")));
                this.table.ColumnResizing = false;
                this.table.EndUpdate();

                this.comboBox1.Items.Clear();
                for (int i = 0; i < MAXLAYERCOUNT; i++)
                {
                    this.comboBox1.Items.Add(i + 1);
                }

                grouper3.Top = this.m_GroupBoxInkStripe.Bottom + 8;
            }

            if (sp.bSupportWhiteInkYoffset)
            {
                this.m_groupOffset.Location = this.m_GroupBoxInkStripe.Location;
                grouper3.Top = this.m_groupOffset.Bottom + 8;
            }

            //cbo_MultipleInk.Items.Clear();
            //foreach (MultipleInkEnum place in Enum.GetValues(typeof(MultipleInkEnum)))
            //{
            //    string cmode = ResString.GetEnumDisplayName(typeof(MultipleInkEnum), place);
            //    cbo_MultipleInk.Items.Add(cmode);
            //}
            checkBox14plTo42pl.Visible = SPrinterProperty.IsSurpportVolumeConvert(sp.ePrinterHead);
            this.isDirty = false;
        }