本文整理汇总了C#中AxMapControl.FlashShape方法的典型用法代码示例。如果您正苦于以下问题:C# AxMapControl.FlashShape方法的具体用法?C# AxMapControl.FlashShape怎么用?C# AxMapControl.FlashShape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AxMapControl
的用法示例。
在下文中一共展示了AxMapControl.FlashShape方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FlashPoint
//闪烁点
public static void FlashPoint(AxMapControl mapControl, IScreenDisplay iScreenDisplay, IGeometry iGeometry)
{
ISimpleMarkerSymbol iMarkerSymbol;
ISymbol iSymbol;
IRgbColor iRgbColor;
iMarkerSymbol = new SimpleMarkerSymbol();
iMarkerSymbol.Style = esriSimpleMarkerStyle.esriSMSCircle;
iRgbColor = new RgbColor();
iRgbColor.RGB = System.Drawing.Color.FromArgb(0, 0, 0).ToArgb();
iMarkerSymbol.Color = iRgbColor;
iSymbol = (ISymbol)iMarkerSymbol;
iSymbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen;
mapControl.FlashShape(iGeometry, 5, 300, iSymbol);
}
示例2: FlashLine
//闪烁线
public static void FlashLine(AxMapControl mapControl, IScreenDisplay iScreenDisplay, IGeometry iGeometry)
{
ISimpleLineSymbol iLineSymbol;
ISymbol iSymbol;
IRgbColor iRgbColor;
iLineSymbol = new SimpleLineSymbol();
iLineSymbol.Width = 4;
iRgbColor = new RgbColor();
iRgbColor.Red = 255;
iLineSymbol.Color = iRgbColor;
iSymbol = (ISymbol)iLineSymbol;
iSymbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen;
mapControl.FlashShape(iGeometry, 5, 300, iSymbol);
}
示例3: FlashPolygon
//闪烁面
static void FlashPolygon(AxMapControl mapControl, IScreenDisplay iScreenDisplay, IGeometry iGeometry)
{
ISimpleFillSymbol iFillSymbol;
ISymbol iSymbol;
IRgbColor iRgbColor;
iFillSymbol = new SimpleFillSymbol();
iFillSymbol.Style = esriSimpleFillStyle.esriSFSSolid;
iFillSymbol.Outline.Width = 12;
iRgbColor = new RgbColor();
iRgbColor.RGB = System.Drawing.Color.FromArgb(100, 180, 180).ToArgb();
iFillSymbol.Color = iRgbColor;
iSymbol = (ISymbol)iFillSymbol;
iSymbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen;
iScreenDisplay.SetSymbol(iSymbol);
mapControl.FlashShape(iGeometry, 3, 200, iSymbol);
}
示例4: query
public static int query(AxMapControl axMapControl1, string searchName,int index,bool flash)
{
ILayer layer = axMapControl1.get_Layer(index);
IFeatureLayer featureLayer = layer as IFeatureLayer;
int i=0;
if(featureLayer==null)
{
MessageBox.Show("选择图层不是Feature图层!");
return i;
}
//获取featureLayer的featureClass
IFeatureClass featureClass = featureLayer.FeatureClass;
IFeature feature = null;
IQueryFilter queryFilter = new QueryFilterClass();
//queryFilter.WhereClause = "SELECT * FROM " + featureClass.AliasName + " WHERE: 'CC' = '" + searchName + "'";
try
{
queryFilter.WhereClause = "用地类型 = '" + searchName + "'";
IFeatureCursor featureCusor = featureLayer.Search(queryFilter, false); ;
//featureCusor
//search的参数第一个为过滤条件,第二个为是否重复执行。
while ((feature = featureCusor.NextFeature()) != null)
{
//axMapControl1.Extent =(IEnvelope) feature.Shape;
axMapControl1.Map.SelectFeature(axMapControl1.get_Layer(index), feature);
if(flash)
axMapControl1.FlashShape(feature.Shape);
//axMapControl1.Refresh(esriViewDrawPhase.esriViewGraphicSelection, null, null);
i++;
}
axMapControl1.ActiveView.Refresh();
return i;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
return i;
}
}