Esempio n. 1
0
        private async void ClockForm_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(SystemPlayer.Name))
            {
                using var playerNameDialog = new PlayerNameForm();

                playerNameDialog.ShowDialog(this);

                SystemPlayer.Name = playerNameDialog.PlayerName;

                PlayerUtilities.SaveSystemPlayer(SystemPlayer);
            }

            if (string.IsNullOrEmpty(Settings.Default.HotSeatFolder))
            {
                var result = hotSeatFolderBrowser.ShowDialog();
                while (result != DialogResult.OK)
                {
                    MessageBox.Show("You have to select a save file folder in order to proceed", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    result = hotSeatFolderBrowser.ShowDialog();
                }

                Settings.Default.HotSeatFolder = hotSeatFolderBrowser.SelectedPath;
                Settings.Default.Save();
            }

            usernameStatusLabel.Text   = string.Format(usernameStatusLabel.Tag.ToString(), SystemPlayer.Name);
            playerSeedStatusLabel.Text = string.Format(playerSeedStatusLabel.Tag.ToString(), PlayerUtilities.GetSystemPlayerSeed());

            await UpdateGamesList();
        }
Esempio n. 2
0
        private void playerSeedStatusLabel_Click(object sender, EventArgs e)
        {
            var playerSeed = PlayerUtilities.GetSystemPlayerSeed();

            Clipboard.SetText(playerSeed);
        }