コード例 #1
0
        private void NetSubmit(object sender, RoutedEventArgs e)
        {
            if (SuccessFlag == true)
            {
                if (netWindow != null)
                {
                    this.netWindow.removeFlash();
                    ClearRoad();
                    this.netWindow.roadReslut.Blocks.Clear();
                    this.netWindow.Close();
                    netWindow = null;
                }
                SuccessFlag = false;
                CGdbInfo gdb = new CGdbInfo();
                gdb.GDBName    = this.GDBName;
                gdb.GDBSvrName = this.GDBSvrName;
                gdb.Password   = this.Password;
                gdb.User       = this.User;
                CNetAnalyse obj = new CNetAnalyse();
                obj.GdbInfo         = gdb;
                obj.NetLayerName    = this.NetLayerName;
                obj.RequestDots     = this.pathDots.Substring(0, this.pathDots.Length - 1);
                obj.BarrierDots     = "";
                obj.NearDis         = 0.002;
                obj.FlgType         = "line";
                obj.NetWeight       = ",Weight1,Weight1";
                obj.AnalysTypeParam = AnalysType.UserMode.ToString();
                _spatial            = new SpacialAnalyse(this.mapDoc);


                _spatial.NetAnalyse(obj, new UploadStringCompletedEventHandler(OnSubmit));
            }
        }
コード例 #2
0
 public void Submit()
 {
     if (CommFun.IsNumber(this.buffer.Text))
     {
         if (VectorObj == null)
         {
             MessageBox.Show("绑定的矢量图对象为空", "提示", MessageBoxButton.OK);
             return;
         }
         MarkLayer.ManuallyAddMarkObj = null;
         CGdbInfo gdb = new CGdbInfo();
         gdb.GDBName    = this.GDBName;
         gdb.GDBSvrName = this.GDBSvrName;
         gdb.Password   = this.Password;
         gdb.User       = this.User;
         CNetAnalyse obj = new CNetAnalyse();
         obj.GdbInfo      = gdb;
         obj.NetLayerName = this.NetLayerName;
         obj.RequestDots  = this.m_pathDots.Length > 0 ? this.m_pathDots.Substring(0, this.m_pathDots.Length - 1) : this.m_pathDots;
         obj.BarrierDots  = this.m_barrierDots.Length > 0 ? this.m_barrierDots.Substring(0, this.m_barrierDots.Length - 1) : this.m_barrierDots;
         obj.NearDis      = 100; //Convert.ToSingle(this.buffer.Text);
         obj.FlgType      = "line";
         obj.NetWeight    = ",Weight1,Weight1";
         _spatial         = new SpacialAnalyse(VectorObj);
         _spatial.NetAnalyse(obj, new UploadStringCompletedEventHandler(OnSubmit));
     }
     else
     {
         MessageBox.Show("请输入合法的分析半径", "提示", MessageBoxButton.OK);
     }
 }