易截截图软件、单文件、免安装、纯绿色、仅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#中对XML节点进行增删改查

号称xmlhelper的一个类
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
namespace WebApplication2
{
/// <summary>
/// XMLHelper XML文档操作管理器
/// </summary>
public class XMLHelper
{
public X ......

C#中使用DataTable显示Access数据库中文件列表


private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
             this.comboBox2.Items.Clear();
            switch(this.comboBox1.SelectedIndex)
       ......

C#开机自动启动应用程序

//命名空间 using Microsoft.Win32;
private void checkBox2_CheckedChanged(object sender, System.EventArgs e)
{
if (checkBox2.Checked) //设置开机自启动
{
//MessageBox.Show ("设置开机自启动需要修改注册表","提示");
string path = Application.ExecutablePath;
RegistryKey rk = Registry.LocalMac ......

C# 快速关机代码

今天用到这个,网上找个不错的,保存下来。
注意:这个方法是快速关机,不会保存你的任何未保存信息。
// 这个结构体将会传递给API。使用StructLayout
[StructLayout(LayoutKind.Sequential, Pack = 1)]
internal struct TokPriv1Luid
{
public int Count;
public ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号