示例#1
0
        static void Main(string[] args)
        {
            Microwave microwave = new Microwave();

            microwave.ChoosePower();
            microwave.ChooseTime();
            microwave.Start();
        }
示例#2
0
        public Form()
        {
            InitializeComponent();
            Action        = isAction.isStop;
            microwave     = new Microwave(this);
            lblTimer.Text = microwave.TimePowerUpdate();
            isOpened      = false;

            byte[] fontData = Properties.Resources.LCDM2N;
            IntPtr fontPtr  = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(fontData.Length);

            System.Runtime.InteropServices.Marshal.Copy(fontData, 0, fontPtr, fontData.Length);
            uint dummy = 0;

            fonts.AddMemoryFont(fontPtr, Properties.Resources.LCDM2N.Length);
            AddFontMemResourceEx(fontPtr, (uint)Properties.Resources.LCDM2N.Length, IntPtr.Zero, ref dummy);
            System.Runtime.InteropServices.Marshal.FreeCoTaskMem(fontPtr);

            myFont = new Font(fonts.Families[0], 12.0F);

            lblTimer.Font = myFont;
        }