public UserCreationViewModel() { NewUser = new UserModel { UsernameProp = "", PasswordProp = "" }; LabelProp = new PropertyModel { VisibilityProp = "Hidden", MsgTextProp = "" }; CreateUserCommand = new BaseRelayCommand(CanCreateUser, GoCreateUser); }
public UserLoginViewModel() { LogUser = new UserModel { UsernameProp = "", PasswordProp = "" }; LabelProp = new PropertyModel { VisibilityProp = "Hidden", MsgTextProp = "" }; LoginCommand = new BaseRelayCommand(CanGoLog, GoLog); }
public GameViewModel() { //Get Current User info CurrentUser = new UserModel { UsernameProp = UserLoginViewModel.CurrentUser, HighscoreProp = Convert.ToInt32(UserLoginViewModel.UserHighScore) }; TargetImage = new ImageModel { ImageLeft = 0, ImageTop = 0 }; ProjectileImage = new ImageModel { ImageLeft = 400, ImageTop = 400 }; CurrentUserScore = new GameSession { CurScore = 0 }; MessageProp = new PropertyModel { VisibilityProp = "Hidden", MsgTextProp = "" }; StartGameCommand = new BaseRelayCommand(CanStart, Start); LeftKeyCommand = new BaseRelayCommand(CanGoLeft, GoLeft); RightKeyCommand = new BaseRelayCommand(CanGoRight, GoRight); UpKeyCommand = new BaseRelayCommand(CanGoUp, GoUp); gameTicker.Tick += GameTicker_Tick; upTicker.Tick += UpTicker_TickAsync; }
public NavigationViewModel() { LoginNavCommand = new BaseRelayCommand(CanOpenLogin, OpenLogin); //Login View Navigation CreateNavCommand = new BaseRelayCommand(CanOpenCreate, OpenCreate); //Create User View Navigation GameNavCommand = new BaseRelayCommand(CanOpenGame, OpenGame); //Game View Navigation }