Exemplo n.º 1
0
        static Task OpenUri(OpenWebLink request)
        {
            switch (request.Type)
            {
            // Online
            case ViewType.Browse:
                return(UriOpener.OpenUri(Urls.Play, request.Additional));

            case ViewType.Friends:
                return(UriOpener.OpenUri(Urls.Main, "me/friends"));

            case ViewType.PremiumAccount:
                return(UriOpener.OpenUri(Urls.Main, "me/premium"));

            case ViewType.Settings:
                var port = Cheat.Args.Port == null ? "" : $"&port={Cheat.Args.Port}";
                return(UriOpener.OpenUri(Urls.Main, "client-landing?openClientSettings=1&sync=1" + port));

            case ViewType.ClientLanding:
                return(UriOpener.OpenUri(Urls.Main, "client-landing?sync=1"));

            case ViewType.GoPremium:
                return(UriOpener.OpenUri(Urls.Main, "gopremium"));

            case ViewType.Help:
                return(UriOpener.OpenUri(new Uri("http://withsix.readthedocs.org")));

            case ViewType.Profile:
                return(UriOpener.OpenUri(Urls.Main, "me/content"));

            case ViewType.Issues:
                return(UriOpener.OpenUri(new Uri("https://trello.com/b/EQeUdFGd/withsix-report-issues")));

            // Link to comments and feedback instead??

            case ViewType.Suggestions:
                return
                    (UriOpener.OpenUri(new Uri("https://community.withsix.com/category/4/comments-feedback")));

            case ViewType.Community:
                return
                    (UriOpener.OpenUri(new Uri("https://community.withsix.com")));

            case ViewType.License:
                return(UriOpener.OpenUri(Urls.Main, "legal"));

            case ViewType.Update:
                return(UriOpener.OpenUri(Urls.Main, "update"));

            default: {
                throw new NotSupportedException(request.Type + " Is not supported!");
            }
            }
        }
Exemplo n.º 2
0
 public Task Handle(OpenArbWebLink request) => UriOpener.OpenUri(request.Uri).Void();