protected override void GetVolumeInfo() { if (IsXDCAM && AccessType == TDirectoryAccessType.FTP) using (XdcamClient client = new XdcamClient()) { Uri uri = new Uri(_folder, UriKind.Absolute); client.Host = uri.Host; client.Credentials = NetworkCredential; client.Connect(); VolumeFreeSize = client.GetFreeDiscSpace(); client.Disconnect(); } else base.GetVolumeInfo(); }
public override void Refresh() { if (_isRefreshing) return; _isRefreshing = true; try { if (IsXDCAM) { if (Monitor.TryEnter(_xdcamLockObject, 1000)) try { if (AccessType == TDirectoryAccessType.FTP) { using (XdcamClient client = new XdcamClient()) { Uri uri = new Uri(_folder, UriKind.Absolute); client.Host = uri.Host; client.Credentials = NetworkCredential; client.Connect(); VolumeFreeSize = client.GetFreeDiscSpace(); _readXDCAM(client); client.Disconnect(); } } else _readXDCAM(null); } finally { Monitor.Exit(_xdcamLockObject); } else throw new ApplicationException("Nie udało się uzyskać dostępu do XDCAM"); } else if (AccessType == TDirectoryAccessType.FTP) _ftpDirectoryList(); } finally { _isRefreshing = false; } }