本文整理汇总了C#中ILayer.Refresh方法的典型用法代码示例。如果您正苦于以下问题:C# ILayer.Refresh方法的具体用法?C# ILayer.Refresh怎么用?C# ILayer.Refresh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ILayer
的用法示例。
在下文中一共展示了ILayer.Refresh方法的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)
{
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);
}
}
示例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, 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);
}
}
示例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);
}
}