예제 #1
0
        public void OnPreferenceChange(UIPreference up)
        {
            UILengthUnit newUnit = up.Unit;

            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numCappingPosY);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numCleanPosZ);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numCappingPosZ);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numSuckStartPlace);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numSuckEndPlace);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numPreOffset);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numCleanSlotSpace);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numScraperStart1);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numScraperStart2);

            string newUnitdis = ResString.GetEnumDisplayName(typeof(UILengthUnit), newUnit);

            UIPreference.NumericUpDownToolTip(newUnitdis, this.numCappingPosY, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numCleanPosZ, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numCappingPosZ, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numSuckStartPlace, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numSuckEndPlace, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numPreOffset, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numCleanSlotSpace, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numScraperStart1, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numScraperStart2, this.toolTip1);


            string speedUnit = string.Format("{0}/{1}", newUnitdis, ResString.GetResString("DisplayTime_Second"));

            UIPreference.NumericUpDownToolTip(speedUnit, this.numPretreatmentSpeed, this.toolTip1);
            UIPreference.NumericUpDownToolTip(speedUnit, this.numRuturnSpeed, this.toolTip1);
            m_CurrentUnit = newUnit;
        }
예제 #2
0
        public void InitListHeader()
        {
            this.Items.Clear();
            this.Columns.Clear();

            ColumnHeader[] columnHeader = new ColumnHeader[6];
            int            j            = 0;

            foreach (int i in Enum.GetValues(typeof(JobListColumnHeader)))
            {
                JobListColumnHeader cur = (JobListColumnHeader)i;
                if (cur != JobListColumnHeader.Copies &&
                    cur != JobListColumnHeader.PrintedDate &&
                    cur != JobListColumnHeader.PrintedPasses &&
                    cur != JobListColumnHeader.Status &&
                    cur != JobListColumnHeader.PrintTime)
                {
                    columnHeader[j] = new ColumnHeader();
                    string cmode = ResString.GetEnumDisplayName(typeof(JobListColumnHeader), cur);
                    columnHeader[j].Text      = cmode;
                    columnHeader[j].Width     = 150;
                    columnHeader[j].TextAlign = HorizontalAlignment.Center;
                    j++;
                }
            }
            //this.SuspendLayout();
            this.Columns.AddRange(columnHeader);
            //this.ResumeLayout();
        }
예제 #3
0
        public void SetPrinterStatusChanged(JetStatusEnum status, bool waitingPauseBetweenLayers = false)
        {
            switch (status)
            {
            case JetStatusEnum.Pause:
            case JetStatusEnum.Aborting:
                CalcuPrintTime.Stop();
                break;

            case JetStatusEnum.Busy:
                CalcuPrintTime.Start();
                break;
            }
            string strtext = ResString.GetEnumDisplayName(typeof(JetStatusEnum), status);

            if (PubFunc.Is3DPrintMachine() && waitingPauseBetweenLayers && status == JetStatusEnum.Ready)
            {
                status  = JetStatusEnum.Pause;
                strtext = ResString.GetResString("PauseBetweenLayersStatus");// 层间暂停
            }

            if (status == JetStatusEnum.Error)
            {
                strtext += "\n" + "[" + CoreInterface.GetBoardError().ToString("X8") + "]";
            }
            //this.crystalLabel_Status.Text = strtext;

#if SHIDAO
            inkTankStatusControl1.OnPrinterStatusChanged(status);
            purgeControl1.OnPrinterStatusChanged(status);
#endif
            //gzPurgeControl1.OnPrinterStatusChanged(status);
        }
