public AboutWaveForm(AllParam param) { this.m_Param = param; InitializeComponent(); m_WaveformList = new ArrayList(256); InitContentAtUI(); }
public void OnPrinterSettingChange(AllParam allParam) { for (int i = 0; i < m_ColorNumAndColumnNum; i++) { this.m_TextBoxVer[i].Value = (decimal)allParam.PrintQualityUI.VerticalOffset[i]; } }
/// <summary> /// 获取界面中设定的值 /// </summary> /// <param name="ss"></param> public void OnGetPrinterSetting(AllParam allParam) { allParam.sPS_lecai.nForwardDis = Decimal.ToUInt32(this.numericUpDownFeedDistance.Value); allParam.sPS_lecai.nZSensorOffset = Decimal.ToUInt32(this.numericUpDownZSensorOffset.Value); allParam.sPS_lecai.nDefaultPos = Decimal.ToUInt32(this.numericUpDownZDefaultPos.Value); this.isDirty = true; }
/// <summary> /// 控件显示更新 /// </summary> /// <param name="ss"></param> public void OnPrinterSettingChange(AllParam allParam) { UIPreference.SetValueAndClampWithMinMax(this.numericUpDownFeedDistance, allParam.sPS_lecai.nForwardDis); UIPreference.SetValueAndClampWithMinMax(this.numericUpDownZSensorOffset, allParam.sPS_lecai.nZSensorOffset); UIPreference.SetValueAndClampWithMinMax(this.numericUpDownZDefaultPos, allParam.sPS_lecai.nDefaultPos); this.isDirty = false; }
public void OnGetPrinterSetting(ref AllParam allParam) { allParam.PrintQualityUI.VerticalOffset = new float[CoreConst.MAX_HEAD_NUM * 2]; for (int i = 0; i < m_ColorNumAndColumnNum; i++) { allParam.PrintQualityUI.VerticalOffset[i] = (float)this.m_TextBoxVer[i].Value; } }
public void OnGetPrinterSetting(ref AllParam ss) { //ushort[] validnum = new ushort[CoreConst.MAX_HEAD_NUM * maxColor]; //byte[] fwData = new byte[CoreConst.MAX_HEAD_NUM * maxColor * 3]; ss.NozzleOverlap = SaveData(); ss.Preference.CloseNozzleSetMode = (byte)comboBox_model.SelectedIndex; curNO = ss.NozzleOverlap; }
public void OnPrinterSettingChange(AllParam ss) { SynchFromCalib(ref ss); curNO = ss.NozzleOverlap; CurrentModel = (CloseColorNozzleModelEnum)ss.Preference.CloseNozzleSetMode; comboBox_model.SelectedIndex = (int)ss.Preference.CloseNozzleSetMode; ss.NozzleOverlap = GetDefaultNozzleOverlap(CurrentModel); LoadData(ss.NozzleOverlap); loadDataDone = true; }
public void OnGetPrinterSetting(ref AllParam allParam, ref bool bChangeProperty) { if (m_bNewXaar382) { this.xaarTempertureSetting1.OnGetPrinterSetting(ref allParam.PrinterSetting); } else { m_KonicTemperatureSetting1.OnGetPrinterSetting(ref allParam.PrinterSetting); } }
/// <summary> /// 获取界面中设定的值 /// </summary> /// <param name="ss"></param> public void OnGetPrinterSetting(AllParam allParam) { allParam.s3DPrint.nZDownDis = (uint)(UIPreference.ToInchLength(m_CurrentUnit, (float)this.m_NumericUpDown_3DZDownDis.Value) * allParam.PrinterProperty.fPulsePerInchZ); #if false allParam.s3DPrint.nSandDis = Decimal.ToUInt32(this.m_NumericUpDown_3DSandDis.Value); allParam.s3DPrint.nFusionTime = Decimal.ToUInt32(this.m_NumericUpDown_3DFusionTime.Value); allParam.s3DPrint.byteSandSpeed = Decimal.ToByte(this.m_NumericUpDown_3DSandSpeed.Value); #endif allParam.PrinterSetting.sBaseSetting.fZAdjustmentDistance = UIPreference.ToInchLength(m_CurrentUnit, Decimal.ToSingle(this.m_NumericUpDown_ZAdjustment.Value)); this.cleanSetting3D1.OnGetPrinterSetting(allParam); }
public void OnPrinterSettingChange(AllParam allParam) { this.cmb_UvLightType.SelectedIndex = allParam.PrinterSetting.UVSetting.eUvLightType >= cmb_UvLightType.Items.Count ? 0 : allParam.PrinterSetting.UVSetting.eUvLightType; var uvPowerLeverMap = allParam.UvPowerLevelMap; numericOnReadyOff.Value = uvPowerLeverMap.LeftL1PowerOnReady; numericOnReadyLow.Value = uvPowerLeverMap.LeftL2PowerOnReady; numericOnReadyMid.Value = uvPowerLeverMap.LeftL3PowerOnReady; numericOnReadyHigh.Value = uvPowerLeverMap.LeftL4PowerOnReady; numericOnPrintOff.Value = uvPowerLeverMap.LeftL1PowerOnPrint; numericOnPrintLow.Value = uvPowerLeverMap.LeftL2PowerOnPrint; numericOnPrintMid.Value = uvPowerLeverMap.LeftL3PowerOnPrint; numericOnPrintHigh.Value = uvPowerLeverMap.LeftL4PowerOnPrint; }
public void OnPrinterSettingChange(AllParam allParam) { try { SPrinterSetting ss = allParam.PrinterSetting; EpsonExAllParam epsonAllparam = allParam.EpsonAllParam; if (allParam.PrinterProperty.EPSONLCD_DEFINED) { m_epsonBaseSetting.OnPrinterSettingChange(ss, epsonAllparam); } else { m_BaseSetting.OnPrinterSettingChange(ss); } m_BaseSetting.OnExtendedSettingsChange(allParam.ExtendedSettings); if (this.m_TabControlSetting.TabPages.Contains(this.m_TabPageCaliSetting)) { m_CalibrationSetting.OnPrinterSettingChange(allParam); } m_SeviceSetting.OnPrinterSettingChange(ss, epsonAllparam.sCaliConfig); m_SeviceSetting.OnServiceSettingChange(allParam.SeviceSetting, epsonAllparam.sCaliConfig); //m_RealTimeSetting.OnPrinterSettingChange(ss); m_MoveSetting.OnPrinterSettingChange(ss); spotColorSetting1.OnPrinterSettingChange(ss); spotColorSetting1.OnExtendedSettingsChange(allParam.ExtendedSettings); this.doublePrintSetting1.OnScorpionSettingsChanged(allParam.DoubleSidePrint); this.m_Printer3DSetting.OnPrinterSettingChange(allParam); this.userExtensionSetting.OnPrinterSettingChange(allParam); defineUVPowerLevel1.OnPrinterSettingChange(allParam); closeColorNozzle1.OnPrinterSettingChange(allParam); customCloseNozzle1.OnPrinterSettingChange(ss); if (SPrinterProperty.IsJianRui()) { workposSetting1.OnPrinterSettingChange(allParam.PrinterSetting); } if (PubFunc.SupportDebugQuality()) { debugQuality1.OnPrinterSettingChange(allParam); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void GetPrintableArea(out float Area, out float height) { AllParam mAllParam = _printerChange.GetAllParam(); float mediaHeight = mAllParam.PrinterSetting.sBaseSetting.fPaperHeight; float mediaWidth = mAllParam.PrinterSetting.sBaseSetting.fPaperWidth; float origin = mAllParam.PrinterSetting.sFrequencySetting.fXOrigin; float originY = mAllParam.PrinterSetting.sBaseSetting.fYOrigin; float xPaperLeft = mAllParam.PrinterSetting.sBaseSetting.fLeftMargin; float xPaperTop = mAllParam.PrinterSetting.sBaseSetting.fTopMargin; float inkstripeWidth = GetInkStripeWidth(mAllParam.PrinterSetting.sBaseSetting.sStripeSetting); float usableWidth = xPaperLeft + mediaWidth - origin - inkstripeWidth; float usableHeight = xPaperTop + mediaWidth - originY; Area = usableWidth; height = usableHeight; }
static void Main() { // enable XP theme support Application.EnableVisualStyles(); Application.DoEvents(); const string MUTEX = CoreConst.c_MUTEX_App; bool createdNew = false; Mutex mutex = new Mutex(true, MUTEX, out createdNew); if (!createdNew) { MessageBox.Show(ResString.GetEnumDisplayName(typeof(UIError), UIError.OnlyOneProgram)); mutex.Close(); return; } #if EpsonLcd int lcid = PubFunc.GetLanguage(); if (lcid == -1) { // 未连接usb线,无法获取软件语言,启动终止. MessageBox.Show(ResString.GetResString("NoFoundUSBReturn"), ResString.GetProductName(), MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } #else AllParam cur = new AllParam(); int lcid = cur.GetLanguage(); #endif Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); Thread.CurrentThread.CurrentUICulture = new CultureInfo(lcid); #if true PrinterWrite mainWin = new PrinterWrite(); if (mainWin.Start()) { Application.Run(mainWin); } #else FormHeadBoard hb = new FormHeadBoard(); Application.Run(hb); #endif mutex.Close(); }
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); }
/// <summary> /// 控件显示更新 /// </summary> /// <param name="ss"></param> public void OnPrinterSettingChange(AllParam allParam) { //UIPreference.SetValueAndClampWithMinMax(this.m_NumericUpDown_3DZDownDis, m_CurrentUnit, ss.sExtensionSetting.s3DPrint.fZDownDis); //UIPreference.SetValueAndClampWithMinMax(this.m_NumericUpDown_3DSandDis, m_CurrentUnit, ss.sExtensionSetting.s3DPrint.fSandDis); if (allParam.PrinterProperty.fPulsePerInchZ > 0) { UIPreference.SetValueAndClampWithMinMax(this.m_NumericUpDown_3DZDownDis, m_CurrentUnit, allParam.s3DPrint.nZDownDis / allParam.PrinterProperty.fPulsePerInchZ); } #if false UIPreference.SetValueAndClampWithMinMax(this.m_NumericUpDown_3DSandDis, ss.sExtensionSetting.s3DPrint.nSandDis); UIPreference.SetValueAndClampWithMinMax(this.m_NumericUpDown_3DFusionTime, ss.sExtensionSetting.s3DPrint.nFusionTime); UIPreference.SetValueAndClampWithMinMax(this.m_NumericUpDown_3DSandSpeed, ss.sExtensionSetting.s3DPrint.byteSandSpeed); #endif UIPreference.SetValueAndClampWithMinMax(this.m_NumericUpDown_ZAdjustment, m_CurrentUnit, allParam.PrinterSetting.sBaseSetting.fZAdjustmentDistance); this.cleanSetting3D1.OnPrinterSettingChange(allParam); this.isDirty = false; }
public TipsWizard(AllParam parentParam) { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // //SetScale(); this.Width = Screen.PrimaryScreen.Bounds.Width - 200; this.Height = Screen.PrimaryScreen.Bounds.Height - 200; InitializeLocalize(); checkBoxShowAttention.Checked = !parentParam.Preference.bShowAttentionOnLoad; m_param = parentParam; }
public void OnPrinterSettingChange(AllParam allParam) { numAutoClean.Value = allParam.s3DPrint.rate; numPurgeX.Value = allParam.s3DPrint.purge.Xpos; numPurgeY.Value = allParam.s3DPrint.purge.Ypos; numPurgeDelayTime.Value = allParam.s3DPrint.purge.DelaySeconds; numWipeX.Value = allParam.s3DPrint.wipe.Xpos; numWipeY.Value = allParam.s3DPrint.wipe.Ypos; numWipeDelayTime.Value = allParam.s3DPrint.wipe.DelaySeconds; numericSandX.Value = allParam.s3DPrint.sand.Xpos; numericSandY.Value = allParam.s3DPrint.sand.Ypos; numericCleanX.Value = allParam.s3DPrint.clean.Xpos; numericCleanY.Value = allParam.s3DPrint.clean.Ypos; comboBoxCleanXSpeed.SelectedIndex = allParam.s3DPrint.clean.Xspeed; comboBoxCleanYSpeed.SelectedIndex = allParam.s3DPrint.clean.Yspeed; }
public void OnGetPrinterSetting(AllParam allParam) { allParam.s3DPrint.rate = (uint)numAutoClean.Value; allParam.s3DPrint.purge.Xpos = (uint)numPurgeX.Value; allParam.s3DPrint.purge.Ypos = (uint)numPurgeY.Value; allParam.s3DPrint.purge.DelaySeconds = (uint)numPurgeDelayTime.Value; allParam.s3DPrint.wipe.Xpos = (uint)numWipeX.Value; allParam.s3DPrint.wipe.Ypos = (uint)numWipeY.Value; allParam.s3DPrint.wipe.DelaySeconds = (uint)numWipeDelayTime.Value; allParam.s3DPrint.sand.Xpos = (uint)numericSandX.Value; allParam.s3DPrint.sand.Ypos = (uint)numericSandY.Value; allParam.s3DPrint.clean.Xpos = (uint)numericCleanX.Value; allParam.s3DPrint.clean.Ypos = (uint)numericCleanY.Value; allParam.s3DPrint.clean.Xspeed = (ushort)comboBoxCleanXSpeed.SelectedIndex; allParam.s3DPrint.clean.Yspeed = (ushort)comboBoxCleanYSpeed.SelectedIndex; }
public bool Start() { CoreInterface.SystemInit(); if (CoreInterface.SetMessageWindow(this.Handle, m_KernelMessage) == 0) { return(false); } m_allParam = new AllParam(); CoreInterface.AllParams = m_allParam; m_allParam.LoadFromXml(null, true); OnPreferenceChange(m_allParam.Preference); OnPrinterPropertyChange(m_allParam.PrinterProperty); OnPrinterSettingChange(m_allParam.PrinterSetting); //Must after printer property because status depend on property sensor measurepaper JetStatusEnum status = CoreInterface.GetBoardStatus(); OnPrinterStatusChanged(status); return(true); }
private float CalcRealJobWidth(UILengthUnit unit, float jobwidth) { float ret = 0; AllParam allparam = this.m_iPrinterChange.GetAllParam(); float orginX = allparam.PrinterSetting.sFrequencySetting.fXOrigin; float colorbarspace = allparam.PrinterSetting.sBaseSetting.sStripeSetting.fStripeOffset; float colorbarwidth = allparam.PrinterSetting.sBaseSetting.sStripeSetting.fStripeWidth; InkStrPosEnum place = allparam.PrinterSetting.sBaseSetting.sStripeSetting.eStripePosition; float pw = allparam.PrinterSetting.sBaseSetting.fPaperWidth; switch (place) { case InkStrPosEnum.Both: ret = (colorbarwidth + colorbarspace) * 2 + jobwidth; if (orginX + ret > pw) { ret = pw - orginX; } break; case InkStrPosEnum.Left: case InkStrPosEnum.Right: ret = (colorbarwidth + colorbarspace) + jobwidth; if (orginX + ret > pw) { ret = pw - orginX; } break; case InkStrPosEnum.None: ret = jobwidth; if (orginX + ret > pw) { ret = pw - orginX; } break; } return(ret); }
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); }
private void SynchFromCalib(ref AllParam ss) { int m_ColorNum = CoreInterface.GetLayoutColorNum(); int m_ColorNumAndColumnNum = m_ColorNum * m_HorColumnNum; SNozzleOverlap n = ss.NozzleOverlap; int rowNum = CoreInterface.GetRowNum(); if (rowNum > 1) { rowNum--; } int MaxColorNum = 32;//SNozzleOverlap结构体为32色*32组 for (int i = 0; i < m_ColorNumAndColumnNum; i++) { for (int j = 0; j < rowNum; j++) { n.OverLapTotalNozzle[j * MaxColorNum + i] = (ushort)(ss.PrinterSetting.sCalibrationSetting.nVerticalArray[(j + 1) * m_ColorNumAndColumnNum + i]); } } ss.NozzleOverlap = n; }
private void btnApply_Click(object sender, EventArgs e) { AllParam allParam = _printerChange.GetAllParam(); if (_useNewFunction) { SBiSideSetting sideSetting = new SBiSideSetting(); sideSetting.fLeftTotalAdjust = UIPreference.ToInchLength(_mCurrentUnit, (float)numLeftUp.Value); sideSetting.fRightTotalAdjust = UIPreference.ToInchLength(_mCurrentUnit, (float)numRightUp.Value); sideSetting.fxTotalAdjust = UIPreference.ToInchLength(_mCurrentUnit, (float)numLr.Value); //sideSetting.fyTotalAdjust = UIPreference.ToInchLength(_mCurrentUnit, (float)numFb.Value); sideSetting.fStepAdjust = UIPreference.ToInchLength(_mCurrentUnit, (float)numAdjustStep.Value); float fXRightHeadToCurosr = UIPreference.ToInchLength(_mCurrentUnit, (float)numCursorPosX.Value); // 表示最右喷头到光标安装位置的X 偏差 float fYRightHeadToCurosr = UIPreference.ToInchLength(_mCurrentUnit, (float)numCursorPosY.Value); // 表示最右喷头到光标安装位置的Y 偏差 // 此处不可省略,且必须在SetCurPosSBideSetting之前设置,否则x原点变更会被覆盖 this.OnGetPrinterSetting(ref allParam.PrinterSetting); CoreInterface.SetPrinterSetting(ref allParam.PrinterSetting); CoreInterface.SetCurPosSBideSetting(ref sideSetting, fXRightHeadToCurosr, fYRightHeadToCurosr); this.Close(); } else { SBiSideSetting sideSetting = new SBiSideSetting(); sideSetting.fLeftTotalAdjust = UIPreference.ToInchLength(_mCurrentUnit, (float)numLeftUp.Value); sideSetting.fRightTotalAdjust = UIPreference.ToInchLength(_mCurrentUnit, (float)numRightUp.Value); sideSetting.fxTotalAdjust = UIPreference.ToInchLength(_mCurrentUnit, (float)numLr.Value); sideSetting.fyTotalAdjust = UIPreference.ToInchLength(_mCurrentUnit, (float)numFb.Value); sideSetting.fStepAdjust = UIPreference.ToInchLength(_mCurrentUnit, (float)numAdjustStep.Value); CoreInterface.SetSBiSideSetting(ref sideSetting); this._adjustTimer.Start(); } this.OnGetExtendedSettings(ref allParam.ExtendedSettings); }
static void Main() { // enable XP theme support Application.EnableVisualStyles(); Application.DoEvents(); //Application.Run(new AboutForm()); //Application.Run(new CaliWizard()); //Application.Run(new Updater()); //Application.Run(new PasswordForm()); //Application.Run(new CleanForm()); //SetLanguage(); //Chinese XP system if (((System.Globalization.CultureInfo.InstalledUICulture.LCID & 0xff) == 04) && System.Environment.OSVersion.Version.Major == 5 && System.Environment.OSVersion.Version.Minor == 1) { string filename = System.Environment.SystemDirectory + Path.DirectorySeparatorChar + "conime.exe"; if (File.Exists(filename)) { System.Diagnostics.ProcessStartInfo Info = new System.Diagnostics.ProcessStartInfo(); Info.FileName = filename; System.Diagnostics.Process Proc; try { Proc = System.Diagnostics.Process.Start(Info); } catch (System.ComponentModel.Win32Exception e) { return; } //等待3秒钟 //Proc.WaitForExit(3000); } } AllParam cur = new AllParam(); int lcid = cur.GetLanguage(); //string name = "en-US"; //name = "zh-chs"; //name = "zh-cht"; const string MUTEX = CoreConst.c_MUTEX_App; bool createdNew = false; Mutex mutex = new Mutex(true, MUTEX, out createdNew); Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); Thread.CurrentThread.CurrentUICulture = new CultureInfo(lcid); if (!createdNew) { MessageBox.Show(ResString.GetEnumDisplayName(typeof(UIError), UIError.OnlyOneProgram)); mutex.Close(); return; } try { MainForm mainWin = new MainForm(); Application.AddMessageFilter(mainWin); if (mainWin.Start()) { Application.Run(mainWin); } mutex.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void OnGetPrinterSetting(ref AllParam allParam, ref bool bChangeProperty) { try { if (_printerProperty.EPSONLCD_DEFINED) { m_epsonBaseSetting.OnGetPrinterSetting(ref allParam.PrinterSetting, ref allParam.EpsonAllParam); } else { m_BaseSetting.OnGetPrinterSetting(ref allParam.PrinterSetting); } m_BaseSetting.OnGetExtendedSettingsChange(ref allParam.ExtendedSettings); if (this.m_TabControlSetting.TabPages.Contains(this.m_TabPageCaliSetting)) { m_CalibrationSetting.OnGetPrinterSetting(allParam); } m_PreferenceSetting.OnGetPreference(ref allParam.Preference); m_SeviceSetting.OnGetProperty(ref allParam.PrinterProperty, ref bChangeProperty); //m_RealTimeSetting.OnGetPrinterSetting(ref allParam.PrinterSetting); m_MoveSetting.OnGetPrinterSetting(ref allParam.PrinterSetting); if (allParam.PrinterProperty.bSupportWhiteInk || allParam.PrinterProperty.bSupportWhiteInkYoffset) { spotColorSetting1.OnGetPrinterSetting(ref allParam.PrinterSetting); spotColorSetting1.OnGetExtendedSettingsChange(ref allParam.ExtendedSettings); } if (_printerProperty.EPSONLCD_DEFINED) { m_SeviceSetting.OnGetServiceSetting(ref allParam.EpsonAllParam.sCaliConfig); EpsonLCD.SetCaliConfig(allParam.EpsonAllParam.sCaliConfig); } //else { SSeviceSetting sSeviceSet = allParam.SeviceSetting; m_SeviceSetting.OnGetServiceSetting(ref sSeviceSet); if (allParam.Preference.ScanningAxis == CoreConst.AXIS_X || allParam.Preference.ScanningAxis == CoreConst.AXIS_4) { sSeviceSet.scanningAxis = allParam.Preference.ScanningAxis; } else { sSeviceSet.scanningAxis = CoreConst.AXIS_X; } CoreInterface.SetSeviceSetting(ref sSeviceSet); allParam.SeviceSetting = sSeviceSet; } SDoubleSidePrint doubleSide = allParam.DoubleSidePrint; doublePrintSetting1.OnGetScorpionSettings(ref doubleSide); allParam.DoubleSidePrint = doubleSide; //获取3D打印页签中的控件值 m_Printer3DSetting.OnGetPrinterSetting(allParam); //获取用户设置的值 userExtensionSetting.OnGetPrinterSetting(allParam); defineUVPowerLevel1.OnGetPrinterSetting(ref allParam.PrinterSetting, ref allParam.UvPowerLevelMap); //判断是否显示打印模式 if ((UIFunctionOnOff.SupportPrintMode && PubFunc.IsFactoryUser())) { jobConfigModes1.OnGetPrinterSetting(); } if (UIFunctionOnOff.SupportMediaMode) { mediaConfigs1.OnGetPrinterSetting(); } if (UIFunctionOnOff.SupportCloseNozzle) { closeColorNozzle1.OnGetPrinterSetting(ref allParam); } if (SPrinterProperty.IsJianRui()) { workposSetting1.OnGetPrinterSetting(ref allParam.PrinterSetting); } if (UIFunctionOnOff.SupportDebugQuality) { debugQuality1.OnGetPrinterSetting(ref allParam); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
static void Main(string[] args) { #if EpsonLcd bool showUI = true; try { if (args != null && args.Length > 0) { showUI = bool.Parse(args[0]); } } catch { // showUI = false; } #endif // enable XP theme support Application.EnableVisualStyles(); Application.DoEvents(); //SetLanguage(); //Chinese XP system if (((System.Globalization.CultureInfo.InstalledUICulture.LCID & 0xff) == 04) && System.Environment.OSVersion.Version.Major == 5 && System.Environment.OSVersion.Version.Minor == 1) { string filename = System.Environment.SystemDirectory + Path.DirectorySeparatorChar + "conime.exe"; if (File.Exists(filename)) { System.Diagnostics.ProcessStartInfo Info = new System.Diagnostics.ProcessStartInfo(); Info.FileName = filename; System.Diagnostics.Process Proc; try { Proc = System.Diagnostics.Process.Start(Info); } catch //(System.ComponentModel.Win32Exception e) { return; } //等待3秒钟 //Proc.WaitForExit(3000); } } const string MUTEX = CoreConst.c_MUTEX_App; bool createdNew = false; Mutex mutex = new Mutex(true, MUTEX, out createdNew); if (!createdNew) { #if EpsonLcd Process process = RuningInstance(); MyData data = ProcessMessaging.GetShareMem(); //您new一个也行 data.InfoCode = showUI?1:0; //消息码 data.ProcessID = process.Id; //接收进程ID ProcessMessaging.SetShareMem(data); Thread.Sleep(100); return; #else MessageBox.Show(ResString.GetEnumDisplayName(typeof(UIError), UIError.OnlyOneProgram)); mutex.Close(); return; #endif } #if EpsonLcd int lcid = PubFunc.GetLanguage(); if (lcid == -1) { // 未连接usb线,无法获取软件语言,启动终止. MessageBox.Show(ResString.GetResString("NoFoundUSBReturn"), ResString.GetProductName(), MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } #else AllParam cur = new AllParam(); int lcid = cur.GetLanguage(); #endif Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); Thread.CurrentThread.CurrentUICulture = new CultureInfo(lcid); bool splashEnable = PubFunc.GetEnableSplash(); if (splashEnable) { Splasher.ShowSplash(1000); } string skinName = cur.GetSkinName(); #if EpsonLcd MainForm mainWin = new MainForm(showUI); #else MainForm mainWin = new MainForm(true, skinName); #endif Application.AddMessageFilter(mainWin); if (mainWin.Start()) { Application.Run(mainWin); } mutex.Close(); }
public void OnPrinterSettingChange(AllParam allParam) { SPrinterSetting ss = allParam.PrinterSetting; m_uvLightType = (UvLightType)ss.UVSetting.eUvLightType; this.m_ComboBoxLeftSet.Items.Clear(); this.m_ComboBoxRightSet.Items.Clear(); this.m_ComboBoxPLeftSet.Items.Clear(); this.m_ComboBoxPRightSet.Items.Clear(); Type enumtype = typeof(UVStatus); if (m_uvLightType == UvLightType.UvLightType2 || m_uvLightType == UvLightType.UvLightType3)//(sp.IsAllWinZMeasurSensorSupport()) { enumtype = typeof(UVStatus_ALLWIN); UVStatus_ALLWIN[] vals = (UVStatus_ALLWIN[])Enum.GetValues(enumtype); for (int i = 0; i < vals.Length; i++) { string item = ResString.GetEnumDisplayName(enumtype, vals[i]); this.m_ComboBoxLeftSet.Items.Add(item); this.m_ComboBoxRightSet.Items.Add(item); this.m_ComboBoxPLeftSet.Items.Add(item); this.m_ComboBoxPRightSet.Items.Add(item); } } else { UVStatus[] vals = (UVStatus[])Enum.GetValues(enumtype); for (int i = 0; i < vals.Length; i++) { string item = ResString.GetEnumDisplayName(enumtype, vals[i]); this.m_ComboBoxLeftSet.Items.Add(item); this.m_ComboBoxRightSet.Items.Add(item); this.m_ComboBoxPLeftSet.Items.Add(item); this.m_ComboBoxPRightSet.Items.Add(item); } } SUVSetting uvseting = ss.UVSetting; UIPreference.SetValueAndClampWithMinMax(this.numericUpDownShutterDis, uvseting.fShutterOpenDistance); #if !DOUBLE_SIDE_PRINT_HAPOND UIPreference.SetValueAndClampWithMinMax(this.numericUpDownLeftDis, uvseting.fLeftDisFromNozzel); UIPreference.SetValueAndClampWithMinMax(this.numericUpDownRightDis, uvseting.fRightDisFromNozzel); this.checkBox1Leftprinton.Checked = (uvseting.iLeftRightMask & 0x02) != 0; this.checkBox1Rightprinton.Checked = (uvseting.iLeftRightMask & 0x01) != 0; this.checkBox2Leftprinton.Checked = (uvseting.iLeftRightMask & 0x08) != 0; this.checkBox2Rightprinton.Checked = (uvseting.iLeftRightMask & 0x04) != 0; #else UIPreference.SetValueAndClampWithMinMax(this.numericUpDownLeftDis, uvseting.fRightDisFromNozzel); UIPreference.SetValueAndClampWithMinMax(this.numericUpDownRightDis, uvseting.fLeftDisFromNozzel); this.checkBox1Leftprinton.Checked = (uvseting.iLeftRightMask & 0x04) != 0; this.checkBox1Rightprinton.Checked = (uvseting.iLeftRightMask & 0x08) != 0; this.checkBox2Leftprinton.Checked = (uvseting.iLeftRightMask & 0x01) != 0; this.checkBox2Rightprinton.Checked = (uvseting.iLeftRightMask & 0x02) != 0; #endif this.cmb_UvLightType.SelectedIndex = ss.UVSetting.eUvLightType; if (SPrinterProperty.IsGongZengUv()) { if (EpsonLCD.GetGZUVX2Param(ref GZUVX2Param)) { numUVX1Power.Value = GZUVX2Param.UVX1Power <= 100 ? GZUVX2Param.UVX1Power : 0; numUVX2Power.Value = GZUVX2Param.UVX2Power <= 100 ? GZUVX2Param.UVX2Power : 0; } } if (PubFunc.IsSupportUVOffsetDistance()) { if (allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray != null && allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray.Length >= 8) { UIPreference.SetValueAndClampWithMinMax(this.numPLOpen, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[0]); UIPreference.SetValueAndClampWithMinMax(this.numPLClose, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[1]); UIPreference.SetValueAndClampWithMinMax(this.numPROpen, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[2]); UIPreference.SetValueAndClampWithMinMax(this.numPRClose, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[3]); UIPreference.SetValueAndClampWithMinMax(this.numPLOpen2, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[4]); UIPreference.SetValueAndClampWithMinMax(this.numPLClose2, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[5]); UIPreference.SetValueAndClampWithMinMax(this.numPROpen2, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[6]); UIPreference.SetValueAndClampWithMinMax(this.numPRClose2, allParam.ExtendedSettings.UVOffsetDis.OffsetDistArray[7]); } } }
public void OnGetPrinterSetting(ref AllParam allParam, ref bool bChangeProperty) { nozzleXYoffset1.OnGetPrinterSetting(ref allParam.PrinterSetting); }
public SelectInkTypeForm(AllParam allParam) { InitializeComponent(); m_allParma = allParam; InitializeData(); }
private void OnClipSettingChanged(object sender, System.EventArgs e) { if (isSetting) { return; } m_PreviewJob.Clips.XCnt = Convert.ToInt32(this.numericUpDownXCnt.Value); m_PreviewJob.Clips.YCnt = Convert.ToInt32(this.numericUpDownYCnt.Value); m_PreviewJob.Clips.XDis = Convert.ToInt32(UIPreference.ToInchLength(m_CurrentUnit, (float)this.numericUpDownXDis.Value) * m_PreviewJob.ResolutionX); m_PreviewJob.Clips.YDis = Convert.ToInt32(UIPreference.ToInchLength(m_CurrentUnit, (float)this.numericUpDownYDis.Value) * m_PreviewJob.ResolutionY); int infomask = 0; if (checkBoxJobSize.Checked) { infomask |= 0x00001; } else { infomask &= ~0x00001; } if (checkBoxResolution.Checked) { infomask |= 0x00010; } else { infomask &= ~0x00010; } if (checkBoxPassNum.Checked) { infomask |= 0x00100; } else { infomask &= ~0x00100; } if (checkBoxDirection.Checked) { infomask |= 0x01000; } else { infomask &= ~0x01000; } if (checkBoxFilepath.Checked) { infomask |= 0x10000; } else { infomask &= ~0x10000; } if (checkBoxVoltage.Checked) { infomask |= 0x100000; } else { infomask &= ~0x100000; } m_PreviewJob.Clips.AddtionInfoMask = infomask; m_PreviewJob.Clips.Note = this.textBoxFootNote.Text; // m_PreviewJob.Clips.NoteFontName = this.textBoxFootNote.Font.Name; // m_PreviewJob.Clips.NoteFontSize = this.textBoxFootNote.Font.Size; m_PreviewJob.Clips.NoteFont = this.textBoxFootNote.Font; if (m_PreviewJob.Clips.NotePosition == 1 || m_PreviewJob.Clips.NotePosition == 3) { m_PreviewJob.Clips.NoteMargin = Convert.ToInt32(UIPreference.ToInchLength(m_CurrentUnit, (float)this.numericUpDown_noteMargin.Value) * m_PreviewJob.ResolutionY); } else { m_PreviewJob.Clips.NoteMargin = Convert.ToInt32(UIPreference.ToInchLength(m_CurrentUnit, (float)this.numericUpDown_noteMargin.Value) * m_PreviewJob.ResolutionX); } if (m_PreviewJob.IsClip) { RectangleF disrect = new RectangleF((float)this.numericUpDownX.Value, (float)this.numericUpDownY.Value, (float)this.numericUpDownW.Value, (float)this.numericUpDownH.Value); RectangleF uirect = CalculateUIClipRec(disrect); RectangleF uirect1 = uirect; uirect1.Intersect(m_OldPrintingPreview.ImagePictureBox.ClientRectangle); if (!this.m_CliPRect.SetClipRectangle(uirect1))//(uirect1 != uirect) { RectangleF ClipRec = this.CalculateDisClipRec(m_CliPRect.rect); isSetting = true; this.numericUpDownX.Value = (decimal)ClipRec.X; this.numericUpDownY.Value = (decimal)ClipRec.Y; if ((decimal)ClipRec.Width < numericUpDownW.Minimum) { ClipRec.Width = (float)numericUpDownW.Minimum; } if ((decimal)ClipRec.Width > numericUpDownW.Maximum) { ClipRec.Width = (float)numericUpDownW.Maximum; } this.numericUpDownW.Value = (decimal)ClipRec.Width; if ((decimal)ClipRec.Width < numericUpDownH.Minimum) { ClipRec.Width = (float)numericUpDownH.Minimum; } if ((decimal)ClipRec.Width > numericUpDownH.Maximum) { ClipRec.Width = (float)numericUpDownH.Maximum; } UIPreference.SetValueAndClampWithMinMax(this.numericUpDownH, ClipRec.Height); isSetting = false; } // this.m_CliPRect.SetClipRectangle(uirect1); this.m_OldPrintingPreview.Refresh(); m_PreviewJob.Clips.ClipRect = CalculateRealClipRec(m_CliPRect.rect); } if (m_PreviewJob.IsTile) { 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; if (JobW > realPgW) { isSetting = true; UIPreference.SetValueAndClampWithMinMax(this.numericUpDownXCnt, m_PreviewJob.Clips.CalcXMaxCount(Convert.ToInt32(realPgW * this.m_PreviewJob.ResolutionX))); isSetting = false; m_PreviewJob.Clips.XCnt = Convert.ToInt32(this.numericUpDownXCnt.Value); } } UpdatePreviewAndClipBox(); //GC.Collect(); }