//default constructor
 public LibrarianListItem(Task task, LibrarianWindow parent, SQLiteDatabase database)
 {
     InitializeComponent();
     this.taskObject = task;
     this.db = database;
     this.parentWindow = parent;
     SetItemVisualization(task);
 }
 private void SetItemVisualization(Task task)
 {
     LibrarianItemType itemType = TranslateStateToItemType(task.CurrentState);
     ColorOutline(itemType);
     this.TargetFileName_Label.Content = task.PathName;
     ;
     if (itemType == LibrarianItemType.Failed)
     {
         PutFailButtons();
         this.TargetFileNameProgressMessage_Label.Content = "Failed to find additional data for the file.";
     }
     else if (itemType == LibrarianItemType.InProgress)
     {
         PutProgressBar();
         this.TargetFileNameProgressMessage_Label.Content = "Additional data is being collected for the file.";
     }
     else if (itemType == LibrarianItemType.Awaiting)
     {
         this.TargetFileNameProgressMessage_Label.Content = "The file is awaiting to be processed.";
     }
     else if (itemType == LibrarianItemType.Completed)
     {
         this.TargetFileNameProgressMessage_Label.Content = "New data has been collected for the file.";
     }
 }