易截截图软件、单文件、免安装、纯绿色、仅160KB

ArcEngine 图例C#源码:

private void MakeLegend(IActiveView activeView,IPageLayout pageLayout)
      {
          //定义图例UID对象
          UID uid = new UIDClass();
          uid.Value="esriCore.Legend";       
          //设置图例存放的坐标位置                
          //定义单位
          pageLayout.Page.Units = esriUnits.esriCentimeters;
          //得到草图容器对象
          IGraphicsContainer container = pageLayout as IGraphicsContainer;
          //得到当前地图的框架
          IMapFrame frameElement = container.FindFrame(activeView.FocusMap) as IMapFrame;
          IElement mapElement = frameElement as IElement;
 
          IEnvelope mapEnv = mapElement.Geometry.Envelope;   
          IEnvelope envelope = new EnvelopeClass();
          //通过当前地图框架得到相对位置
          envelope.PutCoords(mapEnv.XMin, mapEnv.YMin, mapEnv.XMin + 6.5, mapEnv.YMin + 0.8);
          IMapSurroundFrame frame = frameElement.CreateSurroundFrame(uid, null);            
          ILegend legend = frame.MapSurroun


相关文档:

C#连接MySQL进行操作的方法

由于需要实现以下功能:
网关通过串口发送数据给PC机,PC机收集数据并解析保存到MySQL中,然后JSP页面读取MySQL中的数据并显示。
所以利用C#连接MySQL数据成为了必须要经过的过程,在此给予详细的说明。
1、下载需要的文件MySQLDriverCS,下载地址为:http://sourceforge.net/projects/mysqldrivercs
2、安装文件:MySQ ......

C#序列化xml的完整例子

C#序列化xml
关键步骤:
XmlSerializer xSerializer = new XmlSerializer(typeof(MyObj));
StringWriter sWriter = new StringWriter(CultureInfo.InvariantCulture);
XmlTextWriter xTextWriter = new XmlTextWriter(sWriter);
......

C#读写Access数据库的OLE对象字段

(一)把文件内容写入Access数据库的OLE对象字段中:
if (File.Exists(txtBrow.Text) != false)   // 文本框txtBrow中内容为文件路径及文件名
{
     //获取文件后缀
     FileInfo p = new FileInfo(txtBrow.Text.Trim());
     F_str_Type = ......

C#使用SQLDMO实现对MSSQL数据库进行备份和恢复

public sealed class DbOper
{
     ///<summary>
     /// DbOper类的构造函数
     ///</summary>
     private DbOper()
     {
     }
     ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号