예제 #4
0
        private void OnUnitChange(UILengthUnit newUnit)
        {
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numericUpDownLeftDis);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numericUpDownRightDis);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numericUpDownShutterDis);

            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numPLOpen);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numPLClose);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numPROpen);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numPRClose);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numPLOpen2);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numPLClose2);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numPROpen2);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numPRClose2);

            string newUnitdis = ResString.GetEnumDisplayName(typeof(UILengthUnit), newUnit);

            UIPreference.NumericUpDownToolTip(newUnitdis, this.numericUpDownLeftDis, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numericUpDownRightDis, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numericUpDownShutterDis, this.m_ToolTip);

            UIPreference.NumericUpDownToolTip(newUnitdis, this.numPLOpen, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numPLClose, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numPROpen, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numPRClose, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numPLOpen2, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numPLClose2, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numPROpen2, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numPRClose2, this.m_ToolTip);
            //			this.isDirty = false;
        }
예제 #5
0
파일: Form1.cs 프로젝트: 6555355/Scan_yan1
        private void m_MenuItemUpdate_Click(object sender, System.EventArgs e)
        {
            JetStatusEnum printerStatus = CoreInterface.GetBoardStatus();

            if (printerStatus == JetStatusEnum.Busy)
            {
                if (MessageBox.Show(this,
                                    "Are you sure want to update?",
                                    "update",
                                    System.Windows.Forms.MessageBoxButtons.YesNo,
                                    MessageBoxIcon.Question,
                                    MessageBoxDefaultButton.Button2)
                    == DialogResult.No)
                {
                    return;
                }
                else
                {
                    CoreInterface.Printer_Abort();
                }
            }
            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.Multiselect      = false;
            fileDialog.CheckFileExists  = true;
            fileDialog.DefaultExt       = ".dat";
            fileDialog.Filter           = ResString.GetEnumDisplayName(typeof(FileFilter), FileFilter.Dat);
            fileDialog.InitialDirectory = m_allParam.Preference.WorkingFolder;
            if (fileDialog.ShowDialog(this) == DialogResult.OK)
            {
                m_allParam.Preference.WorkingFolder = Path.GetDirectoryName(fileDialog.FileName);
                UpdateCoreBoard(fileDialog.FileName);
            }
        }
예제 #6
0
        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));
            }
        }
