Exemplo n.º 1
0
 public PolygonOperator(GeoUserVectorData polygonLayer, GeoTransformation trans, GeoNameControl nc)
 {
     this.m_BindingData = polygonLayer;
     this.m_geoNameControl = nc;
     this.Init(this.m_BindingData, trans);
     this.m_geoNameControl.PolygonRegionDict = this.m_PolyRegionDict;
 }
Exemplo n.º 2
0
 public int BindAnalyGeoXYPointSymbolLayer(AnalyGeoXYPointSymbolEventArgs args)
 {
     GeoUserVectorData data;
     int key = -1;
     IGeoOperator op = null;
     bool flag = this.m_DataDic.ContainsKey(args.LayerID);
     if (flag)
     {
         data = this.m_DataDic[args.LayerID] as GeoUserVectorData;
         data.RemoveAllShape();
         key = args.LayerID;
     }
     else
     {
         data = new GeoUserVectorData();
         data.DataSource = args.DataSource;
         op = this.GenerateOperator(args.m_LayerType, data, args.AdjustDistance);
         this.RegisteOperator(op);
         args.GeoOperator = op;
     }
     UpdateGeoDataByArgs(args, data);
     if (!flag)
     {
         key = this.m_GeoMapMgr.AddApplicationVectorLayer(data);
         this.m_DataDic.Add(key, data);
         this.m_OperatorDic.Add(key, op);
     }
     return key;
 }
Exemplo n.º 3
0
 public PolygonPropertyForm(GeoDisplayPolygonRegion dispPolygonRegion, IGeoSelectionHelper helper, GeoUserVectorData userShapes, GeoCoordinateOfMouse GeoCoordinateOfMouse, CoordinateDisplayStyle style)
 {
     this.m_CurrentDisplayRegion = dispPolygonRegion;
     this.m_Helper = helper;
     this.m_BaseData = userShapes;
     this.m_RegionList = this.m_BaseData.GetAllPolygons();
     this.SetPropertyDisplayStyle(GeoCoordinateOfMouse, style);
     this.InitializeComponent();
     this.Initial();
 }
Exemplo n.º 4
0
        public AddGeoLineOperator(IApplicationContext appContext, GeoUserVectorData vectorData)
        {

            this.m_Helper = ServiceHelper.Lookup<IGeoSelectionHelper>(appContext);
            Bitmap image = new Bitmap(0x20, 0x20);
            Graphics graphics = Graphics.FromImage(image);
            graphics.DrawImage(Huawei.UNet.Common.GlobalResource.GlobalResource.line, new System.Drawing.Point(0x10, 0));
            graphics.Dispose();
            this.m_Cursor = new Cursor(image.GetHicon());
            this.m_BaseData = vectorData;
            this.InitDrawingStyles();
        }
Exemplo n.º 5
0
 public GisTrafficToPolygonCreater(GeoXYLine sourceLine, GeoUserVectorData userVectorData, double stripWidth)
 {
     this.m_SourceLine = sourceLine;
     this.m_PolyRegionExe = new PolyRegionExe(GeoNameControl.Instance);
     this.m_WidthOfStrip = stripWidth;
     this.m_XPositiveList = new List<GeoXYPoint>();
     this.m_XOppositeList = new List<GeoXYPoint>();
     this.m_PolyList = new List<GeoPolygon>();
     this.m_GisLinePairList = new List<GisLinePair>();
     this.m_PolyRegionDict = new Dictionary<int, GeoPolygonRegion>();
     this.m_BaseData = userVectorData;
     List<GeoPolygonRegion> allPolygons = this.m_BaseData.GetAllPolygons();
     foreach (GeoPolygonRegion region in allPolygons)
     {
         if (!this.m_PolyRegionDict.ContainsKey(region.ID))
         {
             this.m_PolyRegionDict.Add(region.ID, region);
         }
     }
     GeoNameControl.Instance.PolygonRegionDict = this.m_PolyRegionDict;
 }
Exemplo n.º 6
0
 private void Init(GeoUserVectorData polygonLayer, GeoTransformation trans)
 {
     this.InitializeComponent();
     this.m_PolyRegionDict = new Dictionary<int, GeoPolygonRegion>();
     this.m_PolygonDict = new Dictionary<int, List<Huawei.UNet.GIS.GeoUI.Polygon>>();
     this.m_PolygonIDList = new List<int>();
     this.m_PolyRegionExe = new PolyRegionExe(this.m_geoNameControl);
     this.m_PolyRegionList = polygonLayer.GetAllPolygons();
     this.m_Transformation = trans.Clone();
     foreach (GeoPolygonRegion region in this.m_PolyRegionList)
     {
         this.SetPolygonArea(region);
     }
     foreach (GeoPolygonRegion region in this.m_PolyRegionList)
     {
         this.m_PolyRegionDict.Add(region.ID, region);
         this.TransformPolygonDict(region.ID, region);
     }
     this.AddListViewItem();
     this.rdbIntersect.Checked = true;
 }
Exemplo n.º 7
0
 private static void UpdateGeoDataByArgs(AnalyGeoXYPointSymbolEventArgs args, GeoUserVectorData userVectorData)
 {
     Dictionary<SymbolConfig, List<GeoXYPoint>> symbolPtDict = args.m_SymbolPtDict;
     foreach (KeyValuePair<SymbolConfig, List<GeoXYPoint>> pair in symbolPtDict)
     {
         SymbolConfig key = pair.Key;
         List<GeoXYPoint> list = pair.Value;
         if (list.Count != 0)
         {
             GeoPointStyle style = new GeoPointStyle();
             style.SymbolStyle = PointSymbolStyle.TextSymbol;
             style.SymbolValue = key.SymbolValue;
             style.Color = key.ForeColor;
             style.IconSize = new Size((int) key.EMSize, (int) key.EMSize);
             style.SymbolFont = new Font(key.Family, key.EMSize, key.Style);
             foreach (GeoXYPoint point in list)
             {
                 userVectorData.AddPoint(point, style, false);
             }
         }
     }
 }