private DateTime getDocumentDate(Doc d) { int year = int.Parse(d.Location.Substring(0, 4)); int month = int.Parse(d.Location.Substring(4, 2)); int day = int.Parse(d.Location.Substring(6, 2)); int hour = int.Parse(d.Location.Substring(8, 2)); int minute = int.Parse(d.Location.Substring(10, 2)); int second = int.Parse(d.Location.Substring(12, 2)); DateTime dt = new DateTime(year, month, day, hour, minute, second); return dt; }
/// <summary> /// add a document to active profile. because documents are opened by different users, each user (profile) has his own set of documents /// </summary> /// <param name="documentName"></param> /// <param name="documentLocation"></param> public static void AddDocumentToActive(String documentName, String documentLocation) { Doc doc = new Doc(); doc.Name = documentName; doc.Location = documentLocation; ActiveProfile.Documents.Add(doc); }