/// <summary>
        /// 获取系统内存大小
        /// </summary>
        /// <returns>内存大小(单位M)</returns>
        public string GetPhisicalMemory()
        {
            ManagementObjectSearcher _searcher = new ManagementObjectSearcher();                                                                        //用于查询一些如系统信息的管理对象

            _searcher.Query = new SelectQuery(WindowsAPIType.Win32_PhysicalMemory.ToString(), "", new string[] { WindowsAPIKeys.Capacity.ToString() }); //设置查询条件
            ManagementObjectCollection _collection = _searcher.Get();                                                                                   //获取内存容量

            ManagementObjectCollection.ManagementObjectEnumerator em = _collection.GetEnumerator();

            long _capacity = 0;

            while (em.MoveNext())
            {
                ManagementBaseObject _baseObj = em.Current;
                if (_baseObj.Properties[WindowsAPIKeys.Capacity.ToString()].Value != null)
                {
                    try
                    {
                        _capacity += long.Parse(_baseObj.Properties[WindowsAPIKeys.Capacity.ToString()].Value.ToString());
                    }
                    catch
                    {
                        return("查询失败");
                    }
                }
            }
            return(TypeHelper.BitToGB((double)_capacity, 1024.0));
        }
        /// <summary>
        /// 获取硬盘容量
        /// </summary>
        public string GetDiskSize()
        {
            string        _result = string.Empty;
            StringBuilder _sb     = new StringBuilder();

            try
            {
                string                     hdId      = string.Empty;
                ManagementClass            hardDisk  = new ManagementClass(WindowsAPIType.Win32_DiskDrive.ToString());
                ManagementObjectCollection hardDiskC = hardDisk.GetInstances();
                foreach (ManagementObject m in hardDiskC)
                {
                    long capacity = Convert.ToInt64(m[WindowsAPIKeys.Size.ToString()].ToString());
                    _sb.Append(TypeHelper.BitToGB(capacity, 1000.0) + "+");
                }
                _result = _sb.ToString().TrimEnd('+');
            }
            catch
            {
            }
            return(_result);
        }
        /// <summary>
        /// 显卡 芯片,显存大小
        /// </summary>
        public Tuple <string, string> GetVideoController()
        {
            Tuple <string, string> _result = null;

            try
            {
                ManagementClass            _hardDisk  = new ManagementClass(WindowsAPIType.Win32_VideoController.ToString());
                ManagementObjectCollection _hardDiskC = _hardDisk.GetInstances();
                foreach (ManagementObject m in _hardDiskC)
                {
                    _result = new Tuple <string, string>(m[WindowsAPIKeys.VideoProcessor.ToString()].ToString().Replace("Family", ""), TypeHelper.BitToGB(Convert.ToInt64(m[WindowsAPIKeys.AdapterRAM.ToString()].ToString()), 1024.0));
                    break;
                }
            }
            catch
            {
            }
            return(_result);
        }
        /// <summary>
        /// 获取逻辑分区信息: 驱动器名称,根目录,可用空间,总空间
        /// </summary>
        /// <returns></returns>
        public List <Tuple <string, string, string, string> > GetLogicDisk()
        {
            List <Tuple <string, string, string, string> > _lstTupleDriver = new List <Tuple <string, string, string, string> >();

            DriveInfo[] _arrDriver = null;
            _arrDriver = System.IO.DriveInfo.GetDrives();
            if (_arrDriver != null && _arrDriver.Count() > 0)
            {
                foreach (var _driver in _arrDriver)
                {
                    Tuple <string, string, string, string> _tupleDriver = new Tuple <string, string, string, string>(_driver.Name, _driver.RootDirectory.ToString(), TypeHelper.BitToGB(_driver.TotalFreeSpace, 1000), TypeHelper.BitToGB(_driver.TotalSize, 1000));
                    _lstTupleDriver.Add(_tupleDriver);
                }
            }
            return(_lstTupleDriver);
        }