private async void btn_Go_Clicked(object sender, EventArgs e) { if (txt_Sid.Text == null || txt_Sid.Text.Length == 0) { Util.ShowLongToast("请输入番剧地址"); return; } if (txt_Sid.Text.Contains("av")) { _aid = Regex.Match(txt_Sid.Text, @"\d{1,9}", RegexOptions.Singleline).Groups[0].Value; _videoType = VideoType.Video; BindingContext = null; ls.IsVisible = false; ls_Video.IsVisible = true; LoadVideoInfo(); } else { if (txt_Sid.Text.Contains("ep")) { _sid = await Util.BangumiEpidToSid(Regex.Match(txt_Sid.Text, @"\d{1,9}", RegexOptions.Singleline).Groups[0].Value); } else { _sid = Regex.Match(txt_Sid.Text, @"\d{1,9}", RegexOptions.Singleline).Groups[0].Value; } _videoType = VideoType.Anime; BindingContext = null; ls.IsVisible = true; ls_Video.IsVisible = false; LoadAnimeInfo(); } _downlaodType = (DownlaodType)SettingHelper.GetDownMode(); }
private void LoadSetting() { loadSetting = true; txt_ver.Text = "Ver " + Util.GetVersion(); cb_DownloadMode.SelectedIndex = SettingHelper.GetDownMode(); txt_DownPath.Text = SettingHelper.GetDownPath(); cb_Client.SelectedIndex = SettingHelper.GetClientMode(); cb_Q.SelectedIndex = SettingHelper.GetQuality(); loadSetting = false; }
protected async override void OnAppearing() { base.OnAppearing(); if (BindingContext == null) { await Task.Delay(500); //txt_Sid.Text = "http://m.bilibili.com/bangumi/play/ss6339"; //txt_Sid.Text = "av17254855"; //txt_Sid.Text = "http://m.bilibili.com/bangumi/play/ss4187"; Util.CheckUpdate(this, false); } _downlaodType = (DownlaodType)SettingHelper.GetDownMode(); }