Ejemplo n.º 1
0
        public void OnPrintingProgressChanged(int percent)
        {
            string info            = "";
            string mPrintingFormat = ResString.GetPrintingProgress();

            info += "\n" + string.Format(mPrintingFormat, percent);
            this.m_StatusBarPanelPercent.Text = info;
        }
        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);
            }
        }
Ejemplo n.º 3
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;
        }
Ejemplo n.º 4
0
 private void comboBoxSkins_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (m_bInitFinished)
     {
         string info = ResString.GetResString("Restart_Skin");
         MessageBox.Show(info, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         this.isDirty = true;
     }
 }
Ejemplo n.º 5
0
        private void btnClear_Click(object sender, EventArgs e)
        {
            string info = ResString.GetResString("ColseNozzle_ClearAll_Question");

            if (MessageBox.Show(info, ResString.GetProductName(), MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                listBox1.Items.Clear();
            }
        }
Ejemplo n.º 6
0
        private void OnUnitChange(UILengthUnit newUnit)
        {
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numPos1);
            UIPreference.OnFloatNumericUpDownUnitChanged(newUnit, m_CurrentUnit, this.numPos2);

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

            UIPreference.NumericUpDownToolTip(newUnitdis, this.numPos1, this.m_ToolTip);
            UIPreference.NumericUpDownToolTip(newUnitdis, this.numPos2, this.m_ToolTip);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 波形映射表下发
        /// </summary>
        private void m_Button_WriteWaveMapping_Click(object sender, EventArgs e)
        {
            FileLog("Wave mapping Write");
            ControlsEnable(false);              //按钮无效化
            int Length = EpsonLCD.WriteWaveMappingData(ConstructWaveMapping());

            EpsonLCD.SetWaveMappingTotalLength(Length);
            MessageBox.Show(ResString.GetResString("Wave_Info_WaveMappingSengFinish"), "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
            ControlsEnable(true);                       //按钮有效化
        }
Ejemplo n.º 8
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;
        }
Ejemplo n.º 9
0
        public bool Start(IntPtr handle, bool bWrBd)
        {
            DEV_BROADCAST_DEVICEINTERFACE dbf = new DEV_BROADCAST_DEVICEINTERFACE();

            dbf.dbcc_size       = Marshal.SizeOf(dbf);
            dbf.dbcc_devicetype = Common.DBT_DEVTYP_DEVICEINTERFACE;
            dbf.dbcc_reserved   = 0;
            IntPtr hDevNotify1 = Common.RegisterDeviceNotification(handle, dbf, Common.DEVICE_NOTIFY_WINDOW_HANDLE | Common.DEVICE_NOTIFY_ALL_INTERFACE_CLASSES);
            int    lt          = 0;

            if (bWrBd)
            {
                BYHXSoftLock.CheckDongle_WrBd();
            }
            else
            {
                BYHXSoftLock.CheckDongle();
            }
#if ADD_HARDKEY
            BYHX_SL_RetValue ret = BYHXSoftLock.CheckValidDate(ref lt);

            switch (ret)
            {
            case BYHX_SL_RetValue.EXPIRED:
                m_bOutdated = true;
                MessageBox.Show(ResString.GetResString("EncryptDog_Expired"), ResString.GetProductName(), MessageBoxButtons.OK, MessageBoxIcon.Error);
                break;

            case BYHX_SL_RetValue.ILLEGALDOG:
                MessageBox.Show(ResString.GetResString("EncryptDog_Illegal"), ResString.GetProductName(), MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);

            case BYHX_SL_RetValue.NOFOUNDDOG:
                MessageBox.Show(ResString.GetResString("EncryptDog_NoFound"), ResString.GetProductName(), MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);

            case BYHX_SL_RetValue.WILLEXPIREDWORNING_100:
                MessageBox.Show(ResString.GetResString("EncryptDog_Warning"), ResString.GetProductName(), MessageBoxButtons.OK, MessageBoxIcon.Warning);
                tCheckDog.Interval = (lt - 1) * 60 * 1000 + 1;
                tCheckDog.Tick    += new EventHandler(tCheckDog_Tick);
                tCheckDog.Start();
                break;

            default:
                break;
            }
            if (lt > 60 * 100 && lt - 100 * 60 <= int.MaxValue / 1000 / 60)
            {
                tCloseTimer.Interval = (lt - 100 * 60) * 60 * 1000;
                tCloseTimer.Tick    += new EventHandler(tCloseTimer_Tick);
                tCloseTimer.Start();
            }
#endif
            return(true);
        }
Ejemplo n.º 10
0
        private void SetQrCodeThread(Object obj)
        {
            List <string> qrCodeList = obj as List <string>;

            if (qrCodeList != null)
            {
                for (int i = 0; i < qrCodeList.Count; i++)
                {
                    if (qrCodeList[i] != string.Empty)
                    {
                        feedBack     = false;
                        feedBackData = false;
                        List <byte> buffer    = new List <byte>();
                        byte        headIndex = (byte)i;
                        buffer.Add(0xC5);
                        buffer.Add(0xD3);
                        buffer.Add(headIndex);
                        buffer.AddRange(Encoding.ASCII.GetBytes(qrCodeList[i]));
                        if (buffer.Count < (TextLength + 3))
                        {
                            buffer.AddRange(new byte[(TextLength + 3) - buffer.Count]);
                        }
                        ushort value   = (ushort)HeadBoardIndex;
                        uint   bufsize = (uint)buffer.Count;
                        if (CoreInterface.SetEpsonEP0Cmd(0x80, buffer.ToArray(), ref bufsize, value, 0) == 0)
                        {
                            MessageBox.Show(ResString.GetResString("SendCmdError"));
                        }
                        for (int j = 0; j < 50; j++)
                        {
                            if (feedBack)
                            {
                                break;
                            }
                            Thread.Sleep(100);
                        }
                        //while (true)
                        //{
                        //    if (feedBack)
                        //        break;
                        //}
                        this.Invoke(new Action <bool, int>((x, y) =>
                        {
                            LabelTextBox textBox = flowLayoutPanel1.Controls[y] as LabelTextBox;
                            if (textBox != null)
                            {
                                textBox.MsgString = x ? 1 : 0;
                            }
                        }), feedBackData, i);
                    }
                }
            }
            this.Invoke(new Action <bool>(o => panel2.Enabled = o), true);
        }
Ejemplo n.º 11
0
 private void m_ButtonOK_Click(object sender, System.EventArgs e)
 {
     if (m_bNewXaar382 && this.xaarTempertureSetting1.IsDirty)
     {
         DialogResult dr = MessageBox.Show(ResString.GetResString("Xaar382_UnsavedWarning"), ResString.GetProductName(), MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (dr == DialogResult.No)
         {
             this.DialogResult = DialogResult.None;
         }
     }
 }
 /// <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;
     }
 }
