本文整理匯總了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;
}
}