private void button1_Click(object sender, EventArgs e) { try { var fact = new MgdServiceFactory(); MgResourceService resSvc = (MgResourceService)fact.CreateService(MgServiceType.ResourceService); MgResourceIdentifier resId = new MgResourceIdentifier(textBox1.Text); resSvc.RenameResourceData(resId, textBox2.Text, textBox3.Text, checkBox1.Checked); MessageBox.Show("Success"); } catch (MgException ex) { MessageBox.Show(ex.ToString(), "Error from MapGuide"); } }