Ejemplo n.º 13
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);
            }
        }
Ejemplo n.º 14
0
        public LayoutSettingConfig()
        {
            InitializeComponent();

            InitHGroupList();

            strEnable   = ResString.GetResString("Enable");
            strSource   = ResString.GetResString("Source");
            strDataType = ResString.GetResString("DataType");
            strXMirror  = ResString.GetResString("MirrorX");

            if (false)
            {
                cbxSpecialLayout.Visible = true;
                lblLayerSpaceY.Visible   = true;
                numLayerSpaceY.Visible   = true;
            }
            else
            {
                cbxSpecialLayout.Checked = false;
                cbxSpecialLayout.Visible = false;
                lblLayerSpaceY.Visible   = false;
                numLayerSpaceY.Visible   = false;
            }

            HeadColorList = PubFunc.SetHeadColorList();

            GetColorInfo();

            if (colorNum > 10)
            {
                this.Width += (colorNum - 10) * 35;
                if (this.Width > 1600)
                {
                    this.Width = 1600;
                }
            }

            m_LayoutSettingList = new LayoutSettingClassList();

            if (File.Exists(CoreConst.LayoutFileName))
            {
                var doc = new XmlDocument();
                doc.Load(CoreConst.LayoutFileName);
                m_LayoutSettingList = (LayoutSettingClassList)PubFunc.SystemConvertFromXml(doc.InnerXml, typeof(LayoutSettingClassList));
            }

            Bind();

            if (m_listBoxLayout.Items.Count > 0)
            {
                m_listBoxLayout.SelectedIndex = 0;
            }
        }
