public BoardViewModel(Board boardPage, Venue.Venue venue)
 {
     m_venue     = venue;
     m_boardPage = boardPage;
     //LoadPlayers();
     LoadCourts();
 }
 public async Task AddVenueAsync(Venue.Venue item)
 {
     try
     {
         await m_venueTable.InsertAsync(item);
     }
     catch { }
 }
 public static async void AddVenueAsync(Venue.Venue venue)
 {
     try
     {
         await DataManager.DefaultManager.AddVenueAsync(venue);
     }
     catch { }
 }
Exemple #4
0
        public void EnterVenue(Venue.Venue venue)
        {
            if (venue == null)
            {
                throw new ArgumentNullException(nameof(venue));
            }

            this.CurrentVenue = venue;
        }
Exemple #5
0
        public static Activity CreateMessageActivity(
            Location location,
            string userId,
            string userName,
            string message,
            Venue.Venue venue)
        {
            var timestamp = DateTime.UtcNow;

            return(CreateMessageActivity(ActivityKeyFactory.CreateRowKey(timestamp, userId), timestamp, location, userId, userName, message, venue));
        }
Exemple #6
0
        public static Activity CreateDrinkActivity(
            Location location,
            string userId,
            string userName,
            DrinkType drinkType,
            string drinkId,
            string drinkName,
            double drinkAlcPrc,
            double drinkVolume,
            Venue.Venue venue)
        {
            var timestamp = DateTime.UtcNow;

            return(CreateDrinkActivity(ActivityKeyFactory.CreateRowKey(timestamp, userId), timestamp, location, userId, userName, drinkType, drinkId, drinkName, drinkAlcPrc, drinkVolume, venue));
        }
Exemple #7
0
        public static Activity CreateMessageActivity(
            string id,
            DateTime timestamp,
            Location location,
            string userId,
            string userName,
            string message,
            Venue.Venue venue)
        {
            var activity = new Activity(id, ActivityType.Message, timestamp, location, userId, userName)
            {
                Message = new MessageActivityInfo(message),
                Venue   = venue
            };

            return(activity);
        }
Exemple #8
0
        public static Activity CreateDrinkActivity(
            string id,
            DateTime activityTimestamp,
            Location location,
            string userId,
            string userName,
            DrinkType drinkType,
            string drinkId,
            string drinkName,
            double drinkAlcPrc,
            double drinkVolume,
            Venue.Venue venue)
        {
            var activity = new Activity(id, ActivityType.Drink, activityTimestamp, location, userId, userName)
            {
                Drink = new DrinkActivityInfo(drinkType, drinkId, drinkName, drinkAlcPrc, drinkVolume),
                Venue = venue
            };

            return(activity);
        }
Exemple #9
0
 public User(string id, string name, int?weight, Gender gender, string profileImageUrl, PushInfo pushInfo, List <UserInfo> friends, Venue.Venue currentVenue, string language, DateTime lastOnline, List <FriendRequest> friendRequests, List <Guid> invitations)
 {
     this.Id                     = id ?? throw new ArgumentNullException(nameof(id));
     this.Name                   = name ?? throw new ArgumentNullException(nameof(name));
     this.Weight                 = weight;
     this.Gender                 = gender;
     this.ProfileImageUrl        = profileImageUrl;
     this.PushInfo               = pushInfo;
     this._friends               = friends ?? new List <UserInfo>();
     this.CurrentVenue           = currentVenue;
     this.Language               = language ?? Constants.DefaultLanguage;
     this.LastOnline             = lastOnline;
     this._pendingFriendRequests = friendRequests ?? new List <FriendRequest>();
     this._invitations           = invitations ?? new List <Guid>();
 }
 public AddVenueActivityCommand(string userId, string message, VenueAction action, Venue.Venue venue)
 {
     UserId  = userId ?? throw new ArgumentNullException(nameof(userId));
     Message = message ?? throw new ArgumentNullException(nameof(message));
     Action  = action;
     Venue   = venue ?? throw new ArgumentNullException(nameof(venue));
 }
Exemple #11
0
        public static Activity CreateVenueActivity(string id, DateTime activityTimestamp, string userId, string userName, Venue.Venue venue, VenueAction action)
        {
            if (action == VenueAction.Unknown)
            {
                throw new ArgumentException("Invalid venue action!");
            }

            var activity = new Activity(id, action == VenueAction.Enter ? ActivityType.VenueEntered : ActivityType.VenueLeft,
                                        activityTimestamp, venue.Location, userId, userName)
            {
                Venue = venue
            };

            return(activity);
        }
Exemple #12
0
        public static Activity CreateVenueActivity(string userId, string userName, Venue.Venue venue, VenueAction action)
        {
            var timestamp = DateTime.UtcNow;

            return(CreateVenueActivity(ActivityKeyFactory.CreateRowKey(timestamp, userId), timestamp, userId, userName, venue, action));
        }