Exemplo n.º 1
0
        public void OpenFolder(string comicId)
        {
            var downloadFolder = comicPath.DownloadFolderFor(comicId);

            if (!directory.Exists(downloadFolder))
            {
                return;
            }

            appController.Execute(new StartProcess(downloadFolder));
        }
Exemplo n.º 2
0
        public void Handle(AppLogEntryAdded eventData)
        {
            if (eventData.ComicId == null)
            {
                return;
            }

            lock (fileLock)
            {
                comicPath.EnsureDownloadFolderExistsFor(eventData.ComicId);
                var comicFolder = comicPath.DownloadFolderFor(eventData.ComicId);
                var log         = Path.Combine(comicFolder, eventData.ComicId + ".txt");

                file.AppendAllText(log, "[{0}][{1} {2}] {3}\n".FormatTo(DateTime.Now, eventData.ComicId, eventData.ExpressionName, eventData.Message));
            }
        }