/// <summary> /// Initializes a new instance of the <see cref="OptionsWindow"/> class. /// </summary> public OptionsWindow() { try { InitializeComponent(); errorLogViewModel = new ErrorLogViewModel(); ResolutionComboBox.Items.Add("580x420"); ResolutionComboBox.Items.Add("640x480"); ResolutionComboBox.Items.Add("800x600"); optionsVM = new OptionsViewModel(); this.DataContext = optionsVM; this.Width = optionsVM.HorizontalScaleNumber; this.Height = optionsVM.VerticalScaleNumber; ResolutionComboBox.SelectedItem = optionsVM.OptionModel.Resolution; SettingsUpdatedLabelHide.Interval = TimeSpan.FromSeconds(3); SettingsUpdatedLabelHide.Tick += SettingsUpdatedLabelHide_Tick; } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="OptionsViewModel"/> class. /// </summary> public OptionsViewModel() { try { errorLogViewModel = new ErrorLogViewModel(); OptionModel = new Options(); optionsXmlAccess = new OptionsXmlAccess(); OptionModel = optionsXmlAccess.LoadOptions(); switch (OptionModel.Resolution) { case "580x420": HorizontalScaleNumber = 580; VerticalScaleNumber = 420; break; case "640x480": HorizontalScaleNumber = 640; VerticalScaleNumber = 480; break; case "800x600": HorizontalScaleNumber = 800; VerticalScaleNumber = 600; break; } } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="OptionsViewModel"/> class. /// </summary> public OptionsViewModel() { try { errorLogViewModel = new ErrorLogViewModel(); OptionModel = new Options(); optionsXmlAccess = new OptionsXmlAccess(); OptionModel = optionsXmlAccess.LoadOptions(); switch (OptionModel.Resolution) { case "580x420": HorizontalScaleNumber = 580; VerticalScaleNumber = 420; break; case "640x480": HorizontalScaleNumber = 640; VerticalScaleNumber = 480; break; case "800x600": HorizontalScaleNumber = 800; VerticalScaleNumber = 600; break; } } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="CreditsViewModel"/> class. /// </summary> public CreditsViewModel() { try { errorLogViewModel = new ErrorLogViewModel(); scoreXmlAccess = new ScoresXmlAccess(); } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="CreditsViewModel"/> class. /// </summary> public CreditsViewModel() { try { errorLogViewModel = new ErrorLogViewModel(); scoreXmlAccess = new ScoresXmlAccess(); } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="GameOverViewModel"/> class. /// </summary> public GameOverViewModel() { try { errorLogViewModel = new ErrorLogViewModel(); scoresXmlAccess = new ScoresXmlAccess(); highscoreList = scoresXmlAccess.LoadScores(); } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="GameOverWindow"/> class. /// </summary> public GameOverWindow(int playerScore) { InitializeComponent(); errorLogVireModel = new ErrorLogViewModel(); gameOverViewModel = new GameOverViewModel(); optionsViewModel = new OptionsViewModel(); this.Width = optionsViewModel.HorizontalScaleNumber; this.Height = optionsViewModel.VerticalScaleNumber; ScoreLabel.Content = playerScore; }
/// <summary> /// Initializes a new instance of the <see cref="MainWindow"/> class. /// </summary> public MainWindow() { try { InitializeComponent(); errorLogViewModel = new ErrorLogViewModel(); optionsViewModel = new OptionsViewModel(); this.Height = optionsViewModel.VerticalScaleNumber; this.Width = optionsViewModel.HorizontalScaleNumber; } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="GamePlayWindow"/> class. /// </summary> public GamePlayWindow() { try { InitializeComponent(); errorLogViewModel = new ErrorLogViewModel(); //canvas.Background = new SolidColorBrush(Colors.White); timer = new DispatcherTimer(); timer.Interval = new TimeSpan(0, 0, 0, 0, 10); timer.Tick += Timer_Tick; //timer.Start(); } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="CreditsWindow"/> class. /// </summary> public CreditsWindow() { try { InitializeComponent(); errorLogViewModel = new ErrorLogViewModel(); optionsViewModel = new OptionsViewModel(); this.Height = optionsViewModel.VerticalScaleNumber; this.Width = optionsViewModel.HorizontalScaleNumber; creditsViewModel = new CreditsViewModel(); this.DataContext = creditsViewModel.LoadRawScores(); } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="InformationsWindow"/> class. /// </summary> public InformationsWindow() { try { InitializeComponent(); errorLogViewModel = new ErrorLogViewModel(); optionsViewModel = new OptionsViewModel(); this.Height = optionsViewModel.VerticalScaleNumber; this.Width = optionsViewModel.HorizontalScaleNumber; InfoTxtBlock.Text = "Name: Péter Zsolt" + "\n" + "Neptun: GZOG8N" + "\n" + "App: BrickBreaker"; PressKeyTxtBlock.Text = "Press Esc to the Main Menu"; } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="NewGameWindow"/> class. /// </summary> public NewGameWindow() { try { InitializeComponent(); errorLogViewModel = new ErrorLogViewModel(); newGameViewModel = new NewGameViewModel(); optionsViewModel = new OptionsViewModel(); this.Height = optionsViewModel.VerticalScaleNumber; this.Width = optionsViewModel.HorizontalScaleNumber; firstMap_Diff.IsEnabled = newGameViewModel.FindMap(newGameViewModel.FirstMapPath); secondMap_Diff.IsEnabled = newGameViewModel.FindMap(newGameViewModel.SecondMapPath); thirdMap_Diff.IsEnabled = newGameViewModel.FindMap(newGameViewModel.ThirdMapPath); fourthmapMap_Diff.IsEnabled = newGameViewModel.FindMap(newGameViewModel.ForthMapPath); fifthmap_Diff.IsEnabled = newGameViewModel.FindMap(newGameViewModel.FifthMapPath); } catch { } }
/// <summary> /// Initializes a new instance of the <see cref="NewGameViewModel"/> class. /// </summary> public NewGameViewModel() { try { errorLogViewModel = new ErrorLogViewModel(); mapTxtAccess = new MapTxtAccess(); scoreXmlAccess = new ScoresXmlAccess(); optionsViewModel = new OptionsViewModel(); } catch { } }