diff --git a/syosetuDownloader.sln b/syosetuDownloader.sln new file mode 100644 index 0000000..0504afb --- /dev/null +++ b/syosetuDownloader.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "syosetuDownloader", "syosetuDownloader\syosetuDownloader.csproj", "{3D9382A0-5AC7-4D1C-B108-E5DF390151DD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3D9382A0-5AC7-4D1C-B108-E5DF390151DD}.Debug|x86.ActiveCfg = Debug|x86 + {3D9382A0-5AC7-4D1C-B108-E5DF390151DD}.Debug|x86.Build.0 = Debug|x86 + {3D9382A0-5AC7-4D1C-B108-E5DF390151DD}.Release|x86.ActiveCfg = Release|x86 + {3D9382A0-5AC7-4D1C-B108-E5DF390151DD}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/syosetuDownloader/App.xaml b/syosetuDownloader/App.xaml new file mode 100644 index 0000000..bd11e9d --- /dev/null +++ b/syosetuDownloader/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/syosetuDownloader/App.xaml.cs b/syosetuDownloader/App.xaml.cs new file mode 100644 index 0000000..96e37f2 --- /dev/null +++ b/syosetuDownloader/App.xaml.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Windows; + +namespace syosetuDownloader +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/syosetuDownloader/Constants.cs b/syosetuDownloader/Constants.cs new file mode 100644 index 0000000..56d9395 --- /dev/null +++ b/syosetuDownloader/Constants.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Controls; +using System.Threading; +using System.Threading.Tasks; +using System.Text.RegularExpressions; +using HtmlAgilityPack; +using System.Net; + +namespace Syousetsu +{ + public class Controls + { + public int ID { get; set; } + public Label Label { get; set; } + public ProgressBar ProgressBar { get; set; } + public Separator Separator { get; set; } + } + + public class Constants + { + public enum FileType { Text, HTML }; + private CookieContainer _cookies = new CookieContainer(); + string _title = String.Empty; + string _start = String.Empty; + string _end = String.Empty; + FileType _fileType; + string _path = String.Empty; + string _link = String.Empty; + string _seriesCode = String.Empty; + + public CookieContainer SyousetsuCookie + { + get + { + Cookie c = new System.Net.Cookie(); + c.Domain = ".syosetu.com"; + c.Value = "yes"; + c.Name = "over18"; + + _cookies.Add(c); + return _cookies; + } + } + + public string Title + { + get { return _title; } + set { _title = value; } + } + + public string Start + { + get { return _start; } + set { _start = value; } + } + + public string End + { + get { return _end; } + set { _end = value; } + } + + + public FileType CurrentFileType + { + get { return _fileType; } + set { _fileType = value; } + } + + public string Path + { + get { return _path; } + set { _path = value; } + } + + public string Link + { + get { return _link; } + set { _link = value; } + } + + public string SeriesCode + { + get { return _seriesCode; } + set { _seriesCode = value; } + } + } +} diff --git a/syosetuDownloader/HtmlAgilityPack.dll b/syosetuDownloader/HtmlAgilityPack.dll new file mode 100644 index 0000000..3d96d71 Binary files /dev/null and b/syosetuDownloader/HtmlAgilityPack.dll differ diff --git a/syosetuDownloader/MainWindow.xaml b/syosetuDownloader/MainWindow.xaml new file mode 100644 index 0000000..344752c --- /dev/null +++ b/syosetuDownloader/MainWindow.xaml @@ -0,0 +1,24 @@ + + +