Exemple #1
0
        /// <summary>
        /// Form to adjust settings
        /// </summary>
        /// <param name="returnTitleForm">Title form to return to</param>
        public FrmSettings(FrmTitle returnTitleForm)
        {
            this.returnTitleForm = returnTitleForm;
            this.BackColor       = ThemeHelper.GetInstance().GetBackgroundColor();
            soundHelper          = SoundHelper.GetInstance();
            InitializeComponent();
            setMuteImage();

            switch (ThemeHelper.GetInstance().GetTheme())
            {
            case ThemeHelper.Theme.BLUE:
                picBlueCard.BorderStyle = BorderStyle.Fixed3D;
                break;

            case ThemeHelper.Theme.ORANGE:
                picOrangeCard.BorderStyle = BorderStyle.Fixed3D;
                break;

            case ThemeHelper.Theme.PURPLE:
                picPurpleCard.BorderStyle = BorderStyle.Fixed3D;
                break;

            case ThemeHelper.Theme.WHITE:
                picWhiteCard.BorderStyle = BorderStyle.Fixed3D;
                break;
            }
        }
 /// <summary>
 /// Handles KeyDown Events within FrmPlayGame
 /// </summary>
 private void FrmPlaygame_KeyDown(object sender, KeyEventArgs e)
 {
     //M stands for mute
     if (e.KeyCode == Keys.M)
     {
         SoundHelper.GetInstance().mute_unmute();
     }
 }
Exemple #3
0
 /// <summary>
 /// Handles KeyDown Events within FrmSettings
 /// </summary>
 private void FrmSettings_KeyDown(object sender, KeyEventArgs e)
 {
     //M stands for mute
     if (e.KeyCode == Keys.M)
     {
         SoundHelper.GetInstance().mute_unmute();
         setMuteImage();
     }
 }
Exemple #4
0
 /// <summary>
 /// Handles KeyDown Events within FrmTitle
 /// </summary>
 private void FrmTitle_KeyDown(object sender, KeyEventArgs e)
 {
     //M stands for mute
     if (e.KeyCode == Keys.M)
     {
         //get the singleton for soundhelper then mute or unmute it
         SoundHelper.GetInstance().mute_unmute();
     }
 }
Exemple #5
0
 public FrmTitle(string username = null)
 {
     //initializes a new sound helper if this has been visited for the first time
     SoundHelper.GetInstance();
     userName = username;
     InitializeComponent();
     //Sound_Helper = new SoundHelper();
     userNameBoxTitle.Text = "Hi, " + userName;
 }