zoukankan      html  css  js  c++  java
  • C#札记

    //获取文件夹:“C:UsersAdministratorAppDataRoaming”

    var appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);

    //获取path文件夹及其子文件夹内所有dwg文件

    var files = Directory.GetFiles(path, "*.dwg", SearchOption.AllDirectories);

    //获取注册表:HKEY_LOCAL_MACHINESOFTWAREAutodeskHardcopy

    using (var hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64))
    {
      if (hklm != null)
      {
        using (var key = hklm.OpenSubKey(@"SOFTWAREAutodeskHardcopy"))
        {
          if (key != null)
          {
    
            var values = key.GetValueNames();
    
          }
      }
    
    }
    View Code

    //获取注册表:HKEY_LOCAL_MACHINESOFTWAREAutodeskHardcopy

    using (var hkcu = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64))
    {
      if (hkcu != null)
      {
        using (var key = hkcu.OpenSubKey(@"SoftwareAutodeskAutoCADR19.1ACAD-D001:804ProfilesTArch9General"))
        {
          if (key != null)
          {
            var cadPrinterConfigDir = key.GetValue("PrinterConfigDir");
          }
    
        }
    
      }
    
    }
    View Code
  • 相关阅读:
    边学边收 代码
    VS2013无法链接到TFS (转)
    使用Spring MVC创建 REST API
    zookeeper的概念和基础
    使用Spring的HttpInvoker
    使用远程服务
    Spring MVC起步
    使用注解创建切面
    通过切点来选择连接点
    Spring实战之切面编程
  • 原文地址:https://www.cnblogs.com/clinber/p/13676536.html
Copyright © 2011-2022 走看看