private void OnExtractAllFeatureServices_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         MSCDataset docDataset = AfaDocData.ActiveDocData.DocDataset;
         if (docDataset.FeatureServices.Count == 0)
         {
             AfaDocData.ActiveDocData.Document.Editor.WriteMessage(AfaStrings.NoFeatureServicesFound);
         }
         else
         {
             List <string> list = new List <string>();
             foreach (MSCFeatureService current in docDataset.FeatureServices.Values)
             {
                 string          name            = current.Name;
                 MSCFeatureClass mSCFeatureClass = current.Disconnect();
                 if (mSCFeatureClass != null)
                 {
                     list.Add(name);
                 }
             }
             foreach (string current2 in list)
             {
                 docDataset.FeatureServices.Remove(current2);
             }
             MSCDataset.SetDefaultActiveFeatureClass();
             ToolPalette.UpdatePalette(docDataset.ParentDocument, docDataset, false);
         }
     }
     catch
     {
     }
 }
 public static void ShowPalette(Document doc, MSCDataset dataset)
 {
     try
     {
         ToolPalette.UpdatePalette(doc, dataset);
         string cmdString = "(command \"tpnavigate\" \"ArcGIS Feature Services\")";
         CmdLine.ExecuteQuietCommand(cmdString);
     }
     catch
     {
     }
 }