public CoachRemovePlayer() { InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _ICoachPlayersPage = ProgramContainer.container.GetInstance <ICoachPlayersPage>(); _IPlayerRepository = ProgramContainer.container.GetInstance <IPlayerRepository>(); Player[] players = _ICoachPlayersPage.GetPlayers(); for (int i = 0; i < players.Length; i++) { if (players[i].FirstName == "") { continue; } inner.RowDefinitions.Add(new RowDefinition()); Button butt = new Button() { Content = players[i].FirstName + " " + players[i].LastName, Background = LogOutButtonColorBrush, Tag = i, //Player number in coach's list. }; butt.SetValue(Grid.RowProperty, i); butt.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Center); butt.Click += new RoutedEventHandler(RemovePlayerClick); inner.Children.Add(butt); } }
public PlayerViewSleep() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); player = _signInFlow.GetPlayer(); Init(); }
public Coach_View_Players() { InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _ICoachPlayersPage = ProgramContainer.container.GetInstance <ICoachPlayersPage>(); Player[] players = _ICoachPlayersPage.GetPlayers(); for (int i = 0; i < players.Length; i++) { inner.RowDefinitions.Add(new RowDefinition()); Button butt = new Button() { Content = (players[i].FirstName != "") ? players[i].FirstName + " " + players[i].LastName : "Code: " + players[i].UserId, Background = ButtonColorBrush, Foreground = ButtonTextColorBrush, Tag = i, //Player number in coach's list. }; butt.SetValue(Grid.RowProperty, i); butt.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Center); if (players[i].FirstName != "") { butt.Click += new RoutedEventHandler(button_view_player_goals); } else { butt.Click += new RoutedEventHandler(UnassignedPlayerClick); } inner.Children.Add(butt); } }
public New_User() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); textBlock1.Text = "Hi, welcome to Boost!\n" + "Your first step for a healthier lifestyle!"; }
public NewUserExplenations() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); textBlock1.Text = "Let's get started!\n" + "In boost there are 2 kinds of users: Players and Coaches.\n" + "\n" + "Coaches assign players' daily and weekly goals, for each goal a coach select if the player accomplishes it he will receive a reward in the form of crystals!\n" + "\n" + "Players need to finish their daily and weekly goals to get healthier and gain crystals to spend on games in the Game Hub!\n" + "\n" + "What are crystals?\n" + "-Crystals are boost's currency, they are what keeps the players motivated and the coaches up to date on their players' activities.\n" + "\n" + "-Each 1 ILS is worth 100 crystals so be cautious on how you spend them!\n" + "\n" + "-Coaches can reward their players with crystals for both accomplishing their daily or weekly goals and for performing extraordinary activities (by the coach's judgment)\n" + "\n" + "You will now choose if you want to be a player or a coach!\n" + "Friendly reminder:\n" + "-A coach needs to enter both a credit card and goals for his players.\n" + "\n" + "-A player needs to have a coach, once a coach creates a new player he will get a code to give to his player, if you do not have a coach you will not have a code and you couldn’t register to boost.\n" + "\n" + "Good Luck and have fun!\n"; }
public New_Coach_Add_New_Player() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _IGoalsHandler = ProgramContainer.container.GetInstance <IGoalsHandler>(); _ICoachPlayersPage = ProgramContainer.container.GetInstance <ICoachPlayersPage>(); welcome.Text = "Hi " + _signInFlow.GetCoach().FirstName + " \nTime to add your first Player. \nEnter your player's email and we will do the rest."; }
public New_Coach_Explenations() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _IPlayerRepository = ProgramContainer.container.GetInstance <IPlayerRepository>(); _userTypeRepository = ProgramContainer.container.GetInstance <UserTypeRepository>(); Coach coach = _signInFlow.NewCoachFlow(); if (Game_Hub.CoachAndPlayer) { _userTypeRepository.SaveUserType(coach.UserId, UserType.CoachAndPlayer); ((SignInFlow)_signInFlow).SaveUserToLocalStorage(UserType.Coach); } if (coach.FirstName == null) { this.Frame.Navigate(typeof(New_Coach)); return; } welcome.Text = "Hi " + coach.FirstName + ".\n" + "\n" + "You will soon add your first player, but before that you will need to enter your credit card number!\n" + "\n" + "As you recall in boost we use Crystals for games' cost.\n" + "\n" + "1 ILS is worth 100 Crystals so when you reward your player with crystals tha appropriate amount of money will be deducted from your bank account\n" + "\n" + "After that you will add your first player!\n"; }
public CoachAddNewPlayerWeeklyGoals() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _ICoachPlayersPage = ProgramContainer.container.GetInstance <ICoachPlayersPage>(); _IGoalsHandler = ProgramContainer.container.GetInstance <IGoalsHandler>(); welcome.Text = "Hi " + _signInFlow.GetCoach().FirstName + " \nPlease set your player's weekly goals."; }
public PlayerViewDailyGoals() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _IProgressFetcher = ProgramContainer.container.GetInstance <IProgressFetcher>(); _IGoalsHandler = ProgramContainer.container.GetInstance <IGoalsHandler>(); InitAllProgressBars(inner, DateTime.Now, 0); }
public PlayerCompareProgress() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _CompareUser = ProgramContainer.container.GetInstance <ICompareUser>(); Init(); }
public PlayerViewRecentActivities() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _activityFetcher = ProgramContainer.container.GetInstance <IActivityFetcher>(); player = _signInFlow.GetPlayer(); Init(); }
public CoachViewPlayerComparison() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _CompareUser = ProgramContainer.container.GetInstance <ICompareUser>(); _ICoachPlayersPage = ProgramContainer.container.GetInstance <ICoachPlayersPage>(); player = (_ICoachPlayersPage.GetPlayers())[Coach_View_Players.Tag]; Init(); }
public CoachEditPlayerGoals() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _ICoachPlayersPage = ProgramContainer.container.GetInstance <ICoachPlayersPage>(); _IGoalsHandler = ProgramContainer.container.GetInstance <IGoalsHandler>(); player = (_ICoachPlayersPage.GetPlayers())[Coach_View_Players.Tag]; InitializeTextBoxes(); }
public CoachViewPlayerWeeklyGoals() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _IProgressFetcher = ProgramContainer.container.GetInstance <IProgressFetcher>(); _IGoalsHandler = ProgramContainer.container.GetInstance <IGoalsHandler>(); _ICoachPlayersPage = ProgramContainer.container.GetInstance <ICoachPlayersPage>(); player = (_ICoachPlayersPage.GetPlayers())[Coach_View_Players.Tag]; InitAllProgressBars(inner, DateTime.Now, 0); }
public New_Coach_CreditCard() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _IGoalsHandler = ProgramContainer.container.GetInstance <IGoalsHandler>(); _ICoachPlayersPage = ProgramContainer.container.GetInstance <ICoachPlayersPage>(); _ICoachRepository = ProgramContainer.container.GetInstance <ICoachRepository>(); welcome.Text = "Hi " + _signInFlow.GetCoach().FirstName + " \nWe're gonna need you to enter your credit card number:"; }
public Coach_Change_Credit_Card() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _ICoachRepository = ProgramContainer.container.GetInstance <ICoachRepository>(); coach = _signInFlow.GetCoach(); credit_card_textbox.Text = "************" + coach.PaymentLastDigits; welcome.Text = "Hi " + _signInFlow.GetCoach().FirstName + "\nenter your new credit card number :"; }
public CoachViewPlayerRecentActivities() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _ICoachPlayersPage = ProgramContainer.container.GetInstance <ICoachPlayersPage>(); _activityFetcher = ProgramContainer.container.GetInstance <IActivityFetcher>(); _IBalanceHandler = ProgramContainer.container.GetInstance <IBalanceHandler>(); player = (_ICoachPlayersPage.GetPlayers()[Coach_View_Players.Tag]); Init(); }
public NewUnassignedPlayerSeeGoals() { this.InitializeComponent(); _IProgressFetcher = ProgramContainer.container.GetInstance <IProgressFetcher>(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _IGoalsHandler = ProgramContainer.container.GetInstance <IGoalsHandler>(); player = _signInFlow.GetPlayer(); welcome.Text = $"OK {player.FirstName}, these are the goals your coach assigned you!"; InitAllProgressBars(null, null); }
public CoachViewPlayerStart() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _IBalanceHandler = ProgramContainer.container.GetInstance <IBalanceHandler>(); _IGoalsHandler = ProgramContainer.container.GetInstance <IGoalsHandler>(); _ICoachPlayersPage = ProgramContainer.container.GetInstance <ICoachPlayersPage>(); Player player = (_ICoachPlayersPage.GetPlayers())[Coach_View_Players.Tag]; string FullName = player.FirstName + player.LastName; welcome.Text = $"Viewing {FullName}'s Activities and Summaries\n"; crystals.Text = $"{FullName} has {_IBalanceHandler.GetBalance(player.UserId)} crystals!\n"; }
public Game_Hub() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _IBalanceHandler = ProgramContainer.container.GetInstance <IBalanceHandler>(); _IUserTypeRepository = ProgramContainer.container.GetInstance <UserTypeRepository>(); player = _signInFlow.GetPlayer(); CoachAndPlayer = false; if (_IUserTypeRepository.GetUserType(player.UserId).UserType == UserType.CoachAndPlayer) { ToBeACoach.Content = "Switch to Coach mode"; } welcome.Text = "Hey " + player.FirstName + ", welcome to the game hub\n"; crystals.Text = "You have " + _IBalanceHandler.GetBalance() + " crystals!\n"; }
public Coach_Lobby() { this.InitializeComponent(); _ICoachRepository = ProgramContainer.container.GetInstance <ICoachRepository>(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _IUserTypeRepository = ProgramContainer.container.GetInstance <IUserTypeRepository>(); CoachAndPlayer = false; coach = _signInFlow.GetCoach(); if (_IUserTypeRepository.GetUserType(coach.UserId).UserType == UserType.CoachAndPlayer) { ToBeAPlayer.Content = "Switch to Player mode"; } welcome.Text = "Welcome " + coach.FirstName; }
public NewUnassignedPlayerExplenations() { _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); this.InitializeComponent(); _userTypeRepository = ProgramContainer.container.GetInstance <UserTypeRepository>(); player = _signInFlow.GetPlayer(); if (Coach_Lobby.CoachAndPlayer) { _userTypeRepository.SaveUserType(player.UserId, UserType.CoachAndPlayer); ((SignInFlow)_signInFlow).SaveUserToLocalStorage(UserType.Player); } welcome.Text = "Hi " + player.FirstName + ".\n" + "You will soon see the goals your coach assigned you, but first... some explanations about boost\n" + "\n" + "Your coach assigned you daily (and possibly) weekly goals, once you complete a goal you will recive a certian amount of crystals (chosen by your coach). But you can also get crystals if your coach is impressed by a certian activity you had.\n" + "\n" + "You can spend Your crystals in the Game Hub. There you will be able to play cool and exciting games such as Tic Tac Toe !\n" + "\n" + "Are you ready?\n"; }
public CoachExplenationsBeforeAddingNewPlayerGoals() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); textBlock1.Text = $"OK {_signInFlow.GetCoach().FirstName} you will now enter Goals for your player:\n" + "There are two different types of goals: Daily goals and Weekly goals\n" + "The Daily goals are: \n" + "-Steps = The number of steps you want your player to walk each day.\n" + "-Calories Burned = The total amount of calories you want your player to burn each day.\n" + "-Minutes Slept = The total number of minutes you want your player to sleep each day.\n" + "*The 'Steps' goal is mandatory.\n" + "\n" + "The Weekly goals are\n" + "-Active Minutes = The total number of minutes you want your player to be active throughout the entire week.\n" + "-Calories Burned = The total amount of calories you want your player to burn throughout the entire week.\n" + "\n" + "For each and every of the above goals (if you choose to assign them to your player) you can grant your player with crystals, you get to decide how much!\n" + "Good Luck!\n" + "\n"; }
public CoachEditPlayerWeeklyGoals() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); _ICoachPlayersPage = ProgramContainer.container.GetInstance <ICoachPlayersPage>(); _IGoalsHandler = ProgramContainer.container.GetInstance <IGoalsHandler>(); welcome.Text = "Hi " + _signInFlow.GetCoach().FirstName + " \nPlease reset your player's weekly goals."; Goals goal = _IGoalsHandler.GetGoals((_ICoachPlayersPage.GetPlayers()[Coach_View_Players.Tag]).UserId); ActiveMinutes_textBox.Text = (goal.WeeklyActiveMinutes > 0) ? goal.WeeklyActiveMinutes.ToString() : ""; Calories_textBox.Text = (goal.WeeklyCaloriesBurned > 0) ? goal.WeeklyCaloriesBurned.ToString() : ""; ActiveMinutesReward_textBox.Text = (goal.WeeklyActiveMinutes > 0) ? goal.WeeklyActiveMinutesReward.ToString() : ""; ActiveMinutesReward_textBox.Visibility = (goal.WeeklyActiveMinutes > 0) ? Visibility.Visible : Visibility.Collapsed; ActiveMinutesReward.Visibility = (goal.WeeklyActiveMinutes > 0) ? Visibility.Visible : Visibility.Collapsed; CaloriesReward_textBox.Text = (goal.WeeklyCaloriesBurned > 0) ? goal.WeeklyCaloriesBurnedReward.ToString() : ""; CaloriesReward_textBox.Visibility = (goal.WeeklyCaloriesBurned > 0) ? Visibility.Visible : Visibility.Collapsed; CaloriesReward.Visibility = (goal.WeeklyCaloriesBurned > 0) ? Visibility.Visible : Visibility.Collapsed; }
public MainPage() { this.InitializeComponent(); _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); }
public New_Player() { _signInFlow = ProgramContainer.container.GetInstance <ISignInFlow>(); this.InitializeComponent(); }