当前位置: 首页>>代码示例>>C#>>正文


C# ILayer.DeleteAllObjects方法代码示例

本文整理汇总了C#中ILayer.DeleteAllObjects方法的典型用法代码示例。如果您正苦于以下问题:C# ILayer.DeleteAllObjects方法的具体用法?C# ILayer.DeleteAllObjects怎么用?C# ILayer.DeleteAllObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ILayer的用法示例。


在下文中一共展示了ILayer.DeleteAllObjects方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreatePoint

        //Austen: changed input params to pass entire layer list so that we'd have access to all it's values
        public void CreatePoint(ILayer FP_point, int layer, LayerList layerList, string id, double lat, double lon, DateTime time, bool isStale, int displayChoice)
        {
            if (isStale == false)
                iconLoc += "red turn.ico";
            else
                iconLoc += "white turn.ico";

            try
            {
                FP_point.DeleteAllObjects(layer);// delete everything on this layer.. keeps us from having bread crumbs

                FP_point.AddIcon(layer, iconLoc, lat, lon, "");

                if (layerList.FP_LatLonlist.Count > 1)
                {
                    double lat1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lat;
                    double lon1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lon;
                    DateTime time1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].time;

                    double heading = logistics.Heading(lat, lon, lat1, lon1); // Compute heading
                    double speed = logistics.SpeedMPH(lat, lon, lat1, lon1, time, time1); // Compute Speed
                    RenderArrow(FP_point, layerList, lat, lon, time, heading);

                    //{MPH = 0, Bearing = 1, None = 2, Both = 3};
                    if (displayChoice == 0) // if we want to see just mph
                    {
                        AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 15);
                        AddSpeedText(FP_point, layerList, lat, lon, speed, heading, YtextOffset);
                    }

                    if (displayChoice == 1) // if we want to see just bearing
                    {
                        AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 15);
                        AddHeadingText(FP_point, layerList, lat, lon, heading, YtextOffset);
                    }

                    if (displayChoice == 2) // if we want to see just id
                    {
                        AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset);
                    }

                    if (displayChoice == 3) // if we want to see just all
                    {
                        AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 30);
                        AddSpeedText(FP_point, layerList, lat, lon, speed, heading, YtextOffset - 15);
                        AddHeadingText(FP_point, layerList, lat, lon, heading, YtextOffset);
                    }
                }

                FP_point.Refresh(-1);
            }
            catch (Exception ex)
            {
                string error = ex.Message;
                MessageBox.Show("Error Message: "+ex.Message+ " Stack Trace: "+ex.StackTrace);
            }
        }
开发者ID:jwallwhitworth,项目名称:FalconPoint,代码行数:58,代码来源:FPdrawer.cs

示例2: CreatePoint

        //Austen: changed input params to pass entire layer list so that we'd have access to all it's values
        public void CreatePoint(ILayer FP_point, int layer, LayerList layerList, string id, double lat, double lon, DateTime time, bool isStale)
        {
            if (isStale == false)
                iconLoc += "red turn.ico";
            else
                iconLoc += "white turn.ico";

            try
            {
                FP_point.DeleteAllObjects(layer);// delete everything on this layer.. keeps us from having bread crumbs

                FP_point.AddIcon(layer, iconLoc, lat, lon, "");

                if (layerList.FP_LatLonlist.Count > 1)
                {
                    double lat1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lat;
                    double lon1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lon;
                    DateTime time1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].time;

                    double heading = logistics.Heading(lat, lon, lat1, lon1); //Compute heading
                    double speed = logistics.SpeedMPH(lat, lon, lat1, lon1, time, time1); //Compute Speed
                    RenderArrow(FP_point, layerList, lat, lon, time, heading);

                    AddUIDText(FP_point, layerList, lat, lon, heading, id);
                    AddHeadingText(FP_point, layerList, lat, lon, heading);
                    AddSpeedText(FP_point, layerList, lat, lon, speed, heading);
                }

                FP_point.Refresh(-1);
            }
            catch (Exception ex)
            {
                string error = ex.Message;
                MessageBox.Show("Error Message: "+ex.Message+ " Stack Trace: "+ex.StackTrace);
            }
        }
开发者ID:jterry7484,项目名称:FalconPoint,代码行数:37,代码来源:FPdrawer.cs

示例3: CreatePoint

        //Austen: changed input params to pass entire layer list so that we'd have access to all it's values
        public void CreatePoint(ILayer FP_point, int layer, LayerList layerList, string id, double lat, double lon, DateTime time, bool isStale)
        {
            iconLoc = FalconPoint4.Properties.Settings.Default.DefaultIconFolder + WhichIcon(id);

            if (isStale == true) // data is stale -
            {
                id += " - STALE";
                FP_point.SetPen(layer, 0, 0, 0, 0, 0, 0, 1, 3, 0);
            }
            else // data is not stale
                FP_point.SetPen(layer, 50, 205, 50, 0, 0, 0, 0, 3, 0);

            try
            {
                FP_point.DeleteAllObjects(layer);// delete everything on this layer.. keeps us from having bread crumbs

                FP_point.AddIcon(layer, iconLoc, lat, lon, "");

                if (layerList.FP_LatLonlist.Count > 1)
                {
                    double lat1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lat;
                    double lon1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].lon;
                    DateTime time1 = layerList.FP_LatLonlist[layerList.FP_LatLonlist.Count - 1].time;

                    double heading = logistics.Heading(lat, lon, lat1, lon1); // Compute heading
                    double speed = logistics.SpeedMPH(lat, lon, lat1, lon1, time, time1); // Compute Speed

                    if (layerList.showArrow != false)
                    {
                        RenderArrow(FP_point, layerList, lat, lon, time, heading);

                        //{MPH = 0, Bearing = 1, None = 2, Both = 3};
                        if (FPmain.DisplayChoice == 0) // if we want to see just mph
                        {
                            AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 15);
                            AddSpeedText(FP_point, layerList, lat, lon, speed, heading, YtextOffset);
                        }

                        if (FPmain.DisplayChoice == 1) // if we want to see just bearing
                        {
                            AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 15);
                            AddHeadingText(FP_point, layerList, lat, lon, heading, YtextOffset);
                        }

                        if (FPmain.DisplayChoice == 2) // if we want to see just id
                        {
                            AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset);
                        }

                        if (FPmain.DisplayChoice == 3) // if we want to see just all
                        {
                            AddUIDText(FP_point, layerList, lat, lon, heading, id, YtextOffset - 30);
                            AddSpeedText(FP_point, layerList, lat, lon, speed, heading, YtextOffset - 15);
                            AddHeadingText(FP_point, layerList, lat, lon, heading, YtextOffset);
                        }
                    }
                }

                FP_point.Refresh(-1);
            }
            catch (Exception ex)
            {
                string error = ex.Message;
                MessageBox.Show("Error Message: "+ex.Message+ " Stack Trace: "+ex.StackTrace);
            }
        }
开发者ID:CS452,项目名称:FalconPoint,代码行数:67,代码来源:FPdrawer.cs


注:本文中的ILayer.DeleteAllObjects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。