zoukankan      html  css  js  c++  java
  • ArcGIS鼠标滚轮方向之代码篇

    Desktop10.X有多个版本,不同版本的注册表路径不一致,注册表中可能残留多个版本的注册信息;也可能没有Desktop,而是Engine。其实可以通过RuntimeManager.ActiveRuntime的属性开判断版本、产品类型、甚至安装路径等。

    /// <summary>
    /// 修改滚轮方向
    /// </summary>
    /// <param name="flag">0:向前表示放大(常规习惯);1:向前表示缩小</param>
    public static void ModifyWheel(int flag = 0)
    {
        string path = @"SoftwareESRI" + RuntimeManager.ActiveRuntime.Product + RuntimeManager.ActiveRuntime.Version + @"ArcMapSettings" ;
        RegistryKey setKey = Registry.CurrentUser.OpenSubKey(path, true) ?? Registry.CurrentUser.CreateSubKey(path);
        setKey?.SetValue("ReverseMouseWheel", flag, RegistryValueKind.DWord);
    }
    

      

    如果绑定ProductCode.Engine许可,路径为SoftwareESRIEngine10.2ArcMapSettings;如果绑定ProductCode.Desktop许可,路径为SoftwareESRI Desktop10.2ArcMapSettings

  • 相关阅读:
    OAuth2.0协议流程
    记多个微服务同时被kill分析
    记一次调用API遇到的问题
    win10安装mysql遇到的坑
    nagios
    rmp安装mysql5.6
    桥接模式-xshell连接虚拟机
    VMWare虚拟机-网络适配器
    ***时间目录***
    docker常用命令
  • 原文地址:https://www.cnblogs.com/liweis/p/10727496.html
Copyright © 2011-2022 走看看