Exemplo n.º 1
0
 public static void SetUrlProtocol(string link)
 {
     try
     {
         var service = new URISchemeService(link, @"URL:ShadowsocksR Link", $@"""{Utils.GetExecutablePath()}""");
         service.Set();
     }
     catch
     {
         // ignored
     }
 }
Exemplo n.º 2
0
        public void LocalMachineTest()
        {
            const string key     = @"ssb";
            var          service = new URISchemeService(key, @"URL:ssa Protocol", @"D:\MyAppPath\MyApp.exe --openurl", RegisterType.LocalMachine);

            Assert.IsFalse(service.Check());

            service.Set();
            Assert.IsTrue(service.Check());

            service.Delete();
            Assert.IsFalse(service.Check());
        }
Exemplo n.º 3
0
        public void CurrentUserTest()
        {
            const string key     = @"ssa";
            var          service = new URISchemeService(key, @"URL:ssa Protocol", @"D:\MyAppPath\MyApp.exe --openurl");

            Assert.IsFalse(service.Check());

            service.Set();
            Assert.IsTrue(service.Check());

            service.Delete();
            Assert.IsFalse(service.Check());
        }