Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         var fact = new MgdServiceFactory();
         MgResourceService    resSvc = (MgResourceService)fact.CreateService(MgServiceType.ResourceService);
         MgResourceIdentifier resId  = new MgResourceIdentifier(txtResourceId.Text);
         string       type           = txtType.Text;
         int          depth          = Convert.ToInt32(txtDepth.Text);
         MgByteReader response       = resSvc.EnumerateResources(resId, depth, type);
         new XmlResponseDialog(response).ShowDialog();
     }
     catch (MgException ex)
     {
         MessageBox.Show(ex.ToString(), "Error from MapGuide");
     }
 }