/// <inheritdoc />
        protected override bool StoreControlValue(System.Windows.Forms.Control control)
        {
#if !STANDALONEGUI
            if (this.ProjectMgr == null)
            {
                return(false);
            }
#else
            if (this.CurrentProject == null)
            {
                return(false);
            }
#endif
            if (control.Name == "dgvHelpAttributes")
            {
                if (attributesChanged)
                {
                    dgvHelpAttributes.EndEdit();
                    dgvHelpAttributes.DataSource = null;
                    attributes.Sort();

#if !STANDALONEGUI
                    this.ProjectMgr.SetProjectProperty("HelpAttributes", _PersistStorageType.PST_PROJECT_FILE, attributes.ToXml());
#else
                    this.CurrentProject.MSBuildProject.SetProperty("HelpAttributes", attributes.ToXml());
#endif
                    attributesChanged = false;

                    dgvHelpAttributes.DataSource = attributes;
                }
                return(true);
            }

            return(false);
        }
예제 #2
0
        //=====================================================================

        /// <summary>
        /// Close the form
        /// </summary>
        /// <param name="sender">The sender of the event</param>
        /// <param name="e">The event arguments</param>
        private void btnClose_Click(object sender, EventArgs e)
        {
            attributes.Sort();
            this.Close();
        }