Exemple #1
0
        private async void OnLoadSelectDir(object dirPath)
        {
            if (dirPath == null)
            {
                return;
            }
            try
            {
                var drive = await _hcdzClient.GetSingleDrive(dirPath.ToString());

                if (drive == null)
                {
                    return;
                }
                EnableValue = ByteFormatter.ToString(drive.AvailableFreeSpace) + " 可用";
            }
            catch (Exception ex)
            {
            }

            //if (drives.Count() > 1)
            //{
            //    DriveIndex = 1;
            //}
        }
Exemple #2
0
        private async void OnLoadSelectDir(object dirPath)
        {
            if (dirPath == null)
            {
                return;
            }
            try
            {
                var drive = await _hcdzClient.GetSingleDrive(dirPath.ToString());

                if (drive == null)
                {
                    return;
                }

                DiskVal     = ByteFormatter.ToString(drive.AvailableFreeSpace) + " 可用";
                DiskPercent = 100.0 - (int)(drive.AvailableFreeSpace * 100.0 / drive.TotalSize);
            }
            catch (Exception ex)
            {
            }

            //if (drives.Count() > 1)
            //{
            //    DriveIndex = 1;
            //}
        }