예제 #7
0
        public void OnPrinterPropertyChange(SPrinterProperty sp)
        {
            m_sPrinterProperty = sp;
            fPulsePerInchX     = sp.fPulsePerInchX;

            //bool isSimpleUv = SPrinterProperty.IsSimpleUV();
            bool bshowReadyUvSet = PubFunc.GetUserPermission() == (int)UserPermission.SupperUser;

            m_checkbox_autoSwitchMode.Visible =
                label6.Visible             = cmb_UvLightType.Visible =
                    groupBox_Ready.Visible = bshowReadyUvSet;
            Type enumtype = typeof(UvLightType);

            UvLightType[] valse = (UvLightType[])Enum.GetValues(enumtype);
            for (int i = 0; i < valse.Length; i++)
            {
                string item = ResString.GetEnumDisplayName(enumtype, valse[i]);
                this.cmb_UvLightType.Items.Add(item);
            }
            groupBox_UVPower.Visible = SPrinterProperty.IsGongZengUv();

            groupBoxUVOffset.Visible = PubFunc.IsSupportUVOffsetDistance();

            if (groupBox_UVPower.Visible == false)
            {
                groupBoxUVOffset.Location = groupBox_UVPower.Location;
            }
        }
        public void OnGetPrinterSetting(ref SPrinterSetting ss)
        {
            if (bColorJet)
            {
                //ColorJet 通用参数
                _manualCleanParamData.nXStartPos = (uint)Math.Round((UIPreference.ToInchLength(m_CurrentUnit, (float)m_NumericUpDownXStartPos.Value)) *
                                                                    m_sPrinterProperty.fPulsePerInchX);
                _manualCleanParamData.bySwapHeaders = (byte)(m_ComboBoxHeaderNumPerTime.SelectedIndex + 1);
                _manualCleanParamData.nFlag         = BitConverter.ToUInt32(System.Text.Encoding.ASCII.GetBytes("CJCA"), 0);
                //ColorJet A+系统参数
                {
                    _manualCleanParamData.OriginOffset = (byte)(this.numericOriginOffset.Value);
                    _manualCleanParamData.ySpeedHz     = Decimal.ToUInt16(this.numericSpeed.Value);
                    _manualCleanParamData.yZeroDelay   = Decimal.ToUInt16(this.numericDelayTime.Value);
                    _manualCleanParamData.DisableFlag  = (byte)(checkBoxFunctionOn.Checked ? 0 : 1);
                }
                //_manualCleanParamData.cleanBeltOutTime = (uint) ((float)numCleanBeltTime.Value*1000f);

                this.m_ButtonStartClean.Enabled = bCanCleanFlg = true;
                if (EpsonLCD.SetManualCleanParam(_manualCleanParamData) == false)
                {
                    string info = ResString.GetEnumDisplayName(typeof(UIError), UIError.SetCleanParamFail);
                    MessageBox.Show(info, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.m_ButtonStartClean.Enabled = bCanCleanFlg = false;
                }
            }
        }
예제 #9
0
        private void SetPassword(string strMainPwd, int bLang)
        {
            int iRet = 0;

            //

            //validCheck should add here
            if (strMainPwd != null && strMainPwd.Length != CoreConst.MAX_PASSWORD_LEN)
            {
                string sFilterString = strMainPwd.Replace("-", null);
                iRet = CoreInterface.SetPassword(sFilterString.ToUpper(), sFilterString.Length, (ushort)BoardEnum.CoreBoard, bLang);
            }
            if (iRet == 0)
            {
                MessageBox.Show(ResString.GetEnumDisplayName(typeof(UIError), UIError.SetPasswordFail),
                                ResString.GetProductName(),
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Asterisk);
            }
            else
            {
                MessageBox.Show(ResString.GetEnumDisplayName(typeof(UISuccess), UISuccess.SetPassword),
                                ResString.GetProductName(),
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Information);
            }
        }
예제 #10
0
        private void OnUnitChange(UILengthUnit newUnit)
        {
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numDetectorOffset);

            string newUnitdis = ResString.GetEnumDisplayName(typeof(UILengthUnit), newUnit);

            UIPreference.NumericUpDownToolTip(newUnitdis, this.numDetectorOffset, this.m_ToolTip);
        }
        public void OnPrinterSettingChange(SPrinterSetting ss, SPrinterProperty sp)
        {
            m_PrinterSetting = ss; //Printer Setting backup
            if (bColorJet)
            {
                if (EpsonLCD.GetManualCleanParam(ref _manualCleanParamData) == false)
                {
                    string info = ResString.GetEnumDisplayName(typeof(UIError), UIError.ManualCleanNotSupport);
                    MessageBox.Show(info, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            //色序初始化
            panelColorMask.SuspendLayout();
            panelColorMask.Controls.Clear();
            if (bColorJet)
            {
                for (int n = 0; n < sp.nColorNum / Math.Abs(sp.nOneHeadDivider); n++)
                {
                    RadioButton colorBox = new RadioButton();
                    colorBox.Text      = string.Format("CH{0}", n + 1); //((ColorEnum_Short) sp.eColorOrder[n]).ToString();
                    colorBox.TextAlign = ContentAlignment.MiddleLeft;
                    colorBox.AutoSize  = true;
                    panelColorMask.Controls.Add(colorBox);
                }
            }
            else
            {
                for (int n = 0; n < sp.nColorNum; n++)
                {
                    CheckBox colorBox = new CheckBox();
                    colorBox.Text      = string.Format("CH{0}", n + 1); //((ColorEnum_Short) sp.eColorOrder[n]).ToString();
                    colorBox.TextAlign = ContentAlignment.MiddleLeft;
                    colorBox.AutoSize  = true;
                    panelColorMask.Controls.Add(colorBox);
                }
            }
            panelColorMask.ResumeLayout(false);

            if (bColorJet)
            {
                //ColorJet 通用参数
                UIPreference.SetValueAndClampWithMinMax(this.m_NumericUpDownXStartPos, m_CurrentUnit, _manualCleanParamData.nXStartPos / m_sPrinterProperty.fPulsePerInchX);
                m_ComboBoxHeaderNumPerTime.Items.Clear();//每次清洗喷头数初始化
                for (int n = 1; n <= sp.nHeadNumPerGroupY; n++)
                {
                    m_ComboBoxHeaderNumPerTime.Items.Add(n);
                }
                m_ComboBoxHeaderNumPerTime.SelectedIndex = 0;
                //ColorJet A+系统参数
                {
                    UIPreference.SetValueAndClampWithMinMax(this.numericOriginOffset, _manualCleanParamData.OriginOffset);
                    UIPreference.SetValueAndClampWithMinMax(this.numericSpeed, _manualCleanParamData.ySpeedHz);
                    UIPreference.SetValueAndClampWithMinMax(this.numericDelayTime, _manualCleanParamData.yZeroDelay);
                    checkBoxFunctionOn.Checked = _manualCleanParamData.DisableFlag == 0;
                }
                //UIPreference.SetValueAndClampWithMinMax(this.numCleanBeltTime, _manualCleanParamData.cleanBeltOutTime/1000f);
            }
        }
예제 #12
0
        private void  OnUnitChange(UILengthUnit newUnit)
        {
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, m_NumericUpDownLength);

            string newUnitdis = ResString.GetEnumDisplayName(typeof(UILengthUnit), newUnit);

            UIPreference.NumericUpDownToolTip(newUnitdis, this.m_NumericUpDownLength, this.m_ToolTip);
            this.isDirty = false;
        }
예제 #13
0
        public void SetPrinterStatusChanged(JetStatusEnum status)
        {
            string strtext = ResString.GetEnumDisplayName(typeof(JetStatusEnum), status);

            if (status == JetStatusEnum.Error)
            {
                strtext += "\n" + "[" + CoreInterface.GetBoardError().ToString("X8") + "]";
            }
            this.crystalLabel_Status.Text = strtext;
        }
예제 #14
0
        private void InitializeUvLightType()
        {
            Type enumtype = typeof(UvLightType);

            UvLightType[] valse = (UvLightType[])Enum.GetValues(enumtype);
            for (int i = 0; i < valse.Length; i++)
            {
                string item = ResString.GetEnumDisplayName(enumtype, valse[i]);
                this.cmb_UvLightType.Items.Add(item);
            }
        }
 /// <summary>
 /// 设置清洗参数
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void m_ButtonSet_Click(object sender, EventArgs e)
 {
     this.m_ButtonStartClean.Enabled = bCanCleanFlg = true;
     OnGetPrinterSetting(ref m_PrinterSetting);
     if (EpsonLCD.SetManualCleanParam(_manualCleanParamData) == false)
     {
         string info = ResString.GetEnumDisplayName(typeof(UIError), UIError.SetCleanParamFail);
         MessageBox.Show(info, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.m_ButtonStartClean.Enabled = bCanCleanFlg = false;
     }
 }
예제 #16
0
        private void OnUnitChange(UILengthUnit newUnit)
        {
            //UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.m_NumericUpDownYEndPos);
            //UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numericXAxisPos);
            //UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numericBladeYMobileDistance);
            //UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numericScrapPlatformZPos);

            string newUnitdis = ResString.GetEnumDisplayName(typeof(UILengthUnit), newUnit);
            //UIPreference.NumericUpDownToolTip(newUnitdis, this.m_NumericUpDownYEndPos, this.m_ToolTip);
            //UIPreference.NumericUpDownToolTip(newUnitdis, this.numericXAxisPos, this.m_ToolTip);
            //UIPreference.NumericUpDownToolTip(newUnitdis, this.numericBladeYMobileDistance, this.m_ToolTip);
            //UIPreference.NumericUpDownToolTip(newUnitdis, this.numericScrapPlatformZPos, this.m_ToolTip);
        }
예제 #17
0
        private void OnUnitChange(UILengthUnit newUnit)
        {
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numXPressInkPos);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numYCleanPos);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numZCleanPos);


            string newUnitdis = ResString.GetEnumDisplayName(typeof(UILengthUnit), newUnit);

            UIPreference.NumericUpDownToolTip(newUnitdis, this.numXPressInkPos, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numYCleanPos, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numZCleanPos, this.toolTip1);
        }
