Exemplo n.º 1
0
 public void MouseDown(object sender, GeoOperatorMouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         List<GeoSite> rnList;
         List<GeoCell> cellList;
         double x = m_Helper.ScreenToPlanetOfX(e.X);
         double y = m_Helper.ScreenToPlanetOfY(e.Y);
         double longitude = 0.0;
         double latitude = 0.0;
         GeoBLPoint point = m_Helper.ScreenToLat(e.X, e.Y);
         if (point != null)
         {
             longitude = point.L;
             latitude = point.B;
         }
         GeoRelayNodeEventArgs addRelayNodeArgs = new GeoRelayNodeEventArgs();   //Edited by liangwenli 20110304
         GeoSite item = new GeoSite(x, y, longitude, latitude);
         addRelayNodeArgs.RelayNodeList.Add(item);
         this.m_NetEvent.GeoAddRelayMsg(addRelayNodeArgs, out rnList, out cellList);
         //this.m_NetEvent.GeoAddSiteMsg(addRelayNodeArgs, out rnList, out cellList);
         if ((rnList != null) && (rnList.Count > 0))
         {
             this.m_NetEntityData.AddRelay(rnList, cellList);
             this.m_NetEntityData.RaiseDataChangedEvent(sender, e);
         }
         e.Handled = true;
     }
 }
Exemplo n.º 2
0
 //Added by liangwenli 20110307
 protected virtual bool OnGeoUpdatePosInfoMsg(GeoRelayNodeEventArgs e)
 {
     bool flag = false;
     if (this.GeoUpdateRelayNodePosEvent != null)
     {
         flag = this.GeoUpdateRelayNodePosEvent(e);
     }
     return flag;
 }
Exemplo n.º 3
0
 //Added by liangwenli 20110307
 protected virtual bool OnGeoDeleteRelayNodeMsg(GeoRelayNodeEventArgs relayargs)
 {
     bool flag = false;
     if (this.GeoDeleteRelayNodeEvent != null)
     {
         flag = this.GeoDeleteRelayNodeEvent(relayargs);
     }
     return flag;
 }
Exemplo n.º 4
0
 //Added by liangwenli 20110307
 public bool GeoUpdatePosInfoMsg(List<GeoSite> relayList)
 {
     GeoRelayNodeEventArgs args = new GeoRelayNodeEventArgs(relayList);
     return this.OnGeoUpdatePosInfoMsg(args);
 }
Exemplo n.º 5
0
        //Added by liangwenli 20110307
        public bool GeoDeleteRelayNodeMsg(List<GeoSite> relayList)
        {
            GeoRelayNodeEventArgs relayargs = new GeoRelayNodeEventArgs(relayList);

            return this.OnGeoDeleteRelayNodeMsg(relayargs);
        }
Exemplo n.º 6
0
 protected virtual bool OnGeoAddRelayMsg(GeoRelayNodeEventArgs addRelayArgs, out List<GeoSite> relays, out List<GeoCell> cells)
 {
     relays = new List<GeoSite>();
     cells = new List<GeoCell>();
     return ((this.GeoAddRelayNodeEvent != null) && this.GeoAddRelayNodeEvent(addRelayArgs, out relays, out cells));
 }
Exemplo n.º 7
0
 public void GeoAddRelayMsg(GeoRelayNodeEventArgs addRelayArgs, out List<GeoSite> relays, out List<GeoCell> cells)
 {
     this.OnGeoAddRelayMsg(addRelayArgs, out relays, out cells);
 }