Exemple #1
0
        private void startPatching(object sender, RoutedEventArgs e)
        {
            string PageSource = string.Empty;

            PageSource = webToPatch.getWebPageSource();
            WebPatching PatchWeb = new WebPatching(patchingType.ReplaceAllMatches, Properties.Resources.PatchDefinitions, outputLogs, "FullLog");

            PageSource = PatchWeb.PatchByReplaceAllMatches(PageSource, outputLogs, "FullLog");
            SaveToFolder.SaveFileToFolder(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), webToPatch.GetName(), PageSource, outputLogs, "FullLog");
            Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\" + webToPatch.GetName());
        }
Exemple #2
0
        public void Add(object item)
        {
            if (Urls == null || SaveToFolder == null)
            {
                return;
            }

            if (SaveToFolder.LastIndexOf(Path.DirectorySeparatorChar) != SaveToFolder.Length - 1)
            {
                SaveToFolder += Path.DirectorySeparatorChar;
            }

            Settings.Default.AddItemsToQueue            = this.AddToQueue;
            Settings.Default.StartDownloadingAddedItems = this.StartDownload;
            Settings.Default.Save();

            Task.Run(async() => await _addItemsAsync.Invoke(SaveToFolder, AddToQueue, StartDownload, ListifyUrls().ToArray()));
        }