예제 #18
0
 private void button_trigger_Click(object sender, EventArgs e)
 {
     if (EpsonLCD.DOCANTEXTILE_SENSOR_INIT() == false)
     {
         string info = ResString.GetEnumDisplayName(typeof(UIError), UIError.TriggerFail);
         MessageBox.Show(info, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         string info = ResString.GetEnumDisplayName(typeof(UISuccess), UISuccess.TriggerSuccess);
         MessageBox.Show(info, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #19
0
 private void button_set_Click(object sender, EventArgs e)
 {
     OnGetPrinterSetting(ref m_PrinterSetting);
     if (EpsonLCD.SetGmaCleanParam(_gmaCleanParam) == false)
     {
         string info = ResString.GetEnumDisplayName(typeof(UIError), UIError.SetCleanParamFail);
         MessageBox.Show(info, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         string info = ResString.GetEnumDisplayName(typeof(UISuccess), UISuccess.SetCleanParamSuccess);
         MessageBox.Show(info, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #20
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Micolor_CleanParameterControl"/> class.
        /// </summary>
        public Micolor_CleanParameterControl()
        {
            this.InitializeComponent();

            PubFunc.SetNumricMaxAndMin(this, true);


            this.comboBoxCleanMode.Items.Clear();
            foreach (EpsonAutoCleanWay value in Enum.GetValues(typeof(EpsonAutoCleanWay)))
            {
                string txt = ResString.GetEnumDisplayName(value.GetType(), value);
                this.comboBoxCleanMode.Items.Add(txt);
            }
            this.comboBoxCleanMode.SelectedIndex = 0;
        }
예제 #21
0
        private void OnUnitChange(UILengthUnit newUnit)
        {
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, _mCurrentUnit, updownPenWidth);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, _mCurrentUnit, updownCrossWidth);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, _mCurrentUnit, updownCrossHeight);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, _mCurrentUnit, updownCrossOffsetX);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, _mCurrentUnit, updownCrossOffsetY);
            string newUnitdis = ResString.GetEnumDisplayName(typeof(UILengthUnit), newUnit);

            toolTip1.SetToolTip(updownPenWidth, newUnitdis);
            toolTip1.SetToolTip(updownCrossWidth, newUnitdis);
            toolTip1.SetToolTip(updownCrossHeight, newUnitdis);
            toolTip1.SetToolTip(updownCrossOffsetX, newUnitdis);
            toolTip1.SetToolTip(updownCrossOffsetY, newUnitdis);
        }
예제 #22
0
        private void OnUnitChange(UILengthUnit newUnit)
        {
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.m_NumericUpDown_3DZDownDis);
            m_NumericUpDown_3DZDownDis.DecimalPlaces = 3;
            //UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.m_NumericUpDown_3DSandDis);

            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.m_NumericUpDown_ZAdjustment);
            m_NumericUpDown_ZAdjustment.DecimalPlaces = 4;
            m_NumericUpDown_ZAdjustment.Increment     = new Decimal(0.0001f);

            string newUnitdis = ResString.GetEnumDisplayName(typeof(UILengthUnit), newUnit);

            UIPreference.NumericUpDownToolTip(newUnitdis, this.m_NumericUpDown_ZAdjustment, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.m_NumericUpDown_3DZDownDis, this.m_ToolTip);
            this.isDirty = false;
        }
예제 #23
0
        //public string ToolTipString = string.Empty;
        public string GetTooltipString(UIJob job, UIPreference options)
        {
            string newtip   = string.Empty;
            bool   bPrinted = job.Status == JobStatus.Printed;
            int    colLen   = options.JobListHeaderList.Length;

            for (int i = 0; i < colLen; i++)
            {
                JobListColumnHeader cur = (JobListColumnHeader)options.JobListHeaderList[i];
                string cmode            = ResString.GetEnumDisplayName(typeof(JobListColumnHeader), cur) + " : ";
                int    index            = options.IndexOf(cur);
                cmode  += this.SubItems[index].Text;
                newtip += cmode + Environment.NewLine;
            }
            return(newtip);
        }
예제 #24
0
        public void SetPrinterStatusChanged(JetStatusEnum status, bool waitingPauseBetweenLayers = false)
        {
            string strtext = ResString.GetEnumDisplayName(typeof(JetStatusEnum), status);

            if (PubFunc.Is3DPrintMachine() && waitingPauseBetweenLayers && status == JetStatusEnum.Ready)
            {
                status  = JetStatusEnum.Pause;
                strtext = ResString.GetResString("PauseBetweenLayersStatus");// 层间暂停
            }

            if (status == JetStatusEnum.Error)
            {
                strtext += "\n" + "[" + CoreInterface.GetBoardError().ToString("X8") + "]";
            }
            this.crystalLabel_Status.Text = strtext;
        }
예제 #25
0
        public void OnPrinterSettingChange(SPrinterSetting ss, SPrinterProperty sp)
        {
            m_PrinterSetting = ss; //Printer Setting backup
            if (bALLWIN)
            {
                EpsonLCD.GetALLWINCleanParam(ref _allwinData);
            }
            if (bColorJet)
            {
                if (EpsonLCD.GetManualCleanParam(ref _manualCleanParamData) == false)
                {
                    string info = ResString.GetEnumDisplayName(typeof(UIError), UIError.ManualCleanNotSupport);
                    MessageBox.Show(info, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            //色序初始化
            panelColorMask.SuspendLayout();
            panelColorMask.Controls.Clear();
            for (int n = 0; n < sp.nColorNum; n++)
            {
                if (bColorJet)
                {
                    RadioButton colorBox = new RadioButton();
                    colorBox.Text      = string.Format("CH{0}", n + 1);//((ColorEnum_Short) sp.eColorOrder[n]).ToString();
                    colorBox.TextAlign = ContentAlignment.MiddleLeft;
                    colorBox.AutoSize  = true;
                    panelColorMask.Controls.Add(colorBox);
                }
                else
                {
                    CheckBox colorBox = new CheckBox();
                    colorBox.Text      = string.Format("CH{0}", n + 1);//((ColorEnum_Short) sp.eColorOrder[n]).ToString();
                    colorBox.TextAlign = ContentAlignment.MiddleLeft;
                    colorBox.AutoSize  = true;
                    panelColorMask.Controls.Add(colorBox);
                }
            }
            panelColorMask.ResumeLayout(false);

            if (bALLWIN)
            {
                UIPreference.SetValueAndClampWithMinMax(this.numericXAxisPos, _allwinData.xPos);
                UIPreference.SetValueAndClampWithMinMax(this.numericBladeYMobileDistance, _allwinData.yPos);
                UIPreference.SetValueAndClampWithMinMax(this.numericScrapPlatformZPos, _allwinData.zPos);
                UIPreference.SetValueAndClampWithMinMax(this.numericBladeCleanDuration, _allwinData.CleanPumpTime);
            }
        }
예제 #26
0
        private void OnUnitChange(UILengthUnit newUnit)
        {
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numCappingPosX);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numCappingPosY);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numCappingPosZ);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numHomePosX);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, numHomePosY);

            string newUnitdis = ResString.GetEnumDisplayName(typeof(UILengthUnit), newUnit);

            UIPreference.NumericUpDownToolTip(newUnit.ToString(), this.numCappingPosX, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnit.ToString(), this.numCappingPosY, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnit.ToString(), this.numCappingPosZ, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnit.ToString(), numHomePosX, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnit.ToString(), numHomePosY, this.m_ToolTip);
            this.isDirty = false;
        }
