12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace HNWD.LatticeScreen.Server
- {
- internal class ClockDateTimeProgram : ProgramBase
- {
- public ClockDateTimeProgram(LedLatticeScreen ledLatticeScreen)
- : base()
- {
- this.ledLatticeScreen = ledLatticeScreen;
- }
- public override void PlayWithErase()
- {
- this.GetTextAlignMode(this.wd_ProgramInfo.PROGRAM_ALIGN);
- this.ledLatticeScreen.JHErase();
- /* 调用屏幕操作中的DrawText接口来立即显示一段文本 */
- this.responseByLedCommand = LedControl.JHDrawText(this.ledLatticeScreen.hdl, Convert.ToInt16(this.wd_ProgramInfo.PROGRAM_X), 0, Convert.ToUInt16(this.wd_ProgramInfo.PROGRAM_WIDTH), Convert.ToUInt16(Convert.ToUInt16(this.wd_ProgramInfo.PROGRAM_HEIGHT) / 2), this.AlignMode, DateTime.Now.ToString("yyyy年MM月dd日"));
- this.responseByLedCommand = LedControl.JHDrawText(this.ledLatticeScreen.hdl, Convert.ToInt16(this.wd_ProgramInfo.PROGRAM_X), Convert.ToInt16(Convert.ToUInt16(this.wd_ProgramInfo.PROGRAM_HEIGHT) / 2), Convert.ToUInt16(this.wd_ProgramInfo.PROGRAM_WIDTH), Convert.ToUInt16(Convert.ToUInt16(this.wd_ProgramInfo.PROGRAM_HEIGHT) / 2), this.AlignMode, DateTime.Now.ToString("HH:mm:ss"));
- this.ResponseMessage();
- }
- public override void PlayWithoutErase()
- {
- this.GetTextAlignMode(this.wd_ProgramInfo.PROGRAM_ALIGN);
- /* 调用屏幕操作中的DrawText接口来立即显示一段文本 */
- this.responseByLedCommand = LedControl.JHDrawText(this.ledLatticeScreen.hdl, Convert.ToInt16(this.wd_ProgramInfo.PROGRAM_X), 0, Convert.ToUInt16(this.wd_ProgramInfo.PROGRAM_WIDTH), Convert.ToUInt16(Convert.ToUInt16(this.wd_ProgramInfo.PROGRAM_HEIGHT) / 2), this.AlignMode, DateTime.Now.ToString("yyyy年MM月dd日"));
- this.responseByLedCommand = LedControl.JHDrawText(this.ledLatticeScreen.hdl, Convert.ToInt16(this.wd_ProgramInfo.PROGRAM_X), Convert.ToInt16(Convert.ToUInt16(this.wd_ProgramInfo.PROGRAM_HEIGHT) / 2), Convert.ToUInt16(this.wd_ProgramInfo.PROGRAM_WIDTH), Convert.ToUInt16(Convert.ToUInt16(this.wd_ProgramInfo.PROGRAM_HEIGHT) / 2), this.AlignMode, DateTime.Now.ToString("HH:mm:ss"));
-
- this.ResponseMessage();
- }
- }
- }
|