Ejemplo n.º 15
0
 private void m_ButtonSetLang_Click(object sender, EventArgs e)
 {
     try
     {
         string strMainPwd = m_SerialNoControlLang.GetText();
         SetPassword(strMainPwd, 1);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, ResString.GetProductName(), MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 16
0
        public PrinterWrite()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            this.Text = ResString.GetProductName();
        }
Ejemplo n.º 17
0
        public void SaveDataBase(int percent)
        {
            string printInfo = "";
            string JobName   = "";

            if (CoreInterface.PrintType == 1)//喷检
            {
                printInfo = "打印测试条";
                JobName   = "测试条";
            }
            else if (CoreInterface.PrintType == 2)//校准
            {
                printInfo = "打印校准";
                JobName   = "校准";
            }
            else if (CoreInterface.PrintType == 0)
            {
                TimeSpan time          = DateTime.Now - m_StartTime;
                string   strTime       = time.Hours.ToString() + ":" + time.Minutes.ToString() + ":" + time.Seconds.ToString();
                string   strPercentage = percent.ToString() + "%";
                string   strLengthProg = "";

                string unitStr = ResString.GetUnitSuffixDispName(UILengthUnit.Meter);
                string strArea = (m_fArea * percent / 100.0f).ToString() + " " + unitStr + "2";
                strLengthProg = (m_fLength * percent / 100.0f).ToString() + " " + unitStr;

                float efficient        = 0;
                float efficient_Length = 0;
                if (time.TotalSeconds != 0)
                {
                    efficient        = (float)(m_fArea * percent / 100.0f) / (float)time.TotalHours;
                    efficient_Length = (float)(m_fLength * percent / 100.0f) / (float)time.TotalHours;
                }
                string strEff      = efficient.ToString() + " " + unitStr + "2/h";
                string strLengthPh = efficient_Length.ToString() + " " + unitStr + "/h";


                //插入数据库
                printInfo = strPercentage + " 打印长度:" + strLengthProg + " 打印面积:" + strArea + " 产能:" + strEff;
                JobName   = m_curJob != null ? m_curJob.Name : "";
            }

            string sql = "Insert into AreaData(JobName,BeginTime,PrintInfo) values('" + JobName + "','" + CoreInterface.JobBegin.ToString("s") + "','" + printInfo + "')";

            DataBase DB = new DataBase();

            if (DB.OpenDB())
            {
                DB.ExecSQL(sql);
                DB.CloseDB();
            }
        }
Ejemplo n.º 18
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);
        }
Ejemplo n.º 19
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);
     }
 }
Ejemplo n.º 20
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);
        }
Ejemplo n.º 21
0
 private void SetContenLableValue(string strValueName)
 {
     this.m_labConten.Text     = ResString.GetResString(strValueName);
     this.m_labConten.Height   = this.Height * 2 / 3;
     this.m_labConten.Width    = this.Width * 2 / 3;
     this.m_labConten.Location = new Point(this.Width / 5, this.Height / 5);
     //this.BackColor = System.Drawing.Color.White;
     this.m_labConten.BackColor = this.BackColor;
     this.m_labConten.Font      = new System.Drawing.Font("SimSun", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     //this.m_labConten.AutoSize = true;
     this.m_labConten.Visible = true;
     //this.m_labConten.ForeColor=Color.FromName("#99FF00");
     //this.m_labConten.ForeColor = System.Drawing.Color.FromArgb(255,255,255);
 }
Ejemplo n.º 22
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);
     }
 }
Ejemplo n.º 23
0
        public void OnPrinterStatusChanged(JetStatusEnum status)
        {
            UpdateButtonStates(status);
            SetPrinterStatusChanged(status);
            if (status == JetStatusEnum.Error)
            {
                OnErrorCodeChanged(CoreInterface.GetBoardError());

                int        errorCode  = CoreInterface.GetBoardError();
                SErrorCode sErrorCode = new SErrorCode(errorCode);
                if (SErrorCode.IsOnlyPauseError(errorCode))
                {
                    string errorInfo = SErrorCode.GetInfoFromErrCode(errorCode);

                    if (
                        MessageBox.Show(errorInfo, ResString.GetProductName(), MessageBoxButtons.RetryCancel,
                                        MessageBoxIcon.Exclamation) == DialogResult.Retry)
                    {
                        CoreInterface.Printer_Resume();
                    }
                }
            }
            else
            {
                OnErrorCodeChanged(0);
            }
            if (status != JetStatusEnum.PowerOff && status != JetStatusEnum.Initializing && m_IsFATAL == false)
            {
                if (SPrinterProperty.IsGongZeng() || SPrinterProperty.IsDocanPrintMode() || SPrinterProperty.IsRuiZhi()) // 此功能按 厂商限定
                {
                    byte[]           infos = new byte[19];
                    BYHX_SL_RetValue ret   = BYHXSoftLock.GetDongleInfo(ref infos);
                    if (ret == BYHX_SL_RetValue.SUCSESS)
                    {
                        byte[] dtV = new byte[4];
                        Buffer.BlockCopy(infos, 4, dtV, 0, dtV.Length);
                        uint boardId = BitConverter.ToUInt32(dtV, 0);
                        if (CoreInterface.IsFatal(boardId))
                        {
                            m_IsFATAL = true;
                        }
                    }
                }
                else
                {
                    m_IsFATAL = true;
                }
            }
        }
