| | |
| | | /// <summary> |
| | | /// 显示加载界面 |
| | | /// </summary> |
| | | public static Loading Loading = new Loading(); |
| | | public static Loading loading = new Loading(); |
| | | VerticalRefreshLayout verticalRefresh; |
| | | |
| | | public void Show() |
| | |
| | | |
| | | verticalRefresh.BeginHeaderRefreshingAction += () => |
| | | { |
| | | SeachMusic(); |
| | | verticalRefresh.EndHeaderRefreshing(); |
| | | SeachMusic(false); |
| | | |
| | | }; |
| | | this.AddChidren(Loading); |
| | | this.AddChidren(loading); |
| | | |
| | | if (A31MusicModel.A31MusicModelList.Count == 0) |
| | | { |
| | |
| | | if (Yes) |
| | | { |
| | | //为了第一次进来log一下; |
| | | Loading.Start(); |
| | | loading.Start(); |
| | | } |
| | | SendMethod.Seach((obj) => |
| | | { |
| | |
| | | { |
| | | readServerOrClientMode(); |
| | | A31MusicModel.Save(); |
| | | if (!Yes) |
| | | { |
| | | ///等待跑完在关闭 |
| | | verticalRefresh.EndHeaderRefreshing(); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (Yes) |
| | | { |
| | | //为了第一次进来log一下; |
| | | Loading.Hide(); |
| | | loading.Hide(); |
| | | } |
| | | verticalRefresh.RemoveAll(); |
| | | for (int i = 0; i < A31MusicModel.A31MusicModelList.Count; i++) |
| | |
| | | musicView.songNameBtn.Text = a31player.A31PlayStatus.Title; |
| | | musicView.musicNameBtn.Text = a31player.Name; |
| | | musicView.regionBtn.TextID = StringId.region; |
| | | |
| | | |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> clickMergence = (sender, e) => |
| | | { |
| | | new View.DialogView { }.PlayMergence(); |
| | | if (a31player.ServerClientType == 0) |
| | | { |
| | | new View.DialogView { }.PlayMergence(); |
| | | } |
| | | else if (a31player.ServerClientType == 1) |
| | | { |
| | | new View.DialogView { }.DetachPlayMergence(a31player); |
| | | |
| | | } |
| | | }; |
| | | musicView.mergeBjBtn.MouseUpEventHandler += clickMergence; |
| | | musicView.mergeBtn.MouseUpEventHandler += clickMergence; |
| | |
| | | { |
| | | a31player.ServerClientType = 0; |
| | | var result = SendMethod.OpenWeb("http://" + a31player.IPAddress + "/httpapi.asp?command=multiroom:getSlaveList"); |
| | | if (result == null) |
| | | if (result == null && result == "Failed") |
| | | { |
| | | result = SendMethod.OpenWeb("http://" + a31player.IPAddress + "/httpapi.asp?command=multiroom:getSlaveList"); |
| | | } |
| | | if (result != null) |
| | | if (result != null && result != "Failed") |
| | | { |
| | | a31player.Slave = Newtonsoft.Json.JsonConvert.DeserializeObject<Slaves>(result); |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var ss = e.Message; |
| | | } |
| | | catch { } |
| | | } |
| | | |
| | | } |