⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 onlinehelper.cs

📁 微软的行业应用解决方案示例
💻 CS
字号:
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using HardwareDistributor.Utilities;

namespace HardwareDistributor.UI
{

    class OnlineHelper
    {
        private const int WM_QUIT = 0x00;

        private OnlineHelp _helpForm;

        public OnlineHelper(string helpFile)
        {
            _helpForm = new OnlineHelp(helpFile);
        }

        public void ShowDialog()
        {
            _helpForm.ShowDialog();
        }

        public void Dispose()
        {
            //this will cause the internal browser control to issue PostQuitMessage (bug in standard devices)
            _helpForm.Dispose();

            //only do this for standard devices
            if (Microsoft.WindowsCE.Forms.SystemSettings.Platform == Microsoft.WindowsCE.Forms.WinCEPlatform.Smartphone)
            {
                // This is to handle the future where the quit message may not be posted by the native control, in which
                // case, this loop will not terminate until some other event cause a WM_QUIT to be posted into the queue
                Native.PostQuitMessage(0); 

                //set up windows message loop to handle the WM_QUIT event
                Native.MSG msg;
                while (Native.GetMessage(out msg, new IntPtr(0), 0, 0) != WM_QUIT)
                {
                    //all other events are sent off for default processing
                    Native.TranslateMessage(ref msg);
                    Native.DispatchMessage(ref msg);
                }

            }
        }

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -