private void ConfigureRedirectedDrives(RdpOptions rdpOptions) { if (rdpOptions.Redirect.Drives.Count > 0 && rdpOptions.Redirect.Drives[0].Equals("true")) { this.client.AdvancedSettings2.RedirectDrives = true; } else { for (int i = 0; i < this.nonScriptable.DriveCollection.DriveCount; i++) { IMsRdpDrive drive = this.nonScriptable.DriveCollection.get_DriveByIndex((uint)i); foreach (string str in rdpOptions.Redirect.Drives) { if (drive.Name.IndexOf(str) > -1) { drive.RedirectionState = true; } } } } }
private void ConfigureRedirectedDrives() { if (this.Favorite.RedirectedDrivesList.Count > 0 && this.Favorite.RedirectedDrives[0].Equals("true")) { this.client.AdvancedSettings2.RedirectDrives = true; } else { this.InvokeIfNecessary(() => { for (int i = 0; i < nonScriptable.DriveCollection.DriveCount; i++) { IMsRdpDrive drive = nonScriptable.DriveCollection.get_DriveByIndex((uint)i); foreach (string str in this.Favorite.RedirectedDrivesList) { if (drive.Name.IndexOf(str) > -1) { drive.RedirectionState = true; } } } }); } }