小编Xyp*_*hos的帖子

在 Windows 8 上的 C# 中注册自定义 URL 处理程序

using System;
using System.Windows.Forms;
using Microsoft.Win32;

namespace Aodb
{
    internal static class AodbProtocol
    {
        private const string _Protocol = "aodb";
        private const string _ProtocolHandler = "url.aodb";

        private static readonly string _launch = string.Format(
            "{0}{1}{0} {0}%1{0}", (char)34, Application.ExecutablePath);

        private static readonly Version _win8Version = new Version(6, 2, 9200, 0);

        private static readonly bool _isWin8 =
            Environment.OSVersion.Platform == PlatformID.Win32NT &&
            Environment.OSVersion.Version >= _win8Version;

        internal static void Register()
        {
            if (_isWin8) RegisterWin8();
            else RegisterWin7();
        }

        private static void RegisterWin7()
        {
            var regKey = …
Run Code Online (Sandbox Code Playgroud)

c# windows-8

2
推荐指数
1
解决办法
2325
查看次数

标签 统计

c# ×1

windows-8 ×1