/// <summary> /// Returns a shortend name with only the crumb trail to the file, excludes the file extension /// </summary> /// <param name="_connectionDetails"></param> /// <returns></returns> private string CalculateFileShortName(AppSettings _connectionDetails ) { int StartOfMatch = _connectionDetails.DepotPath.Length-Settings.Default.DepotPathMustEndWith.Length; int LengthOfMatch = DepotFile.Length - _connectionDetails.ShortFileNameStartPosition - 8; // 8 = ".INT.udn" //strip / from the beginning of the string if there. return DepotFile.Substring(_connectionDetails.ShortFileNameStartPosition, LengthOfMatch); }
public FileProcessingDetails(string DepotPath, string ClientPath, int HeadChange, State HeadState, bool CheckedOutByOthers, AppSettings _connectionDetails) : this() { // INT File path in depot this.DepotFile = DepotPath; // INT File path on client this.ClientFile = ClientPath; // ChangeList of the Main file this.ChangeList = HeadChange; // FileState for this list row this.FileState = HeadState; // Boolean value indicating whether another user has this file checked out this.CheckedOutByOthers = CheckedOutByOthers; // Short file name used in the list this.FileListShortName = CalculateFileShortName(_connectionDetails); }