Ejemplo n.º 24
0
 private void button_GetAxisMtParam_Click(object sender, EventArgs e)
 {
     try
     {
         dataGridView_AxisMtParam.Rows.Clear();
         _executeType = ExecuteType.GetAxisMtParam;
         EnableControl(false);
         string json       = "{\"GetAxis\":\"MtParam\"}";
         byte[] buffer     = Encoding.ASCII.GetBytes(json);
         uint   bufferSize = (uint)buffer.Length;
         int    ret        = CoreInterface.SetEpsonEP0Cmd(Cmd, buffer, ref bufferSize, (ushort)bufferSize, 0);
         if (ret == 0)
         {
             MessageBox.Show(ResString.GetResString("SendCmdFailed"));
             EnableControl(true);
         }
         //GetAxisMtParamRoot root = new GetAxisMtParamRoot()
         //{
         //    GetAxisMtParam = new List<GetAxisMtParam>()
         //    {
         //        new GetAxisMtParam()
         //        {
         //            device = "Dsp",
         //            initOriSen = 1,
         //            initTerSen = 0,
         //            jerkSen = 0,
         //            limitOriSen = 0,
         //            limitTerSen = 0,
         //        },
         //        new GetAxisMtParam()
         //        {
         //            device = "Dsp",
         //            initOriSen = 0,
         //            initTerSen = 0,
         //            jerkSen = 0,
         //            limitOriSen = 0,
         //            limitTerSen = 0,
         //        }
         //    }
         //};
         //json = JsonConvert.SerializeObject(root);
         //CallBack(Encoding.ASCII.GetBytes(json));
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message);
         EnableControl(true);
     }
 }
Ejemplo n.º 25
0
        private void m_buttonCopyAs_Click(object sender, EventArgs e)
        {
            if (m_listBoxLayout.SelectedIndex < 0)
            {
                return;
            }

            try
            {
                int LayoutIdx = m_listBoxLayout.SelectedIndex;

                if (LayoutIdx < 0)
                {
                    return;
                }

                LayoutSettingClass Layout = m_LayoutSettingList.Items[LayoutIdx];

                if (Layout.Name != "")
                {
                    List <string> ExistLayout = new List <string>();
                    foreach (LayoutSettingClass item in m_LayoutSettingList.Items)
                    {
                        ExistLayout.Add(item.Name);
                    }

                    CommonEditForm Form = new CommonEditForm(ExistLayout);
                    Form.Text = ResString.GetResString("Add_Layout");
                    if (DialogResult.OK == Form.ShowDialog())
                    {
                        LayoutSettingClass newItem = new LayoutSettingClass();
                        newItem.Layout        = Layout.Layout.Clone();
                        newItem.SpecialLayout = Layout.SpecialLayout;
                        newItem.SpecialYSpace = Layout.SpecialYSpace;
                        newItem.Name          = Form.Input;

                        m_LayoutSettingList.Items.Add(newItem);

                        Bind();

                        m_listBoxLayout.SelectedIndex = m_listBoxLayout.Items.Count - 1;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Failed to copy layout:" + ex.Message);
            }
        }
Ejemplo n.º 26
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;
        }
Ejemplo n.º 27
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);
        }
Ejemplo n.º 28
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     //if (this.checkBoxClose.Checked == false)
     //{
     //    if (File.Exists(filePath))
     //    {
     //        File.Delete(filePath);
     //    }
     //}
     //else
     {
         Save();
         MessageBox.Show("Save Successful!", ResString.GetProductName());
     }
 }
Ejemplo n.º 29
0
        private void buttonGetHeadQR_Click(object sender, EventArgs e)
        {
            if (comboBox_HeadBoardIndex.SelectedIndex < 0)
            {
                MessageBox.Show(ResString.GetResString("inputerror"));
                return;
            }
            GetQRCodeFlag = false;
            for (int i = 0; i < HeadNumPerBoard; i++)
            {
                LabelTextBox textBox1 = flowLayoutPanel1.Controls[i] as LabelTextBox;
                LabelTextBox textBox2 = flowLayoutPanel2.Controls[i] as LabelTextBox;
                if (textBox1 != null && textBox2 != null)
                {
                    textBox1.Text             = string.Empty;
                    textBox2.Text             = string.Empty;
                    textBox1.MsgString        = 2;
                    textBox2.MsgString        = 2;
                    textBox1.TextBoxBackColor = SystemColors.Window;
                    textBox2.TextBoxBackColor = SystemColors.Window;
                }
                else
                {
                    //MessageBox.Show(@"Control Is NULL!");
                    return;
                }
            }
            byte[] val = new byte[2];
            val[0] = 0xC5;
            val[1] = 0xE6;
            uint   bufsize = (uint)val.Length;
            ushort value   = (ushort)comboBox_HeadBoardIndex.SelectedIndex;

            if (CoreInterface.SetEpsonEP0Cmd(0x80, val, ref bufsize, value, 0) == 0)
            {
                MessageBox.Show(ResString.GetResString("SendCmdError"));
            }
            else
            {
                panel2.Enabled = false;
            }
            Thread thread = new Thread(GetQRCode_TimeOut)
            {
                IsBackground = true
            };

            thread.Start();
        }
Ejemplo n.º 30
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);
        }