private void DisplayOption_click(object sender, EventArgs e)
 {
     if (sender is RadioButton rb)
     {
         _selectedOption = (PhotoAlbum.DisplayValEnum)rb.Tag;
     }
 }
        protected override void ResetSettings()
        {
            // Set file name
            txtAlbumFile.Text = _album.FileName;

            // Set title, and use in title bar
            this.txtTitle.Text = _album.Title;
            this.Text          = String.Format("{0} - Album Properties", txtTitle.Text);

            // Set display option values
            _selectedDisplayOption = _album.DisplayOption;
            switch (_selectedDisplayOption)
            {
            case PhotoAlbum.DisplayValEnum.Date:
                this.rbtnDate.Checked = true;
                break;

            case PhotoAlbum.DisplayValEnum.FileName:
                this.rbtnFileName.Checked = true;
                break;

            case PhotoAlbum.DisplayValEnum.Caption:
            default:
                this.rbtnCaption.Checked = true;
                break;
            }

            string pwd = _album.Password;

            cbtnPassword.Checked = (pwd != null && pwd.Length > 0);
            txtAlbumPwd.Text     = pwd;
            txtConfirmPwd.Text   = pwd;
        }
        protected override void ResetSettings()
        {
            txtAlbumFile.Text = _album.FileName;
            txtTitle.Text     = _album.Title;

            this.Text       = String.Format("{0} - Album properties", txtTitle.Text);
            _selectedOption = _album.DisplayOption;

            switch (_selectedOption)
            {
            default:
            case PhotoAlbum.DisplayValEnum.Caption:
                rbtnCaption.Checked = true;
                break;

            case PhotoAlbum.DisplayValEnum.FileName:
                rbtnFileName.Checked = true;
                break;

            case PhotoAlbum.DisplayValEnum.Date:
                rbtnDate.Checked = true;
                break;
            }

            cbtnPassword.Checked    = !String.IsNullOrWhiteSpace(_album.Password);
            txtPassword.Text        = _album.Password;
            txtConfirmPassword.Text = _album.Password;
        }
        private void DisplayOption_Click(object sender, System.EventArgs e)
        {
            RadioButton rb = sender as RadioButton;

            if (rb != null)
            {
                this._selectedDisplayOption = (PhotoAlbum.DisplayValEnum)rb.Tag;
            }
        }