private string GetDirectoryPath(ComputerDrive drive) { if (drive.Parent == null || string.IsNullOrWhiteSpace(drive.Parent.Title)) { return(drive.Title); } return(drive.Title.Insert(0, CreateFullTitle(drive.Parent) + "\\")); }
private string GetDirectoryPath(ComputerDrive drive) { if(drive.Parent == null || string.IsNullOrWhiteSpace(drive.Parent.Title)) return drive.Title; return drive.Title.Insert(0, CreateFullTitle(drive.Parent) + "\\"); }
private string CreateFullTitle(ComputerDrive drive) { return GetDirectoryPath(drive).TrimEnd('\\', '/'); }
private string CreateFullTitle(ComputerDrive drive) { return(GetDirectoryPath(drive).TrimEnd('\\', '/')); }
/// <summary> /// Handle the update of the text for the control from any source, /// including the TextBox part and the Text dependency property. /// </summary> /// <param name="newDirectory">The new directory.</param> private void DirectoryUpdated(ComputerDrive newDirectory) { // Update the interface and values only as necessary UpdateDirectoryValue(); }