Beispiel #1
0
        /// <summary>
        /// 获取扩展板加热保护温度.并显示到界面
        /// </summary>
        private void GetExtHeadOverHeat()
        {
            byte[] buf     = new byte[64];
            uint   bufsize = (uint)buf.Length;
            int    ret     = CoreInterface.GetEpsonEP0Cmd(0x7f, buf, ref bufsize, 0, 3);

            if (ret != 0)
            {
                ExtHeadOverHeat overHeat = (ExtHeadOverHeat)SerializationUnit.BytesToStruct(buf.Skip(2).ToArray(), typeof(ExtHeadOverHeat));
                numHeatingProtectionTemp.Value = (decimal)(overHeat.OverHeatTmp / 100f);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 设置扩展板加热保护温度
        /// </summary>
        private void SetExtHeadOverHeat()
        {
            ExtHeadOverHeat headOverHeat = new ExtHeadOverHeat();

            headOverHeat.Flag        = new char[] { 'H', 'H', 'O', 'T' };
            headOverHeat.OverHeatTmp = (ushort)(numHeatingProtectionTemp.Value * 100);
            byte[] buf     = SerializationUnit.StructToBytes(headOverHeat);
            uint   bufsize = (uint)buf.Length;
            int    ret     = CoreInterface.SetEpsonEP0Cmd(0x7f, buf, ref bufsize, 0, 3);

            if (ret == 0)
            {
                MessageBox.Show("Set Over Heat temp error!");
            }
        }