public MainViewModel() { Logic.Table.ConnectWithDataBase(); actuallyTop = new Pages.TopPanel(this); actuallyBottom = new Pages.BottomPanel(this); actuallyBody = new Pages.Hall(this); lastGames = Logic.Table.Raffle.GetLastGameInfo(); Balance = player.Money; Button Home = new Button(); Home.Command = new Command((obj) => { ActuallyBody = new Pages.Hall(this); }); Home.Content = "Home"; Button Player = new Button(); Player.Command = new Command((obj) => { ActuallyBody = new Pages.Player(this); }); Player.Content = "Player"; bottomPanelButtons.Add(Home); bottomPanelButtons.Add(Player); VisibilityTextRegistration = Visibility.Hidden; }
public void RegistrationClick(string Login, string Pass) { if (Logic.Table.Persone.CheckPersone(Login)) { VisibilityTextRegistration = Visibility.Visible; } else { VMPlayer = new Logic.Persone(Logic.Table.Persone.CreatePersone(Login, Pass), Login, Pass); ActuallyBody = new Pages.Player(this); } }
public void AuthorizationClick(string Login, string Pass) { VMPlayer = Logic.Persone.GetPlayer(true, Login, Pass); ActuallyBody = new Pages.Player(this); }