diff --git a/App.config b/App.config index ebd32ee..6afbefe 100644 --- a/App.config +++ b/App.config @@ -46,19 +46,28 @@ + + + + + + + + + False - False + True False @@ -67,6 +76,12 @@ True + False + + + True + + True @@ -89,8 +104,8 @@ 60 - - True + + False diff --git a/Classes/Chans.cs b/Classes/Chans.cs index 2926741..2053c71 100644 --- a/Classes/Chans.cs +++ b/Classes/Chans.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.IO; using System.Net; using System.Runtime.Serialization.Json; @@ -92,32 +93,36 @@ public static bool DownloadFile(string FileURL, string Destination, string FileN Directory.CreateDirectory(Destination); } using (WebClientMethod wc = new WebClientMethod()) { + wc.Method = "GET"; wc.Headers.Add(HttpRequestHeader.UserAgent, YChanEx.Advanced.Default.UserAgent); if (RequireCookie) { wc.Headers.Add(HttpRequestHeader.Cookie, RequiredCookie); } + string FullFileName = Destination + "\\" + FileName; - if (FileName.Length > 100) { + // TODO: Add option for names greater than 255 + if (FullFileName.Length > 255 && !Downloads.Default.AllowFileNamesGreaterThan255) { + string FileExtension = FileName.Split('.')[FileName.Split('.').Length - 1]; string OldFileName = FileName; - FileName = FileName.Substring(0, 100); + FileName = FullFileName.Substring(0, (255 - FileExtension.Length - 1)); File.WriteAllText(Destination + "\\" + FileName + ".txt", OldFileName); + + FullFileName = Destination + "\\" + FileName; } - if (!File.Exists(Destination + "\\" + FileName)) { - wc.DownloadFile(FileURL, Destination + "\\" + FileName); + if (!File.Exists(FullFileName)) { + wc.DownloadFile(FileURL, FullFileName); } } return true; } catch (WebException WebEx) { - //error log - System.Windows.Forms.MessageBox.Show(WebEx.ToString()); + ErrorLog.ReportWebException(WebEx, FileURL); return false; } catch (Exception Ex) { - //error log - System.Windows.Forms.MessageBox.Show(Ex.ToString()); + ErrorLog.ReportException(Ex); return false; } } @@ -182,40 +187,73 @@ public static bool SupportedChan(string URL) { public static int GetChanType(string URL) { Regex Matcher = new Regex(ChanRegex.FourChanURL); if (Matcher.IsMatch(URL)) { - return ChanTypes.FourChan; + return (int)ChanTypes.Types.FourChan; } Matcher = new Regex(ChanRegex.FourTwentyChanURL); if (Matcher.IsMatch(URL)) { - return ChanTypes.FourTwentyChan; + return (int)ChanTypes.Types.FourTwentyChan; } Matcher = new Regex(ChanRegex.SevenChanURL); if (Matcher.IsMatch(URL)) { - return ChanTypes.SevenChan; + return (int)ChanTypes.Types.SevenChan; } Matcher = new Regex(ChanRegex.EightChanURL); if (Matcher.IsMatch(URL)) { - return ChanTypes.EightChan; + return (int)ChanTypes.Types.EightChan; } Matcher = new Regex(ChanRegex.EightKunURL); if (Matcher.IsMatch(URL)) { - return ChanTypes.EightKun; + return (int)ChanTypes.Types.EightKun; } Matcher = new Regex(ChanRegex.fchanURL); if (Matcher.IsMatch(URL)) { - return ChanTypes.fchan; + return (int)ChanTypes.Types.fchan; } Matcher = new Regex(ChanRegex.u18chanURL); if (Matcher.IsMatch(URL)) { - return ChanTypes.u18chan; + return (int)ChanTypes.Types.u18chan; } - return ChanTypes.None; + return (int)ChanTypes.Types.None; + } + + public static bool SaveThreads(List Threads) { + if (General.Default.SaveQueueOnExit) { + try { + string FileContentBuffer = string.Empty; + for (int i = 0; i < Threads.Count; i++) { + FileContentBuffer += Threads[i] + "\n"; + } + File.WriteAllText(Program.ApplicationFilesLocation + "\\threads.dat", FileContentBuffer.Trim('\n')); + return true; + } + catch (Exception ex) { + ErrorLog.ReportException(ex); + return false; + } + } + return false; + } + public static string[] LoadThreads() { + try { + if (System.IO.File.Exists(Program.ApplicationFilesLocation + "\\threads.dat")) { + string ReadThreads = System.IO.File.ReadAllText(Program.ApplicationFilesLocation + "\\threads.dat").Trim('\n'); + if (!string.IsNullOrEmpty(ReadThreads)) { + return ReadThreads.Split('\n'); + } + } + return null; + } + catch (Exception ex) { + ErrorLog.ReportException(ex); + return null; + } } public static string CleanURL(string URL) { @@ -238,7 +276,7 @@ class ChanApiLinks { public static readonly string FourTwentyChan = "https://api.420chan.org/{0}/res/{1}.json"; public static readonly string EightChan = "https://8chan.moe/{0}/res/{1}.json"; public static readonly string EightKun = "https://8kun.top/{0}/res/{1}.json"; - + } /// /// The strings for all board titles in chans. @@ -247,104 +285,177 @@ class BoardTitles { public static string FourChan(string Board) { if (General.Default.UseFullBoardNameForTitle) { switch (Board.ToLower()) { - #region Japanese Culture - case "a": return "Anime & Manga"; - case "c": return "Anime/Cute"; - case "w": return "Anime/Wallpapers"; - case "m": return "Mecha"; - case "cgl": return "Cosplay & EGL"; - case "cm": return "Cute/Male"; - case "f": return "Flash"; - case "n": return "Transportation"; - case "jp": return "Otaku Culture"; - #endregion - - #region Video Games - case "v": return "Video Games"; - case "vg": return "Video Game Generals"; - case "vp": return "Pokémon"; - case "vr": return "Retro Games"; - #endregion - - #region Interests - case "co": return "Comics & Cartoons"; - case "g": return "Technology"; - case "tv": return "Television & Film"; - case "k": return "Weapons"; - case "o": return "Auto"; - case "an": return "Animals & Nature"; - case "tg": return "Traditional Games"; - case "sp": return "Sports"; - case "asp": return "Alternative Sports"; - case "sci": return "Science & Math"; - case "his": return "History & Humanities"; - case "int": return "International"; - case "out": return "Outdoors"; - case "toy": return "Toys"; - - #endregion - - #region Creative - case "i": return "Oekaki"; - case "po": return "Papercraft & Origami"; - case "p": return "Photography"; - case "ck": return "Food & Cooking"; - case "ic": return "Artwork/Critique"; - case "wg": return "Wallpapers/General"; - case "lit": return "Literature"; - case "mu": return "Music"; - case "fa": return "Fashion"; - case "3": return "3DCG"; - case "gd": return "Graphic Design"; - case "diy": return "Do It Yourself"; - case "wsg": return "Worksafe GIF"; - case "qst": return "Quests"; - #endregion - - #region Other - case "biz": return "Business & Finance"; - case "trv": return "Travel"; - case "fit": return "Fitness"; - case "x": return "Paranormal"; - case "adv": return "Advice"; - case "lgbt": return "Lesbian, Gay, Bisexual, & Transgender"; - case "mlp": return "My Little Pony"; // disgusting. - case "news": return "Current News"; - case "wsr": return "Worksafe Requests"; - case "vip": return "Very Important Posts"; - #endregion - - #region Misc - case "b": return "Random"; - case "r9k": return "ROBOT9001"; - case "pol": return "Politically Incorrect"; - case "bant": return "International/Random"; - case "soc": return "Cams & Meetups"; - case "s4s": return "Shit 4chan Says"; - #endregion - - #region Adult - case "s": return "Sexy Beautiful Women"; - case "hc": return "Hardcore"; - case "hm": return "Handsome Men"; - case "h": return "Hentai"; - case "e": return "Ecchi"; - case "u": return "Yuri"; - case "d": return "Hentai/Alternative"; - case "y": return "Yaoi"; - case "t": return "Torrents"; - case "hr": return "High Resolution"; - case "gif": return "Adult GIF"; - case "aco": return "Adult Cartoons"; - case "r": return "Adult Requests"; - #endregion - - #region Unlisted - case "trash": return "Off-Topic"; - case "qa": return "Question & Answer"; - #endregion - - default: return "Unknown board"; + #region Japanese Culture + case "a": + return "Anime & Manga"; + case "c": + return "Anime/Cute"; + case "w": + return "Anime/Wallpapers"; + case "m": + return "Mecha"; + case "cgl": + return "Cosplay & EGL"; + case "cm": + return "Cute/Male"; + case "f": + return "Flash"; + case "n": + return "Transportation"; + case "jp": + return "Otaku Culture"; + #endregion + + #region Video Games + case "v": + return "Video Games"; + case "vg": + return "Video Game Generals"; + case "vp": + return "Pokémon"; + case "vr": + return "Retro Games"; + #endregion + + #region Interests + case "co": + return "Comics & Cartoons"; + case "g": + return "Technology"; + case "tv": + return "Television & Film"; + case "k": + return "Weapons"; + case "o": + return "Auto"; + case "an": + return "Animals & Nature"; + case "tg": + return "Traditional Games"; + case "sp": + return "Sports"; + case "asp": + return "Alternative Sports"; + case "sci": + return "Science & Math"; + case "his": + return "History & Humanities"; + case "int": + return "International"; + case "out": + return "Outdoors"; + case "toy": + return "Toys"; + + #endregion + + #region Creative + case "i": + return "Oekaki"; + case "po": + return "Papercraft & Origami"; + case "p": + return "Photography"; + case "ck": + return "Food & Cooking"; + case "ic": + return "Artwork/Critique"; + case "wg": + return "Wallpapers/General"; + case "lit": + return "Literature"; + case "mu": + return "Music"; + case "fa": + return "Fashion"; + case "3": + return "3DCG"; + case "gd": + return "Graphic Design"; + case "diy": + return "Do It Yourself"; + case "wsg": + return "Worksafe GIF"; + case "qst": + return "Quests"; + #endregion + + #region Other + case "biz": + return "Business & Finance"; + case "trv": + return "Travel"; + case "fit": + return "Fitness"; + case "x": + return "Paranormal"; + case "adv": + return "Advice"; + case "lgbt": + return "Lesbian, Gay, Bisexual, & Transgender"; + case "mlp": + return "My Little Pony"; // disgusting. + case "news": + return "Current News"; + case "wsr": + return "Worksafe Requests"; + case "vip": + return "Very Important Posts"; + #endregion + + #region Misc + case "b": + return "Random"; + case "r9k": + return "ROBOT9001"; + case "pol": + return "Politically Incorrect"; + case "bant": + return "International/Random"; + case "soc": + return "Cams & Meetups"; + case "s4s": + return "Shit 4chan Says"; + #endregion + + #region Adult + case "s": + return "Sexy Beautiful Women"; + case "hc": + return "Hardcore"; + case "hm": + return "Handsome Men"; + case "h": + return "Hentai"; + case "e": + return "Ecchi"; + case "u": + return "Yuri"; + case "d": + return "Hentai/Alternative"; + case "y": + return "Yaoi"; + case "t": + return "Torrents"; + case "hr": + return "High Resolution"; + case "gif": + return "Adult GIF"; + case "aco": + return "Adult Cartoons"; + case "r": + return "Adult Requests"; + #endregion + + #region Unlisted + case "trash": + return "Off-Topic"; + case "qa": + return "Question & Answer"; + #endregion + + default: + return "Unknown board"; } } else { @@ -354,83 +465,143 @@ public static string FourChan(string Board) { public static string FourTwentyChan(string Board) { if (General.Default.UseFullBoardNameForTitle) { switch (Board.ToLower()) { - #region Drugs - case "weed": return "Cannabis Discussion"; - case "hooch": return "Alcohol Discussion"; - case "mdma": return "Ecstasy Discussion"; - case "psy": return "Psychedelic Discussion"; - case "stim": return "Stimulant Discussion"; - case "dis": return "Dissociative Discussion"; - case "opi": return "Opiate Discussion"; - case "vape": return "Vaping Discussion"; - case "tobacco": return "Tobacco Discussion"; - case "benz": return "Benzo Discussion"; - case "deli": return "Deliriant Discussion"; - case "other": return "Other Drugs Discussion"; - case "jenk": return "Jenkem Discussion"; - case "detox": return "Detoxing & Rehabilitation"; - #endregion - - #region Lifestye - case "qq": return "Personal Issues"; - case "dr": return "Dream Discussion"; - case "ana": return "Fitness"; - case "nom": return "Food, Munchies & Cooking"; - case "vroom": return "Travel & Transportation"; - case "st": return "Style & Fashion"; - case "nra": return "Weapons Discussion"; - case "sd": return "Sexuality Discussion"; - case "cd": return "Transgender Discussion"; - #endregion - - #region Academia - case "art": return "Art & Okekai"; - case "sagan": return "Space... the Final Frontier"; - case "lang": return "World Languages"; - case "stem": return "Science, Technology, Engineering & Mathematics"; - case "his": return "History Discussion"; - case "crops": return "Growing & Botany"; - case "howto": return "Guides & Tutorials"; - case "law": return "Law Discussion"; - case "lit": return "Books & Literature"; - case "med": return "Medicine & Health"; - case "pss": return "Philosophy & Social Sciences"; - case "tech": return "Computers & Tech Support"; - case "prog": return "Programming"; - #endregion - - #region Media - case "1701": return "Star Trek Discussion"; - case "sport": return "Sports"; - case "mtv": return "Movies & Television"; - case "f": return "Flash"; - case "m": return "Music & Production"; - case "mma": return "Mixed Martial Arts Discussion"; - case "616": return "Comics & Web Comics Discussion"; - case "a": return "Anime & Manga Discussion"; - case "wooo": return "Professional Wrestling Discussion"; - case "n": return "World News"; - case "vg": return "Video Games Discussion"; - case "po": return "Pokémon Discussion"; - case "tg": return "Traditional Games"; - #endregion - - #region Miscellanea - case "420": return "420chan Discussion & Staff Interaction"; - case "b": return "Random & High Stuff"; - case "spooky": return "Paranormal Discussion"; - case "dino": return "Dinosaur Discussion"; - case "fo": return "Post-apocalyptic"; - case "ani": return "Animal Discussion"; - case "nj": return "Netjester AI Conversation Chamber"; - case "nc": return "Net Characters"; - case "tinfoil": return "Conspiracy Theories"; - case "w": return "Dumb Wallpapers Below"; - #endregion - - #region Adult - case "h": return "Hentai"; - #endregion + #region Drugs + case "weed": + return "Cannabis Discussion"; + case "hooch": + return "Alcohol Discussion"; + case "mdma": + return "Ecstasy Discussion"; + case "psy": + return "Psychedelic Discussion"; + case "stim": + return "Stimulant Discussion"; + case "dis": + return "Dissociative Discussion"; + case "opi": + return "Opiate Discussion"; + case "vape": + return "Vaping Discussion"; + case "tobacco": + return "Tobacco Discussion"; + case "benz": + return "Benzo Discussion"; + case "deli": + return "Deliriant Discussion"; + case "other": + return "Other Drugs Discussion"; + case "jenk": + return "Jenkem Discussion"; + case "detox": + return "Detoxing & Rehabilitation"; + #endregion + + #region Lifestye + case "qq": + return "Personal Issues"; + case "dr": + return "Dream Discussion"; + case "ana": + return "Fitness"; + case "nom": + return "Food, Munchies & Cooking"; + case "vroom": + return "Travel & Transportation"; + case "st": + return "Style & Fashion"; + case "nra": + return "Weapons Discussion"; + case "sd": + return "Sexuality Discussion"; + case "cd": + return "Transgender Discussion"; + #endregion + + #region Academia + case "art": + return "Art & Okekai"; + case "sagan": + return "Space... the Final Frontier"; + case "lang": + return "World Languages"; + case "stem": + return "Science, Technology, Engineering & Mathematics"; + case "his": + return "History Discussion"; + case "crops": + return "Growing & Botany"; + case "howto": + return "Guides & Tutorials"; + case "law": + return "Law Discussion"; + case "lit": + return "Books & Literature"; + case "med": + return "Medicine & Health"; + case "pss": + return "Philosophy & Social Sciences"; + case "tech": + return "Computers & Tech Support"; + case "prog": + return "Programming"; + #endregion + + #region Media + case "1701": + return "Star Trek Discussion"; + case "sport": + return "Sports"; + case "mtv": + return "Movies & Television"; + case "f": + return "Flash"; + case "m": + return "Music & Production"; + case "mma": + return "Mixed Martial Arts Discussion"; + case "616": + return "Comics & Web Comics Discussion"; + case "a": + return "Anime & Manga Discussion"; + case "wooo": + return "Professional Wrestling Discussion"; + case "n": + return "World News"; + case "vg": + return "Video Games Discussion"; + case "po": + return "Pokémon Discussion"; + case "tg": + return "Traditional Games"; + #endregion + + #region Miscellanea + case "420": + return "420chan Discussion & Staff Interaction"; + case "b": + return "Random & High Stuff"; + case "spooky": + return "Paranormal Discussion"; + case "dino": + return "Dinosaur Discussion"; + case "fo": + return "Post-apocalyptic"; + case "ani": + return "Animal Discussion"; + case "nj": + return "Netjester AI Conversation Chamber"; + case "nc": + return "Net Characters"; + case "tinfoil": + return "Conspiracy Theories"; + case "w": + return "Dumb Wallpapers Below"; + #endregion + + #region Adult + case "h": + return "Hentai"; + #endregion default: return "Unknown board"; @@ -442,76 +613,127 @@ public static string FourTwentyChan(string Board) { } public static string SevenChan(string Board) { if (General.Default.UseFullBoardNameForTitle) { - switch(Board.ToLower()){ - #region 7chan & Related services - case "7ch": return "Site Discussion"; - case "ch7": return "Channel7 & Radio 7"; - case "irc": return "Internet Relay Circlejerk"; - #endregion - - #region VIP - case "777": return "gardening"; - case "VIP": return "Very Important Posters"; - case "civ": return "Civics"; - case "vip6": return "IPv6 for VIP"; - #endregion - - #region Premium Content - case "b": return "Random"; - case "banner": return "Banners"; - case "f": return "Flash"; - case "gfc": return "Grahpics Manipulation"; - case "fail": return "Failure"; - #endregion - - #region SFW - case "class": return "The Finer Things"; - case "co": return "Comics and Cartoons"; - case "eh": return "Particularly uninteresting conversation"; - case "fit": return "Fitness & Health"; - case "halp": return "Technical Support"; - case "jew": return "Thrifty Living"; - case "lit": return "Literature"; - case "phi": return "Philosophy"; - case "pr": return "Programming"; - case "rnb": return "Rage and Baww"; - case "sci": return "Science, Technology, Engineering, and Mathematics"; - case "tg": return "Tabletop Games"; - case "w": return "Weapons"; - case "zom": return "Zombies"; - #endregion - - #region General - case "a": return "Anime & Manga"; - case "grim": return "Cold, Grim & Miserable"; - case "hi": return "History and Culture"; - case "me": return "Film, Music & Television"; - case "rx": return "Drugs"; - case "vg": return "Video Games"; - case "wp": return "Wallpapers"; - case "x": return "Paranormal & Conspiracy"; - #endregion - - #region Porn - case "cake": return "Delicious"; - case "cd": return "Crossdressing"; - case "d": return "Alternative Hentai"; - case "di": return "Sexy Beautiful Traps"; - case "elit": return "Erotic Literature"; - case "fag": return "Men Discussion"; - case "fur": return "Furry"; - case "gif": return "Animated GIFs"; - case "h": return "Hentai"; - case "men": return "Sexy Beautiful Men"; - case "pco": return "Porn Comics"; - case "s": return "Sexy Beautiful Women"; - case "sm": return "Shotacon"; // Why shotacon but no lolicon? - case "ss": return "Straight Shotacon"; // again, why shotacon but no lolicon? - case "unf": return "Uniforms"; - case "v": return "The Vineyard"; - #endregion - - default: return "Unknown board"; + switch (Board.ToLower()) { + #region 7chan & Related services + case "7ch": + return "Site Discussion"; + case "ch7": + return "Channel7 & Radio 7"; + case "irc": + return "Internet Relay Circlejerk"; + #endregion + + #region VIP + case "777": + return "gardening"; + case "VIP": + return "Very Important Posters"; + case "civ": + return "Civics"; + case "vip6": + return "IPv6 for VIP"; + #endregion + + #region Premium Content + case "b": + return "Random"; + case "banner": + return "Banners"; + case "f": + return "Flash"; + case "gfc": + return "Grahpics Manipulation"; + case "fail": + return "Failure"; + #endregion + + #region SFW + case "class": + return "The Finer Things"; + case "co": + return "Comics and Cartoons"; + case "eh": + return "Particularly uninteresting conversation"; + case "fit": + return "Fitness & Health"; + case "halp": + return "Technical Support"; + case "jew": + return "Thrifty Living"; + case "lit": + return "Literature"; + case "phi": + return "Philosophy"; + case "pr": + return "Programming"; + case "rnb": + return "Rage and Baww"; + case "sci": + return "Science, Technology, Engineering, and Mathematics"; + case "tg": + return "Tabletop Games"; + case "w": + return "Weapons"; + case "zom": + return "Zombies"; + #endregion + + #region General + case "a": + return "Anime & Manga"; + case "grim": + return "Cold, Grim & Miserable"; + case "hi": + return "History and Culture"; + case "me": + return "Film, Music & Television"; + case "rx": + return "Drugs"; + case "vg": + return "Video Games"; + case "wp": + return "Wallpapers"; + case "x": + return "Paranormal & Conspiracy"; + #endregion + + #region Porn + case "cake": + return "Delicious"; + case "cd": + return "Crossdressing"; + case "d": + return "Alternative Hentai"; + case "di": + return "Sexy Beautiful Traps"; + case "elit": + return "Erotic Literature"; + case "fag": + return "Men Discussion"; + case "fur": + return "Furry"; + case "gif": + return "Animated GIFs"; + case "h": + return "Hentai"; + case "men": + return "Sexy Beautiful Men"; + case "pco": + return "Porn Comics"; + case "s": + return "Sexy Beautiful Women"; + case "sm": + return "Shotacon"; // Why shotacon but no lolicon? + case "ss": + return "Straight Shotacon"; // again, why shotacon but no lolicon? + case "unf": + return "Uniforms"; + case "v": + return "The Vineyard"; + #endregion + + default: + return "Unknown board"; } } else { @@ -524,16 +746,16 @@ public static string EightChan(string BoardOrDescription, bool IsDescription = f } else { //if (General.Default.UseFullBoardNameForTitle) { - //return BoardOrDescription.Replace("

", "").Replace("

", "").Replace("/ - ", "|").Split('|')[1]; + //return BoardOrDescription.Replace("

", "").Replace("

", "").Replace("/ - ", "|").Split('|')[1]; //} //else { - return BoardOrDescription; + return BoardOrDescription; //} } } public static string EightKun(string BoardOrDescription, bool IsDescription = false) { if (IsDescription) { - return BoardOrDescription.Replace("
", "").Replace("

", ""); + return BoardOrDescription.Replace("

", "").Replace("

", ""); } else { if (General.Default.UseFullBoardNameForTitle) { @@ -548,22 +770,33 @@ public static string EightKun(string BoardOrDescription, bool IsDescription = fa public static string fchan(string Board) { if (General.Default.UseFullBoardNameForTitle) { switch (Board.ToLower()) { - #region Normal image boards - case "f": return "female"; - case "m": return "male"; - case "h": return "herm"; - case "s": return "straight"; - case "toon": return "toon"; - case "a": return "alternative"; - case "ah": return "alternative (hard)"; - case "c": return "clean"; - #endregion - - #region Specialized image boards - case "artist": return "artist"; - case "crit": return "critique"; - case "b": return "banners"; - #endregion + #region Normal image boards + case "f": + return "female"; + case "m": + return "male"; + case "h": + return "herm"; + case "s": + return "straight"; + case "toon": + return "toon"; + case "a": + return "alternative"; + case "ah": + return "alternative (hard)"; + case "c": + return "clean"; + #endregion + + #region Specialized image boards + case "artist": + return "artist"; + case "crit": + return "critique"; + case "b": + return "banners"; + #endregion default: return "Unknown board"; @@ -576,36 +809,57 @@ public static string fchan(string Board) { public static string u18chan(string Board) { if (General.Default.UseFullBoardNameForTitle) { switch (Board.ToLower()) { - #region Furry Related - case "fur": return "Furries"; - case "c": return "Furry Comics"; - case "gfur": return "Gay Furries"; - case "gc": return "Gay Furry Comics"; - case "i": return "Intersex"; - case "rs": return "Request & Source"; - case "a": return "Animated"; - case "cute": return "Cute"; - #endregion - - #region The Basement - case "pb": return "Post Your Naked Body"; - case "p": return "Ponies"; // Why, honestly, WHY? - case "f": return "Feral"; - case "cub": return "Cub"; - case "gore": return "Gore"; - #endregion - - #region General - case "d": return "Discussion"; - case "mu": return "Music"; - case "w": return "Wallpapers"; - case "v": return "Video Games"; - case "lo": return "Lounge"; - case "tech": return "Technology"; - case "lit": return "Literature"; - #endregion - - default: return "Unknown board"; + #region Furry Related + case "fur": + return "Furries"; + case "c": + return "Furry Comics"; + case "gfur": + return "Gay Furries"; + case "gc": + return "Gay Furry Comics"; + case "i": + return "Intersex"; + case "rs": + return "Request & Source"; + case "a": + return "Animated"; + case "cute": + return "Cute"; + #endregion + + #region The Basement + case "pb": + return "Post Your Naked Body"; + case "p": + return "Ponies"; // Why, honestly, WHY? + case "f": + return "Feral"; + case "cub": + return "Cub"; + case "gore": + return "Gore"; + #endregion + + #region General + case "d": + return "Discussion"; + case "mu": + return "Music"; + case "w": + return "Wallpapers"; + case "v": + return "Video Games"; + case "lo": + return "Lounge"; + case "tech": + return "Technology"; + case "lit": + return "Literature"; + #endregion + + default: + return "Unknown board"; } } else { @@ -634,10 +888,12 @@ public static class DefaultRegex { "fchan.us/[a-zA-Z0-9]*?/res/[0-9]*.[^0-9]*"; public static readonly string fchanFiles = "(?<=)"; + public static readonly string fchanNames = + "(?<=File: ).*?(?=)"; public static readonly string u18chanURL = "u18chan.com/(.*?)[a-zA-Z0-9]*?/topic/[0-9]*"; - public static readonly string u18chanFiles = - "(?<=File: )"; + public static readonly string u18chanPosts = + "(?<=a href=\").*?(_image\" style=\"width: )"; } public static string FourChanURL { get { @@ -719,6 +975,16 @@ public static string fchanFiles { } } } + public static string fchanNames { + get { + if (!string.IsNullOrEmpty(RegexStrings.Default.fchanNames)) { + return RegexStrings.Default.fchanNames; + } + else { + return DefaultRegex.fchanNames; + } + } + } public static string u18chanURL { get { if (!string.IsNullOrEmpty(RegexStrings.Default.u18chanURL)) { @@ -729,13 +995,13 @@ public static string u18chanURL { } } } - public static string u18chanFiles { + public static string u18chanPosts { get { - if (!string.IsNullOrEmpty(RegexStrings.Default.u18chanFiles)) { - return RegexStrings.Default.u18chanFiles; + if (!string.IsNullOrEmpty(RegexStrings.Default.u18chanPosts)) { + return RegexStrings.Default.u18chanPosts; } else { - return DefaultRegex.u18chanFiles; + return DefaultRegex.u18chanPosts; } } } @@ -752,7 +1018,7 @@ public enum Types : int { EightChan = 3, EightKun = 4, fchan = 5, - u18han = 6 + u18chan = 6 } public static int None { get { return -1; } } public static int FourChan { get { return 0; } } diff --git a/Classes/ErrorLog.cs b/Classes/ErrorLog.cs new file mode 100644 index 0000000..7d85471 --- /dev/null +++ b/Classes/ErrorLog.cs @@ -0,0 +1,459 @@ +// 1.0 +using System; +using System.Net; + +namespace YChanEx { + ///

+ /// This class will control the Errors that get reported in try-catch statements. + /// + class ErrorLog { + /// + /// Reports any web errors that are caught + /// + /// The WebException that was caught + /// The URL that (might-have) caused the problem + public static void ReportWebException(WebException WebException, string WebsiteAddress) { + if (Advanced.Default.SilenceErrors) + return; + + string OutputFile = string.Empty; + string CustomDescriptionBuffer = string.Empty; + bool UseCustomDescription = false; + + using (frmException ExceptionDisplay = new frmException()) { + ExceptionDisplay.ReportedWebException = WebException; + ExceptionDisplay.FromLanguage = false; + + switch (WebException.Status) { + #region NameResolutionFailure + case WebExceptionStatus.NameResolutionFailure: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nName resolution failure" + + "\nThe name resolver service could not resolve the host name."; + break; + #endregion + #region ConnectFailure + case WebExceptionStatus.ConnectFailure: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nConnection failure" + + "\nThe remote service point could not be contacted at the transport level."; + break; + #endregion + #region RecieveFailure + case WebExceptionStatus.ReceiveFailure: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nRecieve failure" + + "\nA complete response was not received from the remote server."; + break; + #endregion + #region SendFailure + case WebExceptionStatus.SendFailure: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nSend failure" + + "\nA complete response could not be sent to the remote server."; + break; + #endregion + #region PipelineFailure + case WebExceptionStatus.PipelineFailure: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nPipeline failure" + + "\nThe request was a piplined request and the connection was closed before the response was received."; + break; + #endregion + #region RequestCanceled + case WebExceptionStatus.RequestCanceled: + return; + #endregion + #region ProtocolError + case WebExceptionStatus.ProtocolError: + var WebResponse = WebException.Response as HttpWebResponse; + + if (WebResponse != null) { + UseCustomDescription = true; + switch ((int)WebResponse.StatusCode) { + #region StatusCodes + #region default / unspecified + default: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned " + WebResponse.StatusCode.ToString() + + "\n" + WebResponse.StatusDescription.ToString(); + break; + #endregion + + #region 301 Moved / Moved permanently + case 301: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 301 - Moved / Moved permanently" + + "\nThe requested information has been moved to the URI specified in the Location header."; + break; + #endregion + + #region 400 Bad request + case 400: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 400 - Bad request" + + "\nThe request could not be understood by the server."; + break; + #endregion + + #region 401 Unauthorized + case 401: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 401 - Unauthorized" + + "\nThe requested resource requires authentication."; + break; + #endregion + + #region 402 Payment required + case 402: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 402 - Payment required" + + "\nPayment is required to view this content.\nThis status code isn't natively used."; + break; + #endregion + + #region 403 Forbidden + case 403: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 403 - Forbidden" + + "\nYou do not have permission to view this file."; + break; + #endregion + + #region 404 Not found + case 404: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 404 - Not found" + + "\nThe file does not exist on the server."; + break; + #endregion + + #region 405 Method not allowed + case 405: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 405 - Method not allowed" + + "\nThe request method (GET) is not allowed on the requested resource."; + break; + #endregion + + #region 406 Not acceptable + case 406: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 406 - Not acceptable" + + "\nThe client has indicated with Accept headers that it will not accept any of the available representations from the resource."; + break; + #endregion + + #region 407 Proxy authentication required + case 407: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 407 - Proxy authentication required" + + "\nThe requested proxy requires authentication."; + break; + #endregion + + #region 408 Request timeout + case 408: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 408 - Request timeout" + + "\nThe client did not send a request within the time the server was expection the request."; + break; + #endregion + + #region 409 Conflict + case 409: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 409 - Conflict" + + "\nThe request could not be carried out because of a conflict on the server."; + break; + #endregion + + #region 410 Gone + case 410: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 410 - Gone" + + "\nThe requested resource is no longer available."; + break; + #endregion + + #region 411 Length required + case 411: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 410 - Length required" + + "\nThe required Content-length header is missing."; + break; + #endregion + + #region 412 Precondition failed + case 412: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 412 - Precondition failed" + + "\nA condition set for this request failed, and the request cannot be carried out."; + break; + #endregion + + #region 413 Request entity too large + case 413: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 413 - Request entity too large" + + "\nThe request is too large for the server to process."; + break; + #endregion + + #region 414 Request uri too long + case 414: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 414 - Request uri too long" + + "\nThe uri is too long."; + break; + #endregion + + #region 415 Unsupported media type + case 415: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 415 - Unsupported media type" + + "\nThe request is an unsupported type."; + break; + #endregion + + #region 416 Requested range not satisfiable + case 416: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 416 - Requested range not satisfiable" + + "\nThe range of data requested from the resource cannot be returned."; + break; + #endregion + + #region 417 Expectation failed + case 417: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 417 - Expectation failed" + + "\nAn expectation given in an Expect header could not be met by the server."; + break; + #endregion + + #region 426 Upgrade required + case 426: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 426 - Upgrade required" + + "\nNo information is available about this error code."; + break; + #endregion + + #region 500 Internal server error + case 500: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 500 - Internal server error" + + "\nAn error occured on the server."; + break; + #endregion + + #region 501 Not implemented + case 501: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 501 - Not implemented" + + "\nThe server does not support the requested function."; + break; + #endregion + + #region 502 Bad gateway + case 502: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 502 - Bad gateway" + + "\nThe proxy server recieved a bad response from another proxy or the origin server."; + break; + #endregion + + #region 503 Service unavailable + case 503: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 503 - Service unavailable" + + "\nThe server is temporarily unavailable, likely due to high load or maintenance."; + break; + #endregion + + #region 504 Gateway timeout + case 504: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 504 - Gateway timeout" + + "\nAn intermediate proxy server timed out while waiting for a response from another proxy or the origin server."; + break; + #endregion + + #region 505 Http version not supported + case 505: + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nThe address returned 505 - Http version not supported" + + "\nThe requested HTTP version is not supported by the server."; + break; + #endregion + #endregion + } + } + break; + #endregion + #region ConnectionClosed + case WebExceptionStatus.ConnectionClosed: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nConnection closed" + + "\nThe connection was prematurely closed."; + break; + #endregion + #region TrustFailure + case WebExceptionStatus.TrustFailure: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nTrust failure" + + "\nA server certificate could not be validated."; + break; + #endregion + #region SecureChannelFailure + case WebExceptionStatus.SecureChannelFailure: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nSecure channel failure" + + "\nAn error occurred while establishing a connection using SSL."; + break; + #endregion + #region ServerProtocolViolation + case WebExceptionStatus.ServerProtocolViolation: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nServer protocol violation" + + "\nThe server response was not a valid HTTP response."; + break; + #endregion + #region KeepAliveFailure + case WebExceptionStatus.KeepAliveFailure: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nKeep alive failure" + + "\nThe connection for a request that specifies the Keep-alive header was closed unexpectedly."; + break; + #endregion + #region Pending + case WebExceptionStatus.Pending: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nPending" + + "\nAn internal asynchronous request is pending."; + break; + #endregion + #region Timeout + case WebExceptionStatus.Timeout: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nTimeout" + + "\nNo response was received during the time-out period for a request."; + break; + #endregion + #region ProxyNameResolutionFailure + case WebExceptionStatus.ProxyNameResolutionFailure: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nProxy name resolution failure" + + "\nThe name resolver service could not resolve the proxy host name."; + break; + #endregion + #region UnknownError + case WebExceptionStatus.UnknownError: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nUnknown error" + + "\nAn exception of unknown type has occurred."; + break; + #endregion + #region MessageLengthLimitExceeded + case WebExceptionStatus.MessageLengthLimitExceeded: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nMessage length limit exceeded" + + "\nA message was received that exceeded the specified limit when sending a request or receiving a response from the server."; + break; + #endregion + #region CacheEntryNotFound + case WebExceptionStatus.CacheEntryNotFound: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nCache entry not found" + + "\nThe specified cache entry was not found."; + break; + #endregion + #region RequestProhibitedByCachePolicy + case WebExceptionStatus.RequestProhibitedByCachePolicy: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nRequest prohibited by cache policy" + + "\nThe request was not permitted by the cache policy."; + break; + #endregion + #region RequestProhibitedByProxy + case WebExceptionStatus.RequestProhibitedByProxy: + UseCustomDescription = true; + CustomDescriptionBuffer += "A WebException occured at " + WebsiteAddress + + "\n\nRequest prohibited by proxy" + + "\nThis request was not permitted by the proxy."; + break; + #endregion + + } + + if (UseCustomDescription) { + CustomDescriptionBuffer += WebException.InnerException + "\n\nStackTrace:\n" + + WebException.StackTrace; + } + + ExceptionDisplay.SetCustomDescription = UseCustomDescription; + ExceptionDisplay.CustomDescription = CustomDescriptionBuffer; + ExceptionDisplay.ShowDialog(); + } + + // build log file + + + //if (Errors.Default.logErrors) { + // if (UseCustomDescription) { WriteToFile(CustomDescriptionBuffer); } + // else { WriteToFile(WebException.ToString()); } + //} + } + + /// + /// Reports any general exceptions that are caught + /// + /// The Exception that was caught + public static void ReportException(Exception Exception, bool IsWriteToFile = true) { + if (Advanced.Default.SilenceErrors) + return; + + string OutputFile = string.Empty; + + using (frmException ExceptionDisplay = new frmException()) { + ExceptionDisplay.ReportedException = Exception; + ExceptionDisplay.FromLanguage = false; + ExceptionDisplay.ShowDialog(); + } + + //if (Errors.Default.logErrors && !IsWriteToFile) { + // WriteToFile(Exception.ToString()); + //} + } + + /// + /// Writes the error to a .log file in the working directory. + /// + /// The data that will be written to the log file + public static void WriteToFile(string Buffer) { + try { + string FileName = string.Format("\\error_{0}.log", DateTime.Now); + System.IO.File.WriteAllText(FileName, Buffer); + } + catch (Exception ex) { ReportException(ex, true); } + } + } +} diff --git a/Downloads.Designer.cs b/Downloads.Designer.cs index c3d987b..b195940 100644 --- a/Downloads.Designer.cs +++ b/Downloads.Designer.cs @@ -97,13 +97,13 @@ public int ScannerDelay { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool SaveQueueOnExit { + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool AllowFileNamesGreaterThan255 { get { - return ((bool)(this["SaveQueueOnExit"])); + return ((bool)(this["AllowFileNamesGreaterThan255"])); } set { - this["SaveQueueOnExit"] = value; + this["AllowFileNamesGreaterThan255"] = value; } } } diff --git a/Downloads.settings b/Downloads.settings index 0165256..4117a5e 100644 --- a/Downloads.settings +++ b/Downloads.settings @@ -20,8 +20,8 @@ 60 - - True + + False \ No newline at end of file diff --git a/General.Designer.cs b/General.Designer.cs index d8db51f..cb74899 100644 --- a/General.Designer.cs +++ b/General.Designer.cs @@ -37,7 +37,7 @@ public bool ShowTrayIcon { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] + [global::System.Configuration.DefaultSettingValueAttribute("True")] public bool MinimizeToTray { get { return ((bool)(this["MinimizeToTray"])); @@ -73,7 +73,7 @@ public bool EnableUpdates { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] + [global::System.Configuration.DefaultSettingValueAttribute("False")] public bool UseFullBoardNameForTitle { get { return ((bool)(this["UseFullBoardNameForTitle"])); @@ -82,5 +82,29 @@ public bool UseFullBoardNameForTitle { this["UseFullBoardNameForTitle"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool SaveQueueOnExit { + get { + return ((bool)(this["SaveQueueOnExit"])); + } + set { + this["SaveQueueOnExit"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool MinimizeInsteadOfExiting { + get { + return ((bool)(this["MinimizeInsteadOfExiting"])); + } + set { + this["MinimizeInsteadOfExiting"] = value; + } + } } } diff --git a/General.settings b/General.settings index fdb0596..c2f655e 100644 --- a/General.settings +++ b/General.settings @@ -6,7 +6,7 @@ False - False + True False @@ -15,6 +15,12 @@ True + False + + + True + + True diff --git a/Program.cs b/Program.cs index 9373018..f3de19f 100644 --- a/Program.cs +++ b/Program.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; +using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Forms; diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 387ff49..ded2871 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -60,6 +60,46 @@ internal Resources() { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap downloading { + get { + object obj = ResourceManager.GetObject("downloading", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap errored { + get { + object obj = ResourceManager.GetObject("errored", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap finished { + get { + object obj = ResourceManager.GetObject("finished", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap waiting { + get { + object obj = ResourceManager.GetObject("waiting", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 0cd380b..420cb4b 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -127,4 +127,16 @@ ..\Resources\YChanEx404.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\downloading.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\errored.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\finished.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\waiting.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/RegexStrings.Designer.cs b/RegexStrings.Designer.cs index 0be38e3..3bd6948 100644 --- a/RegexStrings.Designer.cs +++ b/RegexStrings.Designer.cs @@ -119,6 +119,18 @@ public string fchanFiles { } } + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string fchanNames { + get { + return ((string)(this["fchanNames"])); + } + set { + this["fchanNames"] = value; + } + } + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] @@ -142,5 +154,29 @@ public string u18chanFiles { this["u18chanFiles"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string u18chanID { + get { + return ((string)(this["u18chanID"])); + } + set { + this["u18chanID"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string u18chanPosts { + get { + return ((string)(this["u18chanPosts"])); + } + set { + this["u18chanPosts"] = value; + } + } } } diff --git a/RegexStrings.settings b/RegexStrings.settings index c32b848..0bc6e2d 100644 --- a/RegexStrings.settings +++ b/RegexStrings.settings @@ -26,11 +26,20 @@ + + + + + + + + + \ No newline at end of file diff --git a/YChanEx.csproj b/YChanEx.csproj index b1b64dd..d863c64 100644 --- a/YChanEx.csproj +++ b/YChanEx.csproj @@ -57,6 +57,7 @@ Component + True @@ -177,6 +178,18 @@ + + + + + + + + + + + +