private void ClearNet_Click(object sender, EventArgs e)
 {
     axMapControl1.CurrentTool = null;
     try
     {
         //string name =path + "\\WHU_StudentQuery.mdb";
         //string name = NetWorkAnalysClass.getPath(path) + "\\ArcEngineDemo\\WHU_StudentQuery.mdb";
         string name = NetWorkAnalysClass.getPath(path) + "\\Data\\TestNet.gdb";
         //打开工作空间
         pFWorkspace = NetWorkAnalysClass.OpenWorkspace(name) as IFeatureWorkspace;
         IGraphicsContainer pGrap = this.axMapControl1.ActiveView as IGraphicsContainer;
         pGrap.DeleteAllElements();//删除所添加的图片要素
         IFeatureClass inputFClass = pFWorkspace.OpenFeatureClass("Stops");
         //删除站点要素
         if (inputFClass.FeatureCount(null) > 0)
         {
             ITable pTable = inputFClass as ITable;
             pTable.DeleteSearchedRows(null);
         }
         for (int i = 0; i < axMapControl1.LayerCount; i++)//删除分析结果
         {
             ILayer pLayer = axMapControl1.get_Layer(i);
             if (pLayer.Name == ShortPathSolveCommand.m_NAContext.Solver.DisplayName)
             {
                 axMapControl1.DeleteLayer(i);
                 break;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     this.axMapControl1.Refresh();
 }
        /// <summary>
        /// Occurs when this tool is clicked
        /// </summary>
        public override void OnClick()
        {
            // TODO: Add AddNetBarriesTool.OnClick implementation
            //string name = NetWorkAnalysClass.getPath(path) + "\\data\\HuanbaoGeodatabase.gdb";
            string name = NetWorkAnalysClass.getPath(path) + "\\Data\\TestNet.gdb";

            pFWorkspace   = NetWorkAnalysClass.OpenWorkspace(name) as IFeatureWorkspace;
            barriesFClass = pFWorkspace.OpenFeatureClass("Barries");
            if (barriesFClass.FeatureCount(null) > 0)
            {
                ITable pTable = barriesFClass as ITable;
                pTable.DeleteSearchedRows(null);
            }
        }