예제 #1
0
 public UserFile(string path)
 {
     Name        = Path.GetFileNameWithoutExtension(path);
     CreatedTime = File.GetCreationTime(path);
     DisplayTime = CreatedTime.ToLongDateString();
     FilePath    = path;
     Size        = FileHelper.GetFileSize(path);
 }
예제 #2
0
 public void PrintFullPost()
 {
     Console.WriteLine("Date Posted: " + CreatedTime.ToLongDateString());
     Console.WriteLine(Title);
     Console.WriteLine();
     Console.WriteLine(Description);
     Console.WriteLine();
     Console.WriteLine("Votes: " + Votes);
 }
예제 #3
0
 public void Print()
 {
     Console.WriteLine("Title: " + Title);
     Console.WriteLine("Description: " + Description);
     Console.WriteLine("Date Posted: " + CreatedTime.ToLongDateString());
     Console.ForegroundColor = ConsoleColor.Red;
     Console.WriteLine("\nTotal Votes Count: " + Votes);
     Console.ResetColor();
     Console.ReadLine();
 }