Exemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            try
            {
                m_ProgramSetings = ProgramSettingsManager.LoadSettings();
            }
            catch (Exception ex)
            {
                ShowErrorMessage(ex);
                m_ProgramSetings = ProgramSettingsManager.GetDefaultSettings();
            }

            m_Info = new TeamsInfo(lblTeam1Score, lblTeam2Score, lblTeam1Name, lblTeam2Name);
            ChangeTeam1Name(m_ProgramSetings.Team1Name);
            ChangeTeam2Name(m_ProgramSetings.Team2Name);
            txtVideoPlayer.Text           = m_ProgramSetings.VideoPlayerName;
            txtVideoPlayerParameters.Text = m_ProgramSetings.VideoPlayerParameters;
            txtAudioPlayer.Text           = m_ProgramSetings.AudioPlayerName;
            txtAudioPlayerParameters.Text = m_ProgramSetings.AudioPlayerParameters;
            m_NavigationPanelMinSize      = splitContainer1.Panel2MinSize;
            chbShowNavigationBar.Checked  = m_ProgramSetings.ShowNavigationBar;
            SetTeamNameFont(m_ProgramSetings.TeamNameFont);
            SetTeamScoreFont(m_ProgramSetings.TeamScoreFont);
            SetSongFullTextFont(m_ProgramSetings.SongFullTextFont);
            WordGuessingControl.DisplayFont = m_ProgramSetings.WordGuessingFont;
            chbRemovePlayedGames.Checked    = m_ProgramSetings.ExcludeOpenedGames;
            LoadBackgroundImage(m_ProgramSetings.BackgroundImagePath);
            chbFullScreen.Checked = m_ProgramSetings.FullScreen;
        }
Exemplo n.º 2
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         m_ProgramSetings.AudioPlayerName       = txtAudioPlayer.Text;
         m_ProgramSetings.AudioPlayerParameters = txtAudioPlayerParameters.Text;
         m_ProgramSetings.VideoPlayerName       = txtVideoPlayer.Text;
         m_ProgramSetings.VideoPlayerParameters = txtVideoPlayerParameters.Text;
         m_ProgramSetings.FullScreen            = chbFullScreen.Checked;
         ProgramSettingsManager.SaveSettings(m_ProgramSetings);
     }
     catch (Exception ex)
     {
         ShowErrorMessage(ex);
     }
 }