/// <summary>
        ///     Initialises a new instance of the <see cref="TvShows" /> class.
        /// </summary>
        public TvShows()
        {
            InitializeComponent();

            tvShowRepository  = CompositionRoot.Get <ITvShowRepository>();
            fileResultManager = CompositionRoot.Get <IFileResultManager>();
        }
Exemple #2
0
 /// <summary>
 ///     Initialises a new instance of the <see cref="FormatBuilder" /> class.
 /// </summary>
 /// <param name="currentFormat">
 ///     The current format.
 /// </param>
 /// <param name="fileResultManager">
 ///     The file result manager.
 /// </param>
 public FormatBuilder(string currentFormat, IFileResultManager fileResultManager)
 {
     InitializeComponent();
     this.fileResultManager = fileResultManager;
     exampleResult          = FileResult.Example;
     textFormat.Text        = currentFormat;
 }
Exemple #3
0
        /// <summary>
        ///     Initialises a new instance of the <see cref="SortEpisodes" /> class.
        /// </summary>
        public SortEpisodes()
        {
            InitializeComponent();
            setEpisodeButton.Enabled = false;
            setShowButton.Enabled    = false;

            fileResultManager = CompositionRoot.Get <IFileResultManager>();
        }
Exemple #4
0
 /// <summary>
 ///     Initialises a new instance of the <see cref="FileManager" /> class. Initialises a new instance of the
 ///     <see cref="FileManager" /> class.
 /// </summary>
 /// <param name="storageProvider">
 ///     The storage provider.
 /// </param>
 /// <param name="dataProvider">
 ///     The data provider.
 /// </param>
 /// <param name="scanManager">
 ///     The scan manager.
 /// </param>
 /// <param name="fileResultManager">
 ///     The file result manager.
 /// </param>
 public FileManager(
     IStorageProvider storageProvider,
     IDataProvider dataProvider,
     IScanManager scanManager,
     IFileResultManager fileResultManager)
 {
     this.storageProvider   = storageProvider;
     settings               = storageProvider.Settings;
     this.scanManager       = scanManager;
     this.fileResultManager = fileResultManager;
 }
 /// <summary>
 ///     Get the list view item that represents this file result.
 /// </summary>
 /// <param name="result">
 ///     The file result.
 /// </param>
 /// <param name="fileResultManager">
 ///     The file result manager.
 /// </param>
 /// <returns>
 ///     The ListViewItem.
 /// </returns>
 public static ListViewItem GetListViewItem(this FileResult result, IFileResultManager fileResultManager)
 {
     return(new ListViewItem(
                new[]
     {
         result.InputFile.Name,
         result.Show == null ? result.ShowName : result.Show.Name,
         result.Episode == null
                 ? string.Empty
                 : result.Episode.SeasonNumber.ToString(CultureInfo.InvariantCulture),
         result.Episode == null
                 ? string.Empty
                 : result.Episode.EpisodeNumber.ToString(CultureInfo.InvariantCulture),
         result.Episode == null ? string.Empty : result.Episode.Name,
         fileResultManager.FormatOutputPath(result),
     })
     {
         BackColor = result.Incomplete ? Color.Red : Color.White, Checked = result.Checked
     });
 }
Exemple #6
0
        /// <summary>
        ///     Initialises a new instance of the <see cref="Settings" /> class.
        /// </summary>
        public Settings()
        {
            InitializeComponent();

            fileResultManager = CompositionRoot.Get <FileResultManager>();
        }