예제 #27
0
        /// <summary>
        /// 用户初始化控件
        /// </summary>
        private void CustomInitialize()
        {
            //通道设置
            for (int nChannel = 0; nChannel < m_Channel_Number; nChannel++)
            {
                m_ComboBox_Channel.Items.Add(ChannelNameList[nChannel]);
            }

            for (int nVsd = 0; nVsd < 4; nVsd++)
            {
                string strVSD = "VSD" + (nVsd + 1).ToString();
                m_ComboBox_VSD.Items.Add(strVSD);
            }

            this.m_ComboBox_DPI.Items.Clear();
            foreach (XResDivMode place in Enum.GetValues(typeof(XResDivMode)))
            {
                string cmode = ResString.GetEnumDisplayName(typeof(XResDivMode), place);

                if (place < XResDivMode.PrintMode3)
                {
                    m_ComboBox_DPI.Items.Add(cmode);
                }
            }

            //通道值设置为0
            m_ComboBox_Channel.SelectedIndex = 0;

            //VSD值为VSD1~VSD4,默认值为VDS1
            m_ComboBox_VSD.SelectedIndex = 0;

            if (m_ComboBox_DPI.Items.Count > 1)
            {
                m_ComboBox_DPI.SelectedIndex = 1;
            }

            ////波段初始化设置
            //CreateWaveArea();
            //m_TabControl_Wave.SelectedIndex = 0;

            ////绘图区域
            //m_GroupBox_Draw.Controls.Add(DrawChart());

            //更新UI
//			RefreshUI();
        }
예제 #28
0
파일: Form1.cs 프로젝트: 6555355/Scan_yan1
        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();
        }
예제 #29
0
        private void OnUnitChange(UILengthUnit newUnit)
        {
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numxStartPos);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numxDistance);
            //UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numScraperPos);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.num_zCLeanPos);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numYCarryCleanPos);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numZCarryCleanPos);

            string newUnitdis = ResString.GetEnumDisplayName(typeof(UILengthUnit), newUnit);

            UIPreference.NumericUpDownToolTip(newUnitdis, this.numxStartPos, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numxDistance, this.toolTip1);
            //UIPreference.NumericUpDownToolTip(newUnitdis, this.numScraperPos, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.num_zCLeanPos, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numYCarryCleanPos, this.toolTip1);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numZCarryCleanPos, this.toolTip1);
        }
예제 #30
0
        public void SetPrinterStatusChanged(JetStatusEnum status)
        {
            PrinterOperate po = PrinterOperate.UpdateByPrinterStatus(status);

            if (bSelfRaised && status == JetStatusEnum.Measuring)
            {
                bMeasuring  = true;
                bSelfRaised = false;
            }
            if (bMeasuring && status == JetStatusEnum.Ready &&
                !bAutoMeasure    //不是自动测高,或者自动测高已经更新了结果
                )
            {
                bSelfRaised = bMeasuring = false;
                if (IsMeasureBeforePrint)
                {
                    string       m1        = ResString.GetEnumDisplayName(typeof(Confirm), Confirm.PrintNow);
                    DialogResult result    = MessageBox.Show(m1, ResString.GetProductName(), MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    csEventArgs  eventArgs = new csEventArgs()
                    {
                        Case = _case, Dr = DialogResult.Cancel
                    };
                    if (result == DialogResult.Yes)
                    {
                        eventArgs.Dr = DialogResult.OK;
                    }
                    //CoreInterface.SendJetCommand((int)JetCmdEnum.BackToHomePoint, (int)AxisDir.X);
                    OnCustomButtonClicked(null, eventArgs);
                }
                else
                {
                    string       m1     = ResString.GetEnumDisplayName(typeof(Confirm), Confirm.GoHome);
                    DialogResult result = MessageBox.Show(m1, ResString.GetProductName(), MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (result != DialogResult.No)
                    {
                        CoreInterface.SendJetCommand((int)JetCmdEnum.BackToHomePoint, (int)AxisDir.X);
                    }
                }
            }
            this.buttonCancel.Enabled                  = po.CanMoveStop;
            this.m_ButtonManualMove.Enabled            =
                this.m_ButtonMeasureThick.Enabled      =
                    this.m_ButtonMeasureThick2.Enabled = po.CanMoveUp && po.CanMoveDown;
        }