資源簡介
自制符號選擇器,實現類似ArcGIS的符號選擇器功能

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?ESRI.ArcGIS.Display;
using?ESRI.ArcGIS.DisplayUI;
using?ESRI.ArcGIS.Controls;
using?ESRI.ArcGIS.Carto;
namespace?自制符號選擇器
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?void?axTOCControl1_OnDoubleClick(object?sender?ESRI.ArcGIS.Controls.ITOCControlEvents_OnDoubleClickEvent?e)
????????{
????????????/*//調用arcgis?Desktop中的symbol?selector
????????????esriTOCControlItem?TocCotrol?=?esriTOCControlItem.esriTOCControlItemNone;
????????????ilayer?player?=?null;
????????????IBasicMap?pBasicMap?=?null;
????????????object?unk?=?null;
????????????object?data?=?null;
????????????if?(e.button?==?1)
????????????{
????????????????System.Drawing.Point?pos?=?new?System.Drawing.Point(e.x?e.y);
????????????????axTOCControl1.HitTest(e.x?e.y?ref?TocCotrol?ref?pBasicMap?ref?player?ref?unk?ref?data);
????????????????if?(TocCotrol?==?esriTOCControlItem.esriTOCControlItemLegendClass)
????????????????{
????????????????????ILegendClass?pLegendClass?=?new?LegendClassClass();
????????????????????ILegendGroup?pLegendGroup?=?new?LegendGroupClass();
????????????????????if?(unk?is?ILegendGroup)
????????????????????{
????????????????????????pLegendGroup?=?unk?as?ILegendGroup;
?
????????????????????}
????????????????????pLegendClass?=?pLegendGroup.get_Class((int)data);
????????????????????ISymbol?pSymbol?=?pLegendClass.Symbol;
????????????????????ISymbolSelector?pSymbolSelector?=?new?SymbolSelectorClass();
????????????????????bool?bok?=?false;
????????????????????pSymbolSelector.AddSymbol(pSymbol);
????????????????????bok?=?pSymbolSelector.SelectSymbol(0);
????????????????????if?(bok)
????????????????????{
????????????????????????pLegendClass.Symbol?=?pSymbolSelector.GetSymbolAt(0);
?
????????????????????}
????????????????????this.axMapControl1.ActiveView.Refresh();
????????????????????this.axTOCControl1.Refresh();
????????????????}
?????????????
????????????}
????????????*/
???????????
????????????//調用自制的符號選擇器
????????????
????????????
????????????if?(e.button?==?1)
????????????{
????????????????esriTOCControlItem?TocCotrol?=?esriTOCControlItem.esriTOCControlItemNone;
????????????????ilayer?player?=?new?FeaturelayerClass();
????????????????IBasicMap?pBasicMap?=?new?MapClass();?;
????????????????object?unk?=?new?object();
????????????????object?data?=?new?object();
????????????????axTOCControl1.HitTest(e.x?e.y?ref?TocCotrol?ref?pBasicMap?ref?player?ref?unk?ref?data);
????????????????//MessageBox.Show(player.Name);
????????????????
????????????????if?(TocCotrol?==?esriTOCControlItem.esriTOCControlItemLegendClass)
????????????????{
????????????????????//取得圖例
????????????????????ILegendClass?pLegendClass?=?(
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????36864??2011-05-19?14:53??自制符號選擇器\bin\Debug\自制符號選擇器.exe
?????文件??????40448??2011-05-19?14:53??自制符號選擇器\bin\Debug\自制符號選擇器.pdb
?????文件??????14328??2011-05-19?14:53??自制符號選擇器\bin\Debug\自制符號選擇器.vshost.exe
?????文件????????490??2007-07-21?01:33??自制符號選擇器\bin\Debug\自制符號選擇器.vshost.exe.manifest
?????文件???????4141??2011-04-13?11:00??自制符號選擇器\Form1.cs
?????文件???????5152??2011-04-12?14:46??自制符號選擇器\Form1.Designer.cs
?????文件??????26440??2011-04-12?14:46??自制符號選擇器\Form1.resx
?????文件?????119921??2011-04-11?17:47??自制符號選擇器\obj\Debug\ResolveAssemblyReference.cache
?????文件????????937??2011-05-19?14:53??自制符號選擇器\obj\Debug\自制符號選擇器.csproj.FileListAbsolute.txt
?????文件????????912??2011-04-12?14:46??自制符號選擇器\obj\Debug\自制符號選擇器.csproj.GenerateResource.Cache
?????文件??????36864??2011-05-19?14:53??自制符號選擇器\obj\Debug\自制符號選擇器.exe
?????文件??????13919??2011-04-12?14:46??自制符號選擇器\obj\Debug\自制符號選擇器.Form1.resources
?????文件??????40448??2011-05-19?14:53??自制符號選擇器\obj\Debug\自制符號選擇器.pdb
?????文件????????180??2011-04-12?10:06??自制符號選擇器\obj\Debug\自制符號選擇器.Properties.Resources.resources
?????文件????????745??2011-04-12?13:48??自制符號選擇器\obj\Debug\自制符號選擇器.SymbolSelector.resources
?????文件????????502??2011-04-11?17:29??自制符號選擇器\Program.cs
?????文件???????1398??2011-04-11?17:29??自制符號選擇器\Properties\AssemblyInfo.cs
?????文件???????2892??2011-04-11?17:29??自制符號選擇器\Properties\Resources.Designer.cs
?????文件???????5612??2011-04-11?17:29??自制符號選擇器\Properties\Resources.resx
?????文件???????1106??2011-04-11?17:29??自制符號選擇器\Properties\Settings.Designer.cs
?????文件????????249??2011-04-11?17:29??自制符號選擇器\Properties\Settings.settings
?????文件???????5764??2011-04-12?10:06??自制符號選擇器\自制符號選擇器.csproj
?????文件??????17366??2011-05-19?14:54??自制符號選擇器\選擇符號.cs
?????文件??????15131??2011-04-12?18:14??自制符號選擇器\選擇符號.Designer.cs
?????文件???????7134??2011-04-12?13:48??自制符號選擇器\選擇符號.resx
?????文件????????953??2011-04-11?17:29??自制符號選擇器.sln
????..A..H.?????19456??2011-05-19?14:54??自制符號選擇器.suo
?????目錄??????????0??2011-04-11?17:53??自制符號選擇器\obj\Debug\Refactor
?????目錄??????????0??2011-04-11?17:29??自制符號選擇器\obj\Debug\TempPE
?????目錄??????????0??2011-04-11?17:47??自制符號選擇器\bin\Debug
............此處省略8個文件信息
評論
共有 條評論