Esempio n. 1
0
		public void Initialise (DirectoryManager directoryManager, SourceFile sourceFile)
			{
			this.directoryManager = directoryManager;
			SourceFile = sourceFile;
			string dateTime = Utilities.FilenameFriendlyDateTime (this.timeStarted);
			string filename = Path.GetFileName (SourceFile.FilePath);
			this.workingSourcePath = Path.Combine (this.directoryManager.WorkingDirectory, Path.GetFileNameWithoutExtension (filename) + ".Source." + Environment.MachineName + "." + dateTime + Path.GetExtension (filename));
			}
Esempio n. 2
0
		/// <summary>
		/// Initializes a new instance of the SourceFileManager class
		/// </summary>
		/// <param name="directoryManager">directory manager</param>
		public SourceFileManager (DirectoryManager directoryManager)
			{
			this.directoryManager = directoryManager;
			}
Esempio n. 3
0
		/// <summary>
		/// initialize watcher
		/// </summary>
		/// <returns>true if watcher initialized</returns>
		private bool InitWatcher ()
			{
			// we need the watch folder created before we can proceed...
			if (!this.EnsureWatchFolder ())
				{
				return false;
				}

			this.directoryManager = new DirectoryManager (EncoderFolderWatcherService.WatcherSettings.Default.watcherRootDirectory);
			this.sourceFileManager = new SourceFileManager (this.directoryManager);

			this.sourceFileManager.EncodeStarted += new System.EventHandler<EventArgs> (this.SourceFileManager_EncodeStarted);
			this.sourceFileManager.EncodeEnded += new System.EventHandler<EventArgs> (this.SourceFileManager_EncodeEnded);
			this.sourceFileManager.EncodeError += new System.EventHandler<EventArgs> (this.SourceFileManager_EncodeError);

			return true;
			}