public static async Task InstallAsset(string link) { Uri uri = new Uri(link); if (!Protocols.Contains(uri.Scheme)) { return; } switch (uri.Scheme) { case "modelsaber": await ModelSaber(uri); break; case "beatsaver": await BeatSaver(uri); break; case "bsplaylist": await Playlist(uri); break; } if (App.OCIWindow != "No") { Status.StopRotation(); API.Utils.SetMessage((string)Application.Current.FindResource("OneClick:Done")); } if (App.OCIWindow == "Close") { API.Utils.ClearTitleMessage(); API.Utils.SetMessageWithoutNl("3... "); await Task.Delay(1000); API.Utils.SetMessageWithoutNl("2... "); await Task.Delay(1000); API.Utils.SetMessageWithoutNl("1... "); await Task.Delay(1000); Application.Current.Shutdown(); } }
public static async Task InstallAsset(string link) { Uri uri = new Uri(link); if (!Protocols.Contains(uri.Scheme)) { return; } switch (uri.Scheme) { case "modelsaber": await ModelSaber(uri); break; case "beatsaver": await BeatSaver(uri); break; case "bsplaylist": await Playlist(uri); break; case "web+bsmap": await WebBSMap(uri); break; } if (App.OCIWindow != "No") { Status.StopRotation(); API.Utils.SetMessage((string)Application.Current.FindResource("OneClick:Done")); } if (App.OCIWindow == "Notify") { Utils.SendNotify((string)Application.Current.FindResource("OneClick:DoneNotify")); Application.Current.Shutdown(); } if (App.OCIWindow == "Close") { Application.Current.Shutdown(); } }