private async void ShowNotification(JoinTeamModel context) { var notificationManager = new NotificationManager(); await notificationManager.ShowAsync( new NotificationContent { Title = context.NotificationText, }, areaName : "WindowArea"); }
/// <summary> /// 加入队伍 /// </summary> /// <param name="model">加入组队的数据模型</param> /// <returns>是否加入成功</returns> public bool JoinTeam([FromBody] JoinTeamModel model) { var team = TeamsCache.Instance.FindTeam(model.TeamId); if (team == null) { return(false); } var player = OnlinePlayersCache.Instance.FindPlayer(model.InvitedPlayerId); if (player == null) { return(false); } return(player.JoinTeam(team)); }
public JoinTeamCommand(JoinTeamModel viewModel) { _viewModel = viewModel; _viewModel.PropertyChanged += ViewModel_PropertyChanged; }