public void OnRealTimeChange() { int status = 0; if (CoreInterface.GetUVStatus(ref status) != 0) { int UV_status = status & 0x33; #if DOUBLE_SIDE_PRINT_HAPOND UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxLeftSet, MapJetStatusToUVStatus((UV_status), false, false)); UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxRightSet, MapJetStatusToUVStatus((UV_status), true, false)); #else UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxLeftSet, MapJetStatusToUVStatus((UV_status), true, false)); UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxRightSet, MapJetStatusToUVStatus((UV_status), false, false)); #endif m_CheckBoxShutterLeft.Checked = ((status & 0x4) != 0); m_CheckBoxShutterRight.Checked = ((status & 0x40) != 0); #if false m_NumericUpDownDebugCur.Value = (byte)((status >> 8) & 0xff); m_CheckBoxOneLight.Checked = ((status >> 16) & 0x1) != 0; m_CheckBoxUVHighPower.Checked = ((status >> 16) & 0x2) != 0; #endif int UV_statusP = (status >> 16) & 0xf0; UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxPLeftSet, MapJetStatusToUVStatus((UV_statusP), true, true)); UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxPRightSet, MapJetStatusToUVStatus((UV_statusP), false, true)); m_checkbox_autoSwitchMode.Checked = ((status >> 16) & 0x04) != 0; } else { MessageBox.Show(ResString.GetEnumDisplayName(typeof(UIError), UIError.LoadSetFromBoardFail)); } }
public void OnPrinterSettingChange(SPrinterSetting ss) { bool bsupportwhite = (spp.nWhiteInkNum & 0x0F) > 0; bool bsupportVarnish = (spp.nWhiteInkNum >> 4) > 0; if (ss.sBaseSetting.nSpotColor1Mask == 0) { ss.sBaseSetting.nSpotColor1Mask = (ushort)0xFF00; } if (ss.sBaseSetting.nSpotColor2Mask == 0) { ss.sBaseSetting.nSpotColor2Mask = (ushort)0xFF00; } this.spotColorMaskSetting1.SpotColorMask = ss.sBaseSetting.nSpotColor1Mask; this.spotColorMaskSetting2.SpotColorMask = ss.sBaseSetting.nSpotColor2Mask; UIPreference.SetSelectIndexAndClampWithMax(this.cbo_MultipleInk, ss.sBaseSetting.multipleWriteInk); UIPreference.SetSelectIndexAndClampWithMax(this.cbo_MultipleVavishInk, ss.sExtensionSetting.multipleVanishInk); this.checkBox14plTo42pl.Checked = (ss.sBaseSetting.bitRegion & 1) != 0; radioButtonRip.Checked = ss.sExtensionSetting.bGreyRip == 1 ? true : false; for (int i = 0; i < colorNum && i < ss.sExtensionSetting.ColorGreyMask.Length; i++) { NumericUpDownGreyList[i].Value = ss.sExtensionSetting.ColorGreyMask[i] * 100 / 255; } this.isDirty = false; }
public void OnPrinterSettingChange(SPrinterSetting ss) { UIPreference.SetSelectIndexAndClampWithMax(m_NumericUpDownMoveXSpeed, ss.sMoveSetting.nXMoveSpeed - 1); UIPreference.SetSelectIndexAndClampWithMax(m_NumericUpDownMoveYSpeed, ss.sMoveSetting.nYMoveSpeed - 1); UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxZspeed, ss.sMoveSetting.nZMoveSpeed - 1); UIPreference.SetSelectIndexAndClampWithMax(m_ComboBox4speed, ss.sMoveSetting.n4MoveSpeed - 1); this.isDirty = false; }
public void OnPrinterSettingChange(SPrinterSetting ss) { bool bsupportwhite = (spp.nWhiteInkNum & 0x0F) > 0; bool bsupportVarnish = (spp.nWhiteInkNum >> 4) > 0; CheckBoxReversePrint.Checked = ss.sBaseSetting.bReversePrint; this.m_CheckBoxMirror.Checked = ss.sBaseSetting.bMirrorX; if (ss.sBaseSetting.nSpotColor1Mask == 0) { ss.sBaseSetting.nSpotColor1Mask = (ushort)0xFF00; } if (ss.sBaseSetting.nSpotColor2Mask == 0) { ss.sBaseSetting.nSpotColor2Mask = (ushort)0xFF00; } this.spotColorMaskSetting1.SpotColorMask = ss.sBaseSetting.nSpotColor1Mask; this.spotColorMaskSetting2.SpotColorMask = ss.sBaseSetting.nSpotColor2Mask; if (spp.bSupportWhiteInk) { this.comboBox1.SelectedIndex = ss.sBaseSetting.nWhiteInkLayer != 0?ss.sBaseSetting.nWhiteInkLayer - 1:0; TableModel tb = new TableModel(); string color = ResString.GetResString("EnumLayerType_Color"); string color2 = string.Format("{0}2", ResString.GetResString("EnumLayerType_Color")); string White = bsupportwhite ? ResString.GetResString("EnumLayerType_White") : color; string Varnish = bsupportVarnish?ResString.GetResString("EnumLayerType_Varnish"):color; string layer = ResString.GetResString("ColorLayer"); int layercount = ss.sBaseSetting.nWhiteInkLayer == 0?1:(int)ss.sBaseSetting.nWhiteInkLayer; for (int i = 0; i < layercount; i++) { uint layercolor = (ss.sBaseSetting.nLayerColorArray >> (2 * i)) & 0x03; switch ((EnumLayerType)layercolor) { case EnumLayerType.Color: tb.Rows.Add(new Row(new Cell[] { new Cell(layer + " " + (i + 1) + ":"), new Cell(color) })); break; case EnumLayerType.White: tb.Rows.Add(new Row(new Cell[] { new Cell(layer + " " + (i + 1) + ":"), new Cell(White) })); break; case EnumLayerType.Varnish: tb.Rows.Add(new Row(new Cell[] { new Cell(layer + " " + (i + 1) + ":"), new Cell(Varnish) })); break; default: tb.Rows.Add(new Row(new Cell[] { new Cell(layer + " " + (i + 1) + ":"), new Cell(color2) })); break; } } this.table.BeginUpdate(); this.table.TableModel = tb; this.table.TableModel.RowHeight = 21; this.table.EndUpdate(); } if (spp.bSupportWhiteInkYoffset) { this.checkBoxColorNoPrint.Checked = (ss.sBaseSetting.nLayerColorArray & 0x01) != 0; this.checkBoxWhiteNoPrint.Checked = (ss.sBaseSetting.nLayerColorArray & 0x02) != 0; this.checkBoxVarnishNoPrint.Checked = (ss.sBaseSetting.nLayerColorArray & 0x04) != 0; } UIPreference.SetSelectIndexAndClampWithMax(this.cbo_MultipleInk, ss.sBaseSetting.multipleWriteInk); this.checkBox14plTo42pl.Checked = (ss.sBaseSetting.bitRegion & 1) != 0; this.isDirty = false; }
public void OnServiceSettingChange(SSeviceSetting sSeviceSet, CaliConfig cc) { if (m_sPrinterProperty.EPSONLCD_DEFINED) { int i = 0; foreach (byte ce in m_sPrinterProperty.eColorOrder) { if (ce == cc.BaseColor) { UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxBaseColor, i); } if (ce == cc.YStepColor[0]) { UIPreference.SetSelectIndexAndClampWithMax(comboBoxYStepColor1, i); } if (ce == cc.YStepColor[1]) { UIPreference.SetSelectIndexAndClampWithMax(comboBoxYStepColor2, i); } i++; } } else { UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxBaseColor, sSeviceSet.nCalibrationHeadIndex); } if (sSeviceSet.Vsd2ToVsd3_ColorDeep >= 1 && sSeviceSet.Vsd2ToVsd3_ColorDeep <= 3) { UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxBit2Mode, sSeviceSet.Vsd2ToVsd3_ColorDeep - 1); } else { UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxBit2Mode, 0); } uint mask = 0x1; for (int j = 0; j < m_CheckedListBoxColor.Items.Count; j++) { if ((sSeviceSet.unColorMask & mask) == 0) { m_CheckedListBoxColor.SetItemChecked(j, true); } else { m_CheckedListBoxColor.SetItemChecked(j, false); } mask <<= 1; } mask = 0x1; for (int j = 0; j < m_CheckedListBoxPass.Items.Count; j++) { if ((sSeviceSet.unPassMask & mask) == 0) { m_CheckedListBoxPass.SetItemChecked(j, true); } else { m_CheckedListBoxPass.SetItemChecked(j, false); } mask <<= 1; } UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxSpeed, (int)sSeviceSet.Vsd2ToVsd3); }
////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////// /// /// public void OnPrinterPropertyChange(SPrinterProperty sp) { bool bSupperUser = (PubFunc.GetUserPermission() == (int)UserPermission.SupperUser); m_sPrinterProperty = sp; m_CheckedListBoxColor.Items.Clear(); int colornum = sp.GetRealColorNum(); for (int i = 0; i < colornum; i++) { ColorEnum color = (ColorEnum)sp.eColorOrder[i]; string cmode = ResString.GetEnumDisplayName(typeof(ColorEnum), color); m_CheckedListBoxColor.Items.Add(cmode); m_CheckedListBoxColor.SetItemChecked(i, true); } m_ComboBoxBaseColor.Items.Clear(); for (int i = 0; i < colornum; i++) { ColorEnum color = (ColorEnum)sp.eColorOrder[i]; string cmode = ResString.GetEnumDisplayName(typeof(ColorEnum), color); m_ComboBoxBaseColor.Items.Add(cmode); comboBoxYStepColor1.Items.Add(cmode); comboBoxYStepColor2.Items.Add(cmode); } m_CheckedListBoxPass.Visible = m_LabelPass.Visible = bSupperUser; UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxBaseColor, 0); UIPreference.SetSelectIndexAndClampWithMax(comboBoxYStepColor1, 0); UIPreference.SetSelectIndexAndClampWithMax(comboBoxYStepColor2, 0); m_TextBoxCleanPoint.Text = "0"; m_TextBoxBaseStep.Text = sp.nStepPerHead.ToString(); m_TextBoxCleanPoint.Visible = m_LabelBaseStep.Visible = m_TextBoxBaseStep.Visible = bSupperUser; UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxHighSpeed, sp.eSpeedMap[0]); UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxMiddleSpeed, sp.eSpeedMap[1]); UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxLowSpeed, sp.eSpeedMap[2]); m_ComboBoxHighSpeed.Visible = m_ComboBoxMiddleSpeed.Visible = m_ComboBoxLowSpeed.Visible = bSupperUser; ObjectContainer contain = new ObjectContainer(); contain.Info = null; contain.Index = -1; contain.Object = sp; contain.ObjType = sp.GetType(); m_TreeViewPrinterProperty.Tag = contain; m_TreeViewPrinterProperty.Nodes.Clear(); PubFunc.AddNode(sp.GetType().Name, sp, m_TreeViewPrinterProperty.Nodes, null, null, -1); label1.Visible = m_TreeViewPrinterProperty.Visible = bSupperUser; this.comboBoxYStepColor1.Visible = this.label4.Visible = sp.EPSONLCD_DEFINED; this.comboBoxYStepColor2.Visible = this.label5.Visible = sp.EPSONLCD_DEFINED; m_ComboBoxSpeed.Items.Clear(); foreach (SpeedEnum mode in Enum.GetValues(typeof(SpeedEnum))) { if (mode == SpeedEnum.CustomSpeed) { if (!PubFunc.IsCustomSpeedDisp(sp.ePrinterHead)) { continue; } } string cmode = ResString.GetEnumDisplayName(typeof(SpeedEnum), mode); if (SPrinterProperty.IsEpson(sp.ePrinterHead)) { cmode = "VSD_" + ((int)mode + 1).ToString(); } m_ComboBoxSpeed.Items.Add(cmode); } m_LabelHighSpeed.Visible = m_LabelMiddleSpeed.Visible = m_LabelLowSpeed.Visible = m_LabelCleanPoint.Visible = labelSpeed.Visible = m_ComboBoxSpeed.Visible = bSupperUser; //this.isDirty = false; }
public void OnPreferenceChange(UIPreference up) { m_bInitFinished = false; Initialize(); UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxViewMode, (int)up.ViewModeIndex); UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxUnit, (int)up.Unit); m_CheckBoxBeepBeforePrint.Checked = up.BeepBeforePrint; m_CheckBoxDelJobAfterPrint.Checked = up.DelJobAfterPrint; m_TextBoxWorkFolder.Text = up.WorkingFolder; checkBoxHoriMovDirReverse.Checked = up.ReverseHoriMoveDirection; checkBoxVertMovDirReverse.Checked = up.ReverseVertMoveDirection; checkBoxZMovDirReverse.Checked = up.ReverseZMoveDirection; checkBox_HotFolderPrintImmediately.Checked = up.HotFolderPrintImmediately; JobListColumnHeader[] myHeaderList = (JobListColumnHeader[])up.JobListHeaderList.Clone(); JobListColumnHeader [] array = (JobListColumnHeader[])Enum.GetValues(typeof(JobListColumnHeader)); int count = array.Length; //int count = m_CheckedListBoxJobListHeader.Items.Count; for (int i = 0; i < count; i++) { //string item = (string)m_CheckedListBoxJobListHeader.Items[i]; bool found = false; for (int j = 0; j < myHeaderList.Length; j++) { if (myHeaderList[j] == array[i]) { found = true; break; } } if (!found) { m_CheckedListBoxJobListHeader.SetItemChecked(i, false); } else { m_CheckedListBoxJobListHeader.SetItemChecked(i, true); } } bool found1 = false; for (int i = 0; i < m_LangArrayList.Count; i++) { if (up.LangIndex == (int)m_LangArrayList[i]) { found1 = true; UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxLang, i); break; } } if (!found1) { UIPreference.SetSelectIndexAndClampWithMax(m_ComboBoxLang, 0); } this.checkBoxHotFolder.Checked = up.EnableHotForlder; this.textBoxHotFolder.Text = up.HotForlderPath; this.m_CheckBoxDelFileAfterPrint.Checked = up.DelFileAfterPrint; if (up.PrintedAreaLogConfig != null && up.PrintedAreaLogConfig != string.Empty) { string[] filters = up.PrintedAreaLogConfig.Split(new char[] { '|' }); this.checkBox1.Checked = false; this.richTextBox1.Text = string.Empty; for (int i = 0; i < filters.Length; i++) { if (i == 0) { this.checkBox1.Checked = (filters[i] != string.Empty && filters[i] == "*"); } if (filters[i] != string.Empty && filters[i] != "*") { this.richTextBox1.AppendText(filters[i].Trim() + Environment.NewLine); } } } else { this.checkBox1.Checked = false; this.richTextBox1.Text = string.Empty; } this.checkBoxShowAttention.Checked = up.bShowAttentionOnLoad; checkBoxShowMeasurBeforPrint.Checked = up.bShowMeasureFormBeforPrint; UIPreference.SetSelectIndexAndClampWithMax(comCancelButtonAction, (int)up.DefaultCanleType - 1); bool bfind = false; for (int i = 0; i < comboBoxSkins.Items.Count; i++) { if (up.SkinName == comboBoxSkins.Items[i].ToString()) { comboBoxSkins.SelectedIndex = i; bfind = true; break; } } if (!bfind) { comboBoxSkins.SelectedIndex = 0; } m_bInitFinished = true; this.isDirty = false; }