public MainWindow() { InitializeComponent(); new LoadingScreen().ShowDialog(); SetButtonClick(); BanCoViewModel = new BanCoViewModel(); BanCoViewModel.CurrentBanCo.OnPlayerAt += CurrentBanCo_OnPlayerAt; BanCoViewModel.CurrentBanCo.OnPlayerWin += CurrentBanCo_OnPlayerWin; BanCoViewModel.CurrentBanCo.OnUndo += CurrentBanCo_OnUndo; BanCoViewModel.CurrentBanCo.OnRedo += CurrentBanCo_OnRedo; BanCoViewModel.CurrentBanCo.OnLoad += CurrentBanCo_OnLoad; BanCoViewModel.CurrentBanCo.CurrentSocket.OnChatMessage += CurrentSocket_OnChatMessage; BanCoViewModel.CurrentBanCo.CurrentSocket.OnPlayAt += CurrentSocket_OnPlayAt; BanCoViewModel.CurrentBanCo.CurrentSocket.OnEndGame += CurrentSocket_OnEndGame; BanCoViewModel.CurrentBanCo.CurrentSocket.OnStart += CurrentSocket_OnStart; btnPvP.Foreground = new SolidColorBrush(Colors.Yellow); BanCoViewModel.PvP(); changeName.IsEnabled = false; chatMessage.IsEnabled = false; btnChange.Content = "Start!"; }
public MainWindow() { InitializeComponent(); SetButtonClick(); BanCoViewModel = new BanCoViewModel(); BanCoViewModel.CurrentBanCo.OnPlayerAt += CurrentBanCo_OnPlayerAt; BanCoViewModel.CurrentBanCo.OnPlayerWin += CurrentBanCo_OnPlayerWin; BanCoViewModel.CurrentBanCo.OnUndo += CurrentBanCo_OnUndo; BanCoViewModel.CurrentBanCo.OnRedo += CurrentBanCo_OnRedo; BanCoViewModel.PvC(); DrawBoard(Settings.Default.BOARD_SIZE); }