public void setDetails(string gameType, TimeSpan time) { this.gameType = gameType; switch (gameType) { case "Easy": if (details.TimeEasy == TimeSpan.FromSeconds(0) || time < details.TimeEasy) { NameEasyText.Text = ""; NameEasyText.ReadOnly = false; TimeEasyLabel.Text = time.ToString(); details.TimeEasy = time; highscore = true; } NameEasyText.Select(); break; case "Medium": if (details.TimeMedium == TimeSpan.FromSeconds(0) || time < details.TimeMedium) { NameMediumText.Text = ""; NameMediumText.ReadOnly = false; TimeMediumLabel.Text = time.ToString(); details.TimeMedium = time; highscore = true; } NameMediumText.Select(); break; case "Hard": if (details.TimeHard == TimeSpan.FromSeconds(0) || time < details.TimeHard) { NameHardText.Text = ""; NameHardText.ReadOnly = false; TimeHardLabel.Text = time.ToString(); details.TimeHard = time; highscore = true; } NameHardText.Select(); break; } }
public ResultSheet() { InitializeComponent(); loadDetails(); NameEasyText.Select(); }