private void addtext_Click(object sender, EventArgs e)
{
ESRI.ArcGIS.Carto.IActiveView activeView;
ESRI.ArcGIS.Carto.IGraphicsContainer graphicsContainer;
ESRI.ArcGIS.Carto.ITextElement textElement;
ESRI.ArcGIS.Display.ITextSymbol textSymbol;
ESRI.ArcGIS.Display.IRgbColor rgbColor;
ESRI.ArcGIS.Carto.IElement element;
ESRI.ArcGIS.Geometry.IEnvelope envelope;
activeView = axPageLayoutControl1.PageLayout as ESRI.ArcGIS.Carto.IActiveView;
envelope = new ESRI.ArcGIS.Geometry.EnvelopeClass();
envelope.PutCoords(0, 0, 5, 5);
textElement = new ESRI.ArcGIS.Carto.TextElementClass();
element = textElement as ESRI.ArcGIS.Carto.IElement;
element.Geometry = envelope;
textElement.Text = "我的地图";
textSymbol = new ESRI.ArcGIS.Display.TextSymbolClass();
rgbColor = new ESRI.ArcGIS.Display.RgbColorClass();
rgbColor.Red = 255;
rgbColor.Green = 255;
rgbColor.Blue = 0;
textSymbol.Color = rgbColor as ESRI.ArcGIS.Display.IColor;
textSymbol.Size = 20;
textElement.Symbol = textSymbol;
graphicsContainer = activeView as ESRI.ArcGIS.Carto.IGraphicsContainer;
graphicsContainer.AddElement(element, 0);
axPageLayoutControl1.Refresh();
}
private void addSymbol_Click(object sender, EventArgs e)
{
ESRI.ArcGIS.esriSystem.UID uid;
ESRI.ArcGIS.Geometry.IEnvelope envelope;
ESRI.ArcGIS.Carto.IGraphicsContainer graphicsContainer;
ESRI.ArcGIS.Carto.IMapFrame mapFrame;
ESRI.