public SinglePlayerWindow() { InitializeComponent(); this.WindowStartupLocation = WindowStartupLocation.CenterScreen; vm = SinglePlayerViewModel.Instance(SinglePlayerModel.Instance); vm.VM_MazeRows = Properties.Settings.Default.MazeRows; vm.VM_MazeCols = Properties.Settings.Default.MazeCols; this.DataContext = vm; }
public SinglePlayerMazeWindow() { try { InitializeComponent(); this.WindowStartupLocation = WindowStartupLocation.CenterScreen; this.vm = SinglePlayerViewModel.Instance(SinglePlayerModel.Instance); this.DataContext = vm; this.KeyDown += new KeyEventHandler(this.GridKeyDown); } catch (Exception) { Message.ShowOKMessage("we are sorry, there is a problem with the connection, please try again later..", "ERROE"); } }