private void btnSave_Click(object sender, EventArgs e) { //--validate if (cboTargetContentType.SelectedItem == null) { SmartStepUtil.AddToRTB(rtbDisplay, "Target Content Type is blank.", Color.Red, 10, true); return; } //-- if (m_editingMPindex == -1) //--Mapping Profile is new { ActionMetaDataUtil.MappingProfiles.Add(m_mpWorking); } else { ActionMetaDataUtil.MappingProfiles[m_editingMPindex] = m_mpWorking; } //--refresh cboMappingProfile ActionMetadata.DefInstance.populateCboMappingProfiles(); //ActionMetadata.DefInstance.cboMappingProfile.SelectedItem = m_mpWorking; ActionMetadata.DefInstance.cboMappingProfile.SelectedIndex = ActionMetadata.DefInstance.cboMappingProfile.FindStringExact(m_mpWorking.ProfileName); //ActionMetadata.DefInstance.cboMappingProfile.Refresh(); //-- ActionMetaDataUtil.SaveMappingProfileToXml(); // //-- ActionMetadata.DefInstance.rtbDisplay.Clear(); this.Close(); }
private void lnkDeleteProfile_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { DialogResult ret = MessageBox.Show(this, "Are you sure you want to delete Mapping Profile " + m_mpWorking.ProfileName + "?", "", MessageBoxButtons.YesNo); if (ret == DialogResult.Yes) { ActionMetaDataUtil.MappingProfiles.RemoveAt(m_editingMPindex); ActionMetaDataUtil.SaveMappingProfileToXml(); ActionMetadata.DefInstance.populateCboMappingProfiles(); ActionMetadata.DefInstance.lnkEditProfiles.Enabled = false; ActionMetadata.DefInstance.lnkCopyProfile.Enabled = false; this.Close(); } }
private void lnkCopyProfile_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { MappingProfile mp = (MappingProfile)cboMappingProfile.SelectedItem; MappingProfile mpCopy = (MappingProfile)Util.DeepCopy(mp); if (mpCopy == null) { return; } ActionMetaDataUtil.MappingProfiles.Add(mpCopy); mpCopy.ProfileName = "Copy of " + mpCopy.ProfileName; cboMappingProfile.Items.Add(mpCopy); cboMappingProfile.SelectedItem = mpCopy; ActionMetaDataUtil.SaveMappingProfileToXml(); }
private void ActionMetadata_Load(object sender, EventArgs e) { this.HelpKey = "Meta Data"; if (this.DisableIfSharePointNotInstalledLocally()) { return; } //-- txtTargetSite.Text = GlobalVars.SETTINGS.metadata_siteURL; tabControl1.SelectedIndex = GlobalVars.SETTINGS.metadata_selectedTab; //-- ActionMetaDataUtil.LoadMappingProfilesFromXml(); populateCboMappingProfiles(); AddToRtbLocal("Notes: " + "\r\n", StyleType.bodyChocolate); string s = @"This feature of SUSHI helps with several metadata mass-update and grooming tasks. In a Search Engine world, metadata is key and keeping metadata accurate is key to findability, which is why this feature of SUSHI can be quite helpful. Additional Help: http://www.codeplex.com/sushi/Wiki/View.aspx?title=Meta%20Data&referringTitle=Home"; SmartStepUtil.AddToRTB(rtbDisplay, s, StyleType.bodyBlack); }