コード例 #1
0
        private void SetOriginalValues()
        {
            Photograph photo = _album[_index];

            if (photo != null)
            {
                _origCaption      = photo.Caption;
                _origDateTaken    = photo.DateTaken;
                _origPhotographer = photo.Photographer;
                _modifiedTxtNotes = false;
            }
        }
コード例 #2
0
        protected override bool SaveSettings()
        {
            if (!NewControlValues())
            {
                return(true);
            }

            Photograph photo = _album[_index];

            if (photo != null)
            {
                photo.Caption      = txtCaption.Text;
                photo.DateTaken    = dtpDateTaken.Value;
                photo.Photographer = cmbPhotographer.Text;
                photo.Notes        = txtNote.Text;
                _hasChanged        = true;
            }

            return(true);
        }