public frmField() { InitializeComponent(); _scorePath = Path.Combine(Environment.CurrentDirectory, "highscore.txt"); if (!File.Exists(_scorePath)) { File.AppendAllText(_scorePath, ""); } _fieldEditScore = new frmEditScore(_scorePath); _fieldScoreList = new frmScoreList(_scorePath); SetOptions(); }
private int _playerScore = 0; //Zusätliches Attribut public frmField() { InitializeComponent(); _scoreListPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "scorelist.txt"); _optionsForm = new frmOptions(); _editScoreForm = new frmEditScore(_scoreListPath); _scoreListForm = new frmScoreList(_scoreListPath); _boxList = new List <Button>(); _boxRatings = new Dictionary <Color, int>(); _scoreListForm.RefreshScore(); _optionsForm.VisibleChanged += BtnHideOptions_Click; SetupPlayField(); }
public frmField() { InitializeComponent(); _highScoreFilePath = Path.Combine(Environment.CurrentDirectory, "highscore.txt"); if (!File.Exists(_highScoreFilePath)) { File.AppendAllText(_highScoreFilePath, ""); } _scoreList = new frmScoreList(_highScoreFilePath); _editScore = new frmEditScore(_highScoreFilePath); SetOptions(); BuildButtonField(); _options.VisibleChanged += new System.EventHandler(BtnHideOptions_Click); }