diff --git a/FileLiberator/UNTESTED/DecryptBook.cs b/FileLiberator/UNTESTED/DecryptBook.cs index 91d92931..3a306b80 100644 --- a/FileLiberator/UNTESTED/DecryptBook.cs +++ b/FileLiberator/UNTESTED/DecryptBook.cs @@ -50,7 +50,7 @@ namespace FileLiberator if (aaxFilename == null) return new StatusHandler { "aaxFilename parameter is null" }; - if (!FileUtility.FileExists(aaxFilename)) + if (!File.Exists(aaxFilename)) return new StatusHandler { $"Cannot find AAX file: {aaxFilename}" }; if (AudibleFileStorage.Audio.Exists(libraryBook.Book.AudibleProductId)) return new StatusHandler { "Cannot find decrypt. Final audio file already exists" }; diff --git a/FileManager/UNTESTED/AudibleFileStorage.cs b/FileManager/UNTESTED/AudibleFileStorage.cs index 39cc4c0f..84d16ed7 100644 --- a/FileManager/UNTESTED/AudibleFileStorage.cs +++ b/FileManager/UNTESTED/AudibleFileStorage.cs @@ -39,7 +39,7 @@ namespace FileManager Configuration.Instance.DecryptInProgressEnum = "WinTemp"; var M4bRootDir = Configuration.Instance.DecryptInProgressEnum == "WinTemp" // else "LibationFiles" - ? Configuration.Instance.WinTemp + ? Configuration.WinTemp : Configuration.Instance.LibationFiles; DecryptInProgress = Path.Combine(M4bRootDir, "DecryptInProgress"); Directory.CreateDirectory(DecryptInProgress); @@ -50,7 +50,7 @@ namespace FileManager Configuration.Instance.DownloadsInProgressEnum = "WinTemp"; var AaxRootDir = Configuration.Instance.DownloadsInProgressEnum == "WinTemp" // else "LibationFiles" - ? Configuration.Instance.WinTemp + ? Configuration.WinTemp : Configuration.Instance.LibationFiles; DownloadsInProgress = Path.Combine(AaxRootDir, "DownloadsInProgress"); Directory.CreateDirectory(DownloadsInProgress); diff --git a/FileManager/UNTESTED/Configuration.cs b/FileManager/UNTESTED/Configuration.cs index 3f291695..f38b4430 100644 --- a/FileManager/UNTESTED/Configuration.cs +++ b/FileManager/UNTESTED/Configuration.cs @@ -4,6 +4,8 @@ using System.ComponentModel; using System.IO; using System.Linq; using Dinah.Core; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; namespace FileManager { @@ -31,12 +33,18 @@ namespace FileManager */ #endregion - private PersistentDictionary persistentDictionary { get; } + private PersistentDictionary persistentDictionary; - [Description("Location of the configuration file where these settings are saved. Please do not edit this file directly while Libation is running.")] - public string Filepath => Path.Combine(Path.GetDirectoryName(Exe.FileLocationOnDisk), "Settings.json"); + public bool IsComplete + => File.Exists(APPSETTINGS_JSON) + && Directory.Exists(LibationFiles) + && Directory.Exists(Books) + && File.Exists(SettingsJsonPath) + && !string.IsNullOrWhiteSpace(LocaleCountryCode) + && !string.IsNullOrWhiteSpace(DownloadsInProgressEnum) + && !string.IsNullOrWhiteSpace(DecryptInProgressEnum); - [Description("[Advanced. Leave alone in most cases.] Your user-specific key used to decrypt your audible files (*.aax) into audio files you can use anywhere (*.m4b)")] + [Description("Your user-specific key used to decrypt your audible files (*.aax) into audio files you can use anywhere (*.m4b). Leave alone in most cases")] public string DecryptKey { get => persistentDictionary[nameof(DecryptKey)]; @@ -50,17 +58,21 @@ namespace FileManager set => persistentDictionary[nameof(Books)] = value; } - public string WinTemp { get; } = Path.Combine(Path.GetTempPath(), "Libation"); + public static string AppDir { get; } = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Exe.FileLocationOnDisk), LIBATION_FILES)); + public static string MyDocs { get; } = Path.GetFullPath(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), LIBATION_FILES)); + public static string WinTemp { get; } = Path.GetFullPath(Path.Combine(Path.GetTempPath(), "Libation")); - [Description("Location for storage of program-created files")] - public string LibationFiles + private Dictionary wellKnownPaths { get; } = new Dictionary { - get => persistentDictionary[nameof(LibationFiles)]; - set => persistentDictionary[nameof(LibationFiles)] = value; - } + ["AppDir"] = AppDir, + ["MyDocs"] = MyDocs, + ["WinTemp"] = WinTemp + }; + private Dictionary cache { get; } = new Dictionary(); // default setting and directory creation occur in class responsible for files. // config class is only responsible for path. not responsible for setting defaults, dir validation, or dir creation + // exceptions: appsettings.json, LibationFiles dir, Settings.json // temp/working dir(s) should be outside of dropbox [Description("Temporary location of files while they're in process of being downloaded.\r\nWhen download is complete, the final file will be in [LibationFiles]\\DownloadsFinal")] @@ -78,49 +90,114 @@ namespace FileManager set => persistentDictionary[nameof(DecryptInProgressEnum)] = value; } - public string LocaleCountryCode - { - get => persistentDictionary[nameof(LocaleCountryCode)]; - set => persistentDictionary[nameof(LocaleCountryCode)] = value; - } + public string LocaleCountryCode + { + get => persistentDictionary[nameof(LocaleCountryCode)]; + set => persistentDictionary[nameof(LocaleCountryCode)] = value; + } + + // note: any potential file manager static ctors can't compensate if storage dir is changed at run time via settings. this is partly bad architecture. but the side effect is desirable. if changing LibationFiles location: restart app // singleton stuff public static Configuration Instance { get; } = new Configuration(); - private Configuration() - { - // load json values into memory - persistentDictionary = new PersistentDictionary(Filepath); - ensureDictionaryEntries(); + private Configuration() { } - // don't create dir. dir creation is the responsibility of places that use the dir - if (string.IsNullOrWhiteSpace(LibationFiles)) - LibationFiles = Path.Combine(Path.GetDirectoryName(Exe.FileLocationOnDisk), "Libation"); + private const string APPSETTINGS_JSON = "appsettings.json"; + private const string LIBATION_FILES = "LibationFiles"; + + [Description("Location for storage of program-created files")] + public string LibationFiles + => cache.ContainsKey(LIBATION_FILES) + ? cache[LIBATION_FILES] + : getLibationFiles(); + private string getLibationFiles() + { + var value = getLiberationFilesSettingFromJson(); + + if (wellKnownPaths.ContainsKey(value)) + value = wellKnownPaths[value]; + + // must write here before SettingsJsonPath in next step tries to read from dictionary + cache[LIBATION_FILES] = value; + + // load json values into memory. create if not exists + persistentDictionary = new PersistentDictionary(SettingsJsonPath); + persistentDictionary.EnsureEntries(); + + return value; } + private string getLiberationFilesSettingFromJson() + { + static string createSettingsJson() + { + var dir = "AppDir"; + File.WriteAllText(APPSETTINGS_JSON, new JObject { { LIBATION_FILES, dir } }.ToString(Formatting.Indented)); + return dir; + } + + if (!File.Exists(APPSETTINGS_JSON)) + return createSettingsJson(); + + var appSettingsContents = File.ReadAllText(APPSETTINGS_JSON); + + JObject jObj; + try + { + jObj = JObject.Parse(appSettingsContents); + } + catch + { + return createSettingsJson(); + } + + if (!jObj.ContainsKey(LIBATION_FILES)) + return createSettingsJson(); + + var value = jObj[LIBATION_FILES].Value(); + return value; + } + + private string SettingsJsonPath => Path.Combine(LibationFiles, "Settings.json"); public static string GetDescription(string propertyName) { - var attribute = typeof(Configuration) - .GetProperty(propertyName) - ?.GetCustomAttributes(typeof(DescriptionAttribute), true) - .SingleOrDefault() - as DescriptionAttribute; + var attribute = typeof(Configuration) + .GetProperty(propertyName) + ?.GetCustomAttributes(typeof(DescriptionAttribute), true) + .SingleOrDefault() + as DescriptionAttribute; - return attribute?.Description; - } - - private void ensureDictionaryEntries() - { - var stringProperties = getDictionaryProperties().Select(p => p.Name).ToList(); - var missingKeys = stringProperties.Except(persistentDictionary.Keys).ToArray(); - persistentDictionary.AddKeys(missingKeys); + return attribute?.Description; } - private IEnumerable dicPropertiesCache; - private IEnumerable getDictionaryProperties() + public bool TrySetLibationFiles(string directory) { - if (dicPropertiesCache == null) - dicPropertiesCache = PersistentDictionary.GetPropertiesToPersist(this.GetType()); - return dicPropertiesCache; + if (!Directory.Exists(directory) && !wellKnownPaths.ContainsKey(directory)) + return false; + + // if moving from default, delete old settings file and dir (if empty) + if (LibationFiles.EqualsInsensitive(AppDir)) + { + File.Delete(SettingsJsonPath); + System.Threading.Thread.Sleep(100); + if (!Directory.EnumerateDirectories(AppDir).Any() && !Directory.EnumerateFiles(AppDir).Any()) + Directory.Delete(AppDir); + } + + + cache.Remove(LIBATION_FILES); + + + var contents = File.ReadAllText(APPSETTINGS_JSON); + var jObj = JObject.Parse(contents); + + jObj[LIBATION_FILES] = directory; + + var output = JsonConvert.SerializeObject(jObj, Formatting.Indented); + File.WriteAllText(APPSETTINGS_JSON, output); + + + return true; } } } diff --git a/FileManager/UNTESTED/FilePathCache.cs b/FileManager/UNTESTED/FilePathCache.cs index efc208ea..6af720a9 100644 --- a/FileManager/UNTESTED/FilePathCache.cs +++ b/FileManager/UNTESTED/FilePathCache.cs @@ -23,7 +23,7 @@ namespace FileManager static FilePathCache() { // load json into memory. if file doesn't exist, nothing to do. save() will create if needed - if (FileUtility.FileExists(JsonFile)) + if (File.Exists(JsonFile)) { var list = JsonConvert.DeserializeObject>(File.ReadAllText(JsonFile)); cache = new Cache(list); @@ -39,7 +39,7 @@ namespace FileManager if (entry == null) return null; - if (!FileUtility.FileExists(entry.Path)) + if (!File.Exists(entry.Path)) { remove(entry); return null; @@ -56,7 +56,7 @@ namespace FileManager public static void Upsert(string id, FileType type, string path) { - if (!FileUtility.FileExists(path)) + if (!File.Exists(path)) throw new FileNotFoundException("Cannot add path to cache. File not found"); var entry = cache.SingleOrDefault(i => i.Id == id && i.FileType == type); diff --git a/FileManager/UNTESTED/FileUtility.cs b/FileManager/UNTESTED/FileUtility.cs index 4f391bde..53bd9e7b 100644 --- a/FileManager/UNTESTED/FileUtility.cs +++ b/FileManager/UNTESTED/FileUtility.cs @@ -1,32 +1,10 @@ using System; -using System.Collections.Generic; using System.IO; -using System.Linq; namespace FileManager { public static class FileUtility { - // a replacement for File.Exists() which allows long paths - // not needed in .net-core - public static bool FileExists(string path) - { - var basic = File.Exists(path); - if (basic) - return true; - - // character cutoff is usually 269 but this isn't a hard number. there are edgecases which shorted the threshold - if (path.Length < 260) - return false; - - // try long name prefix: - // \\?\ - // https://blogs.msdn.microsoft.com/jeremykuhne/2016/06/21/more-on-new-net-path-handling/ - path = @"\\?\" + path; - - return File.Exists(path); - } - public static string GetValidFilename(string dirFullPath, string filename, string extension, params string[] metadataSuffixes) { if (string.IsNullOrWhiteSpace(dirFullPath)) @@ -51,7 +29,7 @@ namespace FileManager // ensure uniqueness var fullfilename = Path.Combine(dirFullPath, filename + extension); var i = 0; - while (FileExists(fullfilename)) + while (File.Exists(fullfilename)) fullfilename = Path.Combine(dirFullPath, filename + $" ({++i})" + extension); return fullfilename; diff --git a/FileManager/UNTESTED/PersistentDictionary.cs b/FileManager/UNTESTED/PersistentDictionary.cs index 27ebfdcd..46356e94 100644 --- a/FileManager/UNTESTED/PersistentDictionary.cs +++ b/FileManager/UNTESTED/PersistentDictionary.cs @@ -35,6 +35,9 @@ namespace FileManager // not found. create blank file if (!File.Exists(Filepath)) { + // will create any missing directories, incl subdirectories. if all already exist: no action + Directory.CreateDirectory(Path.GetDirectoryName(filepath)); + File.WriteAllText(Filepath, "{}"); // give system time to create file before first use @@ -44,14 +47,19 @@ namespace FileManager settingsDic = JsonConvert.DeserializeObject>(File.ReadAllText(Filepath)); } - public IEnumerable Keys => settingsDic.Keys.Cast(); - - public void AddKeys(params string[] keys) + public void EnsureEntries() { - if (keys == null || keys.Length == 0) + var stringProperties = + GetPropertiesToPersist(typeof(T)) + .Select(p => p.Name) + .ToList(); + var keys = settingsDic.Keys.Cast().ToList(); + var missingKeys = stringProperties.Except(keys).ToList(); + + if (!missingKeys.Any()) return; - foreach (var key in keys) + foreach (var key in missingKeys) settingsDic.Add(key, null); save(); } diff --git a/FileManager/UNTESTED/PictureStorage.cs b/FileManager/UNTESTED/PictureStorage.cs index 2f6d9b2d..ef0ecdf2 100644 --- a/FileManager/UNTESTED/PictureStorage.cs +++ b/FileManager/UNTESTED/PictureStorage.cs @@ -47,7 +47,7 @@ namespace FileManager { var path = getPath(def); cache[def] - = FileUtility.FileExists(path) + = File.Exists(path) ? File.ReadAllBytes(path) : null; } diff --git a/FileManager/UNTESTED/QuickFilters.cs b/FileManager/UNTESTED/QuickFilters.cs index 32c0b41c..d422fc28 100644 --- a/FileManager/UNTESTED/QuickFilters.cs +++ b/FileManager/UNTESTED/QuickFilters.cs @@ -22,7 +22,7 @@ namespace FileManager static QuickFilters() { // load json into memory. if file doesn't exist, nothing to do. save() will create if needed - if (FileUtility.FileExists(JsonFile)) + if (File.Exists(JsonFile)) inMemoryState = JsonConvert.DeserializeObject(File.ReadAllText(JsonFile)); } diff --git a/FileManager/UNTESTED/TagsPersistence.cs b/FileManager/UNTESTED/TagsPersistence.cs index fa22ca58..57d6f9fc 100644 --- a/FileManager/UNTESTED/TagsPersistence.cs +++ b/FileManager/UNTESTED/TagsPersistence.cs @@ -53,7 +53,7 @@ namespace FileManager { if (cache is null) lock (locker) - cache = !FileUtility.FileExists(TagsFile) + cache = !File.Exists(TagsFile) ? new Dictionary() : JsonConvert.DeserializeObject>(File.ReadAllText(TagsFile)); } diff --git a/LibationLauncher/LibationLauncher.csproj b/LibationLauncher/LibationLauncher.csproj index 5a44816b..49ee3432 100644 --- a/LibationLauncher/LibationLauncher.csproj +++ b/LibationLauncher/LibationLauncher.csproj @@ -17,10 +17,4 @@ - - - PreserveNewest - - - \ No newline at end of file diff --git a/LibationLauncher/Program.cs b/LibationLauncher/Program.cs index d1af91fd..e613751b 100644 --- a/LibationLauncher/Program.cs +++ b/LibationLauncher/Program.cs @@ -1,10 +1,13 @@ using System; +using System.IO; using System.Windows.Forms; using Dinah.Core.Logging; using FileManager; using LibationWinForms; +using LibationWinForms.Dialogs; using Microsoft.Extensions.Configuration; using Serilog; +using WinFormsDesigner.Dialogs; namespace LibationLauncher { @@ -17,35 +20,49 @@ namespace LibationLauncher Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - if (!createSettings()) - return; - + createSettings(); initLogging(); Application.Run(new Form1()); } - private static bool createSettings() + private static void createSettings() { - if (!string.IsNullOrWhiteSpace(Configuration.Instance.Books)) - return true; + var config = Configuration.Instance; + if (config.IsComplete) + return; - var welcomeText = @" -This appears to be your first time using Libation. Welcome. -Please fill in a few settings on the following page. You can also change these settings later. + var isAdvanced = false; -After you make your selections, get started by importing your library. -Go to Import > Scan Library -".Trim(); - MessageBox.Show(welcomeText, "Welcome to Libation", MessageBoxButtons.OK); - var dialogResult = new SettingsDialog().ShowDialog(); - if (dialogResult != DialogResult.OK) + var setupDialog = new SetupDialog(); + setupDialog.NoQuestionsBtn_Click += (_, __) => { - MessageBox.Show("Initial set up cancelled.", "Cancelled", MessageBoxButtons.OK, MessageBoxIcon.Warning); - return false; + config.DecryptKey ??= ""; + config.LocaleCountryCode ??= "us"; + config.DownloadsInProgressEnum ??= "WinTemp"; + config.DecryptInProgressEnum ??= "WinTemp"; + config.Books ??= Configuration.AppDir; + }; + // setupDialog.BasicBtn_Click += (_, __) => // no action needed + setupDialog.AdvancedBtn_Click += (_, __) => isAdvanced = true; + setupDialog.ShowDialog(); + + if (isAdvanced) + { + var dialog = new LibationFilesDialog(); + if (dialog.ShowDialog() != DialogResult.OK) + MessageBox.Show("Libation Files location not changed"); } - return true; + if (config.IsComplete) + return; + + if (new SettingsDialog().ShowDialog() == DialogResult.OK) + return; + + MessageBox.Show("Initial set up cancelled.", "Cancelled", MessageBoxButtons.OK, MessageBoxIcon.Warning); + Application.Exit(); + Environment.Exit(0); } private static void initLogging() @@ -58,7 +75,7 @@ Go to Import > Scan Library var code_outputTemplate = "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] (at {Caller}) {Message:lj}{NewLine}{Exception}"; - var logPath = System.IO.Path.Combine(Configuration.Instance.LibationFiles, "Log.log"); + var logPath = Path.Combine(Configuration.Instance.LibationFiles, "Log.log"); //var configuration = new ConfigurationBuilder() // .AddJsonFile("appsettings.json") diff --git a/LibationLauncher/appsettings.json b/LibationLauncher/appsettings.json deleted file mode 100644 index 7da4be1a..00000000 --- a/LibationLauncher/appsettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Debug" - } - }, - "Serilog": { - "MinimumLevel": "Debug", - "Enrich": "WithCaller" - } -} diff --git a/LibationWinForms/LibationWinForms.csproj b/LibationWinForms/LibationWinForms.csproj index 91ec9cc8..f2d0af3e 100644 --- a/LibationWinForms/LibationWinForms.csproj +++ b/LibationWinForms/LibationWinForms.csproj @@ -23,12 +23,30 @@ True Resources.resx + + Form + + + LibationFilesDialog.cs + + + Form + + + SettingsDialog.cs + Form IndexLibraryDialog.cs + + Form + + + SetupDialog.cs + @@ -36,6 +54,15 @@ ResXFileCodeGenerator Resources.Designer.cs + + LibationFilesDialog.cs + + + SettingsDialog.cs + + + SetupDialog.cs + \ No newline at end of file diff --git a/LibationWinForms/UNTESTED/Dialogs/EditTagsDialog.Designer.cs b/LibationWinForms/UNTESTED/Dialogs/EditTagsDialog.Designer.cs index c30a8ea8..37060f22 100644 --- a/LibationWinForms/UNTESTED/Dialogs/EditTagsDialog.Designer.cs +++ b/LibationWinForms/UNTESTED/Dialogs/EditTagsDialog.Designer.cs @@ -1,4 +1,4 @@ -namespace LibationWinForms +namespace LibationWinForms.Dialogs { partial class EditTagsDialog { diff --git a/LibationWinForms/UNTESTED/Dialogs/EditTagsDialog.cs b/LibationWinForms/UNTESTED/Dialogs/EditTagsDialog.cs index 55e33a26..dc454d42 100644 --- a/LibationWinForms/UNTESTED/Dialogs/EditTagsDialog.cs +++ b/LibationWinForms/UNTESTED/Dialogs/EditTagsDialog.cs @@ -1,7 +1,7 @@ using System; using System.Windows.Forms; -namespace LibationWinForms +namespace LibationWinForms.Dialogs { public partial class EditTagsDialog : Form { diff --git a/LibationWinForms/UNTESTED/Dialogs/IndexLibraryDialog.Designer.cs b/LibationWinForms/UNTESTED/Dialogs/IndexLibraryDialog.Designer.cs index c41e454c..0fa198db 100644 --- a/LibationWinForms/UNTESTED/Dialogs/IndexLibraryDialog.Designer.cs +++ b/LibationWinForms/UNTESTED/Dialogs/IndexLibraryDialog.Designer.cs @@ -1,4 +1,4 @@ -namespace LibationWinForms +namespace LibationWinForms.Dialogs { partial class IndexLibraryDialog { diff --git a/LibationWinForms/UNTESTED/Dialogs/IndexLibraryDialog.cs b/LibationWinForms/UNTESTED/Dialogs/IndexLibraryDialog.cs index d027a9fa..860a2a38 100644 --- a/LibationWinForms/UNTESTED/Dialogs/IndexLibraryDialog.cs +++ b/LibationWinForms/UNTESTED/Dialogs/IndexLibraryDialog.cs @@ -1,8 +1,9 @@ using System; using System.Windows.Forms; using ApplicationServices; +using LibationWinForms.Login; -namespace LibationWinForms +namespace LibationWinForms.Dialogs { public partial class IndexLibraryDialog : Form { @@ -19,7 +20,7 @@ namespace LibationWinForms { try { - (TotalBooksProcessed, NewBooksAdded) = await LibraryCommands.ImportLibraryAsync(new Login.WinformResponder()); + (TotalBooksProcessed, NewBooksAdded) = await LibraryCommands.ImportLibraryAsync(new WinformResponder()); } catch (Exception ex) { diff --git a/LibationWinForms/UNTESTED/Dialogs/LibationFilesDialog.Designer.cs b/LibationWinForms/UNTESTED/Dialogs/LibationFilesDialog.Designer.cs new file mode 100644 index 00000000..0e7faabc --- /dev/null +++ b/LibationWinForms/UNTESTED/Dialogs/LibationFilesDialog.Designer.cs @@ -0,0 +1,161 @@ +namespace WinFormsDesigner.Dialogs +{ + partial class LibationFilesDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.libationFilesDescLbl = new System.Windows.Forms.Label(); + this.libationFilesCustomBtn = new System.Windows.Forms.Button(); + this.libationFilesCustomTb = new System.Windows.Forms.TextBox(); + this.libationFilesCustomRb = new System.Windows.Forms.RadioButton(); + this.libationFilesMyDocsRb = new System.Windows.Forms.RadioButton(); + this.libationFilesRootRb = new System.Windows.Forms.RadioButton(); + this.cancelBtn = new System.Windows.Forms.Button(); + this.saveBtn = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // libationFilesDescLbl + // + this.libationFilesDescLbl.AutoSize = true; + this.libationFilesDescLbl.Location = new System.Drawing.Point(12, 9); + this.libationFilesDescLbl.Name = "libationFilesDescLbl"; + this.libationFilesDescLbl.Size = new System.Drawing.Size(36, 13); + this.libationFilesDescLbl.TabIndex = 0; + this.libationFilesDescLbl.Text = "[desc]"; + // + // libationFilesCustomBtn + // + this.libationFilesCustomBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.libationFilesCustomBtn.Location = new System.Drawing.Point(753, 95); + this.libationFilesCustomBtn.Name = "libationFilesCustomBtn"; + this.libationFilesCustomBtn.Size = new System.Drawing.Size(35, 23); + this.libationFilesCustomBtn.TabIndex = 5; + this.libationFilesCustomBtn.Text = "..."; + this.libationFilesCustomBtn.UseVisualStyleBackColor = true; + this.libationFilesCustomBtn.Click += new System.EventHandler(this.libationFilesCustomBtn_Click); + // + // libationFilesCustomTb + // + this.libationFilesCustomTb.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.libationFilesCustomTb.Location = new System.Drawing.Point(35, 97); + this.libationFilesCustomTb.Name = "libationFilesCustomTb"; + this.libationFilesCustomTb.Size = new System.Drawing.Size(712, 20); + this.libationFilesCustomTb.TabIndex = 4; + // + // libationFilesCustomRb + // + this.libationFilesCustomRb.AutoSize = true; + this.libationFilesCustomRb.Location = new System.Drawing.Point(15, 100); + this.libationFilesCustomRb.Name = "libationFilesCustomRb"; + this.libationFilesCustomRb.Size = new System.Drawing.Size(14, 13); + this.libationFilesCustomRb.TabIndex = 3; + this.libationFilesCustomRb.TabStop = true; + this.libationFilesCustomRb.UseVisualStyleBackColor = true; + // + // libationFilesMyDocsRb + // + this.libationFilesMyDocsRb.AutoSize = true; + this.libationFilesMyDocsRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.libationFilesMyDocsRb.Location = new System.Drawing.Point(15, 61); + this.libationFilesMyDocsRb.Name = "libationFilesMyDocsRb"; + this.libationFilesMyDocsRb.Size = new System.Drawing.Size(111, 30); + this.libationFilesMyDocsRb.TabIndex = 2; + this.libationFilesMyDocsRb.TabStop = true; + this.libationFilesMyDocsRb.Text = "[desc]\r\n[myDocs\\Libation]"; + this.libationFilesMyDocsRb.UseVisualStyleBackColor = true; + // + // libationFilesRootRb + // + this.libationFilesRootRb.AutoSize = true; + this.libationFilesRootRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.libationFilesRootRb.Location = new System.Drawing.Point(15, 25); + this.libationFilesRootRb.Name = "libationFilesRootRb"; + this.libationFilesRootRb.Size = new System.Drawing.Size(113, 30); + this.libationFilesRootRb.TabIndex = 1; + this.libationFilesRootRb.TabStop = true; + this.libationFilesRootRb.Text = "[desc]\r\n[exeRoot\\Libation]"; + this.libationFilesRootRb.UseVisualStyleBackColor = true; + // + // cancelBtn + // + this.cancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelBtn.Location = new System.Drawing.Point(713, 124); + this.cancelBtn.Name = "cancelBtn"; + this.cancelBtn.Size = new System.Drawing.Size(75, 23); + this.cancelBtn.TabIndex = 10; + this.cancelBtn.Text = "Cancel"; + this.cancelBtn.UseVisualStyleBackColor = true; + this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click); + // + // saveBtn + // + this.saveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.saveBtn.Location = new System.Drawing.Point(612, 124); + this.saveBtn.Name = "saveBtn"; + this.saveBtn.Size = new System.Drawing.Size(75, 23); + this.saveBtn.TabIndex = 9; + this.saveBtn.Text = "Save"; + this.saveBtn.UseVisualStyleBackColor = true; + this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click); + // + // LibationFilesDialog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 159); + this.Controls.Add(this.cancelBtn); + this.Controls.Add(this.saveBtn); + this.Controls.Add(this.libationFilesDescLbl); + this.Controls.Add(this.libationFilesCustomBtn); + this.Controls.Add(this.libationFilesCustomTb); + this.Controls.Add(this.libationFilesRootRb); + this.Controls.Add(this.libationFilesCustomRb); + this.Controls.Add(this.libationFilesMyDocsRb); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Name = "LibationFilesDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Libation Files location"; + this.Load += new System.EventHandler(this.LibationFilesDialog_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label libationFilesDescLbl; + private System.Windows.Forms.Button libationFilesCustomBtn; + private System.Windows.Forms.TextBox libationFilesCustomTb; + private System.Windows.Forms.RadioButton libationFilesCustomRb; + private System.Windows.Forms.RadioButton libationFilesMyDocsRb; + private System.Windows.Forms.RadioButton libationFilesRootRb; + private System.Windows.Forms.Button cancelBtn; + private System.Windows.Forms.Button saveBtn; + } +} \ No newline at end of file diff --git a/LibationWinForms/UNTESTED/Dialogs/LibationFilesDialog.cs b/LibationWinForms/UNTESTED/Dialogs/LibationFilesDialog.cs new file mode 100644 index 00000000..85f582f9 --- /dev/null +++ b/LibationWinForms/UNTESTED/Dialogs/LibationFilesDialog.cs @@ -0,0 +1,67 @@ +using System; +using System.Windows.Forms; +using FileManager; + +namespace WinFormsDesigner.Dialogs +{ + public partial class LibationFilesDialog : Form + { + Configuration config { get; } = Configuration.Instance; + Func desc { get; } = Configuration.GetDescription; + + public LibationFilesDialog() + { + InitializeComponent(); + + this.libationFilesCustomTb.TextChanged += (_, __) => + { + if (!string.IsNullOrWhiteSpace(libationFilesCustomTb.Text)) + this.libationFilesCustomRb.Checked = true; + }; + } + + private void LibationFilesDialog_Load(object sender, EventArgs e) + { + libationFilesDescLbl.Text = desc(nameof(config.LibationFiles)); + this.libationFilesRootRb.Text = "In the same folder that Libation is running from\r\n" + Configuration.AppDir; + this.libationFilesMyDocsRb.Text = "In My Documents\r\n" + Configuration.MyDocs; + if (config.LibationFiles == Configuration.AppDir) + libationFilesRootRb.Checked = true; + else if (config.LibationFiles == Configuration.MyDocs) + libationFilesMyDocsRb.Checked = true; + else + { + libationFilesCustomRb.Checked = true; + libationFilesCustomTb.Text = config.LibationFiles; + } + } + + private void libationFilesCustomBtn_Click(object sender, EventArgs e) => selectFolder("Search for Libation Files location", this.libationFilesCustomTb); + + private static void selectFolder(string desc, TextBox textbox) + { + using var dialog = new FolderBrowserDialog { Description = desc, SelectedPath = "" }; + dialog.ShowDialog(); + if (!string.IsNullOrWhiteSpace(dialog.SelectedPath)) + textbox.Text = dialog.SelectedPath; + } + + private void saveBtn_Click(object sender, EventArgs e) + { + var libationDir + = libationFilesRootRb.Checked ? Configuration.AppDir + : libationFilesMyDocsRb.Checked ? Configuration.MyDocs + : libationFilesCustomTb.Text; + if (!config.TrySetLibationFiles(libationDir)) + { + MessageBox.Show("Not saving change to Libation Files location. This folder does not exist:\r\n" + libationDir); + return; + } + + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void cancelBtn_Click(object sender, EventArgs e) => this.Close(); + } +} diff --git a/LibationWinForms/UNTESTED/Dialogs/LibationFilesDialog.resx b/LibationWinForms/UNTESTED/Dialogs/LibationFilesDialog.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/LibationWinForms/UNTESTED/Dialogs/LibationFilesDialog.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.Designer.cs b/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.Designer.cs index 9f6f4bf0..1bf09658 100644 --- a/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.Designer.cs +++ b/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.Designer.cs @@ -1,354 +1,238 @@ -namespace LibationWinForms +namespace LibationWinForms.Dialogs { - partial class SettingsDialog - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; + partial class SettingsDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } - #region Windows Form Designer generated code + #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.settingsFileLbl = new System.Windows.Forms.Label(); - this.settingsFileTb = new System.Windows.Forms.TextBox(); - this.decryptKeyLbl = new System.Windows.Forms.Label(); - this.decryptKeyTb = new System.Windows.Forms.TextBox(); - this.booksLocationLbl = new System.Windows.Forms.Label(); - this.booksLocationTb = new System.Windows.Forms.TextBox(); - this.booksLocationSearchBtn = new System.Windows.Forms.Button(); - this.settingsFileDescLbl = new System.Windows.Forms.Label(); - this.decryptKeyDescLbl = new System.Windows.Forms.Label(); - this.booksLocationDescLbl = new System.Windows.Forms.Label(); - this.libationFilesGb = new System.Windows.Forms.GroupBox(); - this.libationFilesDescLbl = new System.Windows.Forms.Label(); - this.libationFilesCustomBtn = new System.Windows.Forms.Button(); - this.libationFilesCustomTb = new System.Windows.Forms.TextBox(); - this.libationFilesCustomRb = new System.Windows.Forms.RadioButton(); - this.libationFilesMyDocsRb = new System.Windows.Forms.RadioButton(); - this.libationFilesRootRb = new System.Windows.Forms.RadioButton(); - this.downloadsInProgressGb = new System.Windows.Forms.GroupBox(); - this.downloadsInProgressLibationFilesRb = new System.Windows.Forms.RadioButton(); - this.downloadsInProgressWinTempRb = new System.Windows.Forms.RadioButton(); - this.downloadsInProgressDescLbl = new System.Windows.Forms.Label(); - this.decryptInProgressGb = new System.Windows.Forms.GroupBox(); - this.decryptInProgressLibationFilesRb = new System.Windows.Forms.RadioButton(); - this.decryptInProgressWinTempRb = new System.Windows.Forms.RadioButton(); - this.decryptInProgressDescLbl = new System.Windows.Forms.Label(); - this.saveBtn = new System.Windows.Forms.Button(); - this.cancelBtn = new System.Windows.Forms.Button(); + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.decryptKeyLbl = new System.Windows.Forms.Label(); + this.decryptKeyTb = new System.Windows.Forms.TextBox(); + this.booksLocationLbl = new System.Windows.Forms.Label(); + this.booksLocationTb = new System.Windows.Forms.TextBox(); + this.booksLocationSearchBtn = new System.Windows.Forms.Button(); + this.decryptKeyDescLbl = new System.Windows.Forms.Label(); + this.booksLocationDescLbl = new System.Windows.Forms.Label(); + this.downloadsInProgressGb = new System.Windows.Forms.GroupBox(); + this.downloadsInProgressLibationFilesRb = new System.Windows.Forms.RadioButton(); + this.downloadsInProgressWinTempRb = new System.Windows.Forms.RadioButton(); + this.downloadsInProgressDescLbl = new System.Windows.Forms.Label(); + this.decryptInProgressGb = new System.Windows.Forms.GroupBox(); + this.decryptInProgressLibationFilesRb = new System.Windows.Forms.RadioButton(); + this.decryptInProgressWinTempRb = new System.Windows.Forms.RadioButton(); + this.decryptInProgressDescLbl = new System.Windows.Forms.Label(); + this.saveBtn = new System.Windows.Forms.Button(); + this.cancelBtn = new System.Windows.Forms.Button(); this.audibleLocaleLbl = new System.Windows.Forms.Label(); this.audibleLocaleCb = new System.Windows.Forms.ComboBox(); - this.libationFilesGb.SuspendLayout(); - this.downloadsInProgressGb.SuspendLayout(); - this.decryptInProgressGb.SuspendLayout(); - this.SuspendLayout(); - // - // settingsFileLbl - // - this.settingsFileLbl.AutoSize = true; - this.settingsFileLbl.Location = new System.Drawing.Point(7, 15); - this.settingsFileLbl.Name = "settingsFileLbl"; - this.settingsFileLbl.Size = new System.Drawing.Size(61, 13); - this.settingsFileLbl.TabIndex = 0; - this.settingsFileLbl.Text = "Settings file"; - // - // settingsFileTb - // - this.settingsFileTb.Location = new System.Drawing.Point(90, 12); - this.settingsFileTb.Name = "settingsFileTb"; - this.settingsFileTb.ReadOnly = true; - this.settingsFileTb.Size = new System.Drawing.Size(698, 20); - this.settingsFileTb.TabIndex = 1; - // - // decryptKeyLbl - // - this.decryptKeyLbl.AutoSize = true; - this.decryptKeyLbl.Location = new System.Drawing.Point(7, 59); - this.decryptKeyLbl.Name = "decryptKeyLbl"; - this.decryptKeyLbl.Size = new System.Drawing.Size(64, 13); - this.decryptKeyLbl.TabIndex = 3; - this.decryptKeyLbl.Text = "Decrypt key"; - // - // decryptKeyTb - // - this.decryptKeyTb.Location = new System.Drawing.Point(90, 56); - this.decryptKeyTb.Name = "decryptKeyTb"; - this.decryptKeyTb.Size = new System.Drawing.Size(100, 20); - this.decryptKeyTb.TabIndex = 4; - // - // booksLocationLbl - // - this.booksLocationLbl.AutoSize = true; - this.booksLocationLbl.Location = new System.Drawing.Point(7, 125); - this.booksLocationLbl.Name = "booksLocationLbl"; - this.booksLocationLbl.Size = new System.Drawing.Size(77, 13); - this.booksLocationLbl.TabIndex = 8; - this.booksLocationLbl.Text = "Books location"; - // - // booksLocationTb - // - this.booksLocationTb.Location = new System.Drawing.Point(90, 122); - this.booksLocationTb.Name = "booksLocationTb"; - this.booksLocationTb.Size = new System.Drawing.Size(657, 20); - this.booksLocationTb.TabIndex = 9; - // - // booksLocationSearchBtn - // - this.booksLocationSearchBtn.Location = new System.Drawing.Point(753, 120); - this.booksLocationSearchBtn.Name = "booksLocationSearchBtn"; - this.booksLocationSearchBtn.Size = new System.Drawing.Size(35, 23); - this.booksLocationSearchBtn.TabIndex = 10; - this.booksLocationSearchBtn.Text = "..."; - this.booksLocationSearchBtn.UseVisualStyleBackColor = true; - this.booksLocationSearchBtn.Click += new System.EventHandler(this.booksLocationSearchBtn_Click); - // - // settingsFileDescLbl - // - this.settingsFileDescLbl.AutoSize = true; - this.settingsFileDescLbl.Location = new System.Drawing.Point(87, 35); - this.settingsFileDescLbl.Name = "settingsFileDescLbl"; - this.settingsFileDescLbl.Size = new System.Drawing.Size(36, 13); - this.settingsFileDescLbl.TabIndex = 2; - this.settingsFileDescLbl.Text = "[desc]"; - // - // decryptKeyDescLbl - // - this.decryptKeyDescLbl.AutoSize = true; - this.decryptKeyDescLbl.Location = new System.Drawing.Point(87, 79); - this.decryptKeyDescLbl.Name = "decryptKeyDescLbl"; - this.decryptKeyDescLbl.Size = new System.Drawing.Size(36, 13); - this.decryptKeyDescLbl.TabIndex = 5; - this.decryptKeyDescLbl.Text = "[desc]"; - // - // booksLocationDescLbl - // - this.booksLocationDescLbl.AutoSize = true; - this.booksLocationDescLbl.Location = new System.Drawing.Point(87, 145); - this.booksLocationDescLbl.Name = "booksLocationDescLbl"; - this.booksLocationDescLbl.Size = new System.Drawing.Size(36, 13); - this.booksLocationDescLbl.TabIndex = 11; - this.booksLocationDescLbl.Text = "[desc]"; - // - // libationFilesGb - // - this.libationFilesGb.Controls.Add(this.libationFilesDescLbl); - this.libationFilesGb.Controls.Add(this.libationFilesCustomBtn); - this.libationFilesGb.Controls.Add(this.libationFilesCustomTb); - this.libationFilesGb.Controls.Add(this.libationFilesCustomRb); - this.libationFilesGb.Controls.Add(this.libationFilesMyDocsRb); - this.libationFilesGb.Controls.Add(this.libationFilesRootRb); - this.libationFilesGb.Location = new System.Drawing.Point(12, 161); - this.libationFilesGb.Name = "libationFilesGb"; - this.libationFilesGb.Size = new System.Drawing.Size(776, 131); - this.libationFilesGb.TabIndex = 12; - this.libationFilesGb.TabStop = false; - this.libationFilesGb.Text = "Libation files"; - // - // libationFilesDescLbl - // - this.libationFilesDescLbl.AutoSize = true; - this.libationFilesDescLbl.Location = new System.Drawing.Point(6, 16); - this.libationFilesDescLbl.Name = "libationFilesDescLbl"; - this.libationFilesDescLbl.Size = new System.Drawing.Size(36, 13); - this.libationFilesDescLbl.TabIndex = 0; - this.libationFilesDescLbl.Text = "[desc]"; - // - // libationFilesCustomBtn - // - this.libationFilesCustomBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.libationFilesCustomBtn.Location = new System.Drawing.Point(741, 102); - this.libationFilesCustomBtn.Name = "libationFilesCustomBtn"; - this.libationFilesCustomBtn.Size = new System.Drawing.Size(35, 23); - this.libationFilesCustomBtn.TabIndex = 5; - this.libationFilesCustomBtn.Text = "..."; - this.libationFilesCustomBtn.UseVisualStyleBackColor = true; - this.libationFilesCustomBtn.Click += new System.EventHandler(this.libationFilesCustomBtn_Click); - // - // libationFilesCustomTb - // - this.libationFilesCustomTb.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.libationFilesCustomTb.Location = new System.Drawing.Point(29, 104); - this.libationFilesCustomTb.Name = "libationFilesCustomTb"; - this.libationFilesCustomTb.Size = new System.Drawing.Size(706, 20); - this.libationFilesCustomTb.TabIndex = 4; - this.libationFilesCustomTb.TextChanged += new System.EventHandler(this.libationFiles_Changed); - // - // libationFilesCustomRb - // - this.libationFilesCustomRb.AutoSize = true; - this.libationFilesCustomRb.Location = new System.Drawing.Point(9, 107); - this.libationFilesCustomRb.Name = "libationFilesCustomRb"; - this.libationFilesCustomRb.Size = new System.Drawing.Size(14, 13); - this.libationFilesCustomRb.TabIndex = 3; - this.libationFilesCustomRb.TabStop = true; - this.libationFilesCustomRb.UseVisualStyleBackColor = true; - // - // libationFilesMyDocsRb - // - this.libationFilesMyDocsRb.AutoSize = true; - this.libationFilesMyDocsRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.libationFilesMyDocsRb.Location = new System.Drawing.Point(9, 68); - this.libationFilesMyDocsRb.Name = "libationFilesMyDocsRb"; - this.libationFilesMyDocsRb.Size = new System.Drawing.Size(111, 30); - this.libationFilesMyDocsRb.TabIndex = 2; - this.libationFilesMyDocsRb.TabStop = true; - this.libationFilesMyDocsRb.Text = "[desc]\r\n[myDocs\\Libation]"; - this.libationFilesMyDocsRb.UseVisualStyleBackColor = true; - this.libationFilesMyDocsRb.CheckedChanged += new System.EventHandler(this.libationFiles_Changed); - // - // libationFilesRootRb - // - this.libationFilesRootRb.AutoSize = true; - this.libationFilesRootRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.libationFilesRootRb.Location = new System.Drawing.Point(9, 32); - this.libationFilesRootRb.Name = "libationFilesRootRb"; - this.libationFilesRootRb.Size = new System.Drawing.Size(113, 30); - this.libationFilesRootRb.TabIndex = 1; - this.libationFilesRootRb.TabStop = true; - this.libationFilesRootRb.Text = "[desc]\r\n[exeRoot\\Libation]"; - this.libationFilesRootRb.UseVisualStyleBackColor = true; - this.libationFilesRootRb.CheckedChanged += new System.EventHandler(this.libationFiles_Changed); - // - // downloadsInProgressGb - // - this.downloadsInProgressGb.Controls.Add(this.downloadsInProgressLibationFilesRb); - this.downloadsInProgressGb.Controls.Add(this.downloadsInProgressWinTempRb); - this.downloadsInProgressGb.Controls.Add(this.downloadsInProgressDescLbl); - this.downloadsInProgressGb.Location = new System.Drawing.Point(12, 298); - this.downloadsInProgressGb.Name = "downloadsInProgressGb"; - this.downloadsInProgressGb.Size = new System.Drawing.Size(776, 117); - this.downloadsInProgressGb.TabIndex = 13; - this.downloadsInProgressGb.TabStop = false; - this.downloadsInProgressGb.Text = "Downloads in progress"; - // - // downloadsInProgressLibationFilesRb - // - this.downloadsInProgressLibationFilesRb.AutoSize = true; - this.downloadsInProgressLibationFilesRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.downloadsInProgressLibationFilesRb.Location = new System.Drawing.Point(9, 81); - this.downloadsInProgressLibationFilesRb.Name = "downloadsInProgressLibationFilesRb"; - this.downloadsInProgressLibationFilesRb.Size = new System.Drawing.Size(193, 30); - this.downloadsInProgressLibationFilesRb.TabIndex = 2; - this.downloadsInProgressLibationFilesRb.TabStop = true; - this.downloadsInProgressLibationFilesRb.Text = "[desc]\r\n[libationFiles\\DownloadsInProgress]"; - this.downloadsInProgressLibationFilesRb.UseVisualStyleBackColor = true; - // - // downloadsInProgressWinTempRb - // - this.downloadsInProgressWinTempRb.AutoSize = true; - this.downloadsInProgressWinTempRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.downloadsInProgressWinTempRb.Location = new System.Drawing.Point(9, 45); - this.downloadsInProgressWinTempRb.Name = "downloadsInProgressWinTempRb"; - this.downloadsInProgressWinTempRb.Size = new System.Drawing.Size(182, 30); - this.downloadsInProgressWinTempRb.TabIndex = 1; - this.downloadsInProgressWinTempRb.TabStop = true; - this.downloadsInProgressWinTempRb.Text = "[desc]\r\n[winTemp\\DownloadsInProgress]"; - this.downloadsInProgressWinTempRb.UseVisualStyleBackColor = true; - // - // downloadsInProgressDescLbl - // - this.downloadsInProgressDescLbl.AutoSize = true; - this.downloadsInProgressDescLbl.Location = new System.Drawing.Point(6, 16); - this.downloadsInProgressDescLbl.Name = "downloadsInProgressDescLbl"; - this.downloadsInProgressDescLbl.Size = new System.Drawing.Size(38, 26); - this.downloadsInProgressDescLbl.TabIndex = 0; - this.downloadsInProgressDescLbl.Text = "[desc]\r\n[line 2]"; - // - // decryptInProgressGb - // - this.decryptInProgressGb.Controls.Add(this.decryptInProgressLibationFilesRb); - this.decryptInProgressGb.Controls.Add(this.decryptInProgressWinTempRb); - this.decryptInProgressGb.Controls.Add(this.decryptInProgressDescLbl); - this.decryptInProgressGb.Location = new System.Drawing.Point(12, 421); - this.decryptInProgressGb.Name = "decryptInProgressGb"; - this.decryptInProgressGb.Size = new System.Drawing.Size(776, 117); - this.decryptInProgressGb.TabIndex = 14; - this.decryptInProgressGb.TabStop = false; - this.decryptInProgressGb.Text = "Decrypt in progress"; - // - // decryptInProgressLibationFilesRb - // - this.decryptInProgressLibationFilesRb.AutoSize = true; - this.decryptInProgressLibationFilesRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.decryptInProgressLibationFilesRb.Location = new System.Drawing.Point(6, 81); - this.decryptInProgressLibationFilesRb.Name = "decryptInProgressLibationFilesRb"; - this.decryptInProgressLibationFilesRb.Size = new System.Drawing.Size(177, 30); - this.decryptInProgressLibationFilesRb.TabIndex = 2; - this.decryptInProgressLibationFilesRb.TabStop = true; - this.decryptInProgressLibationFilesRb.Text = "[desc]\r\n[libationFiles\\DecryptInProgress]"; - this.decryptInProgressLibationFilesRb.UseVisualStyleBackColor = true; - // - // decryptInProgressWinTempRb - // - this.decryptInProgressWinTempRb.AutoSize = true; - this.decryptInProgressWinTempRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.decryptInProgressWinTempRb.Location = new System.Drawing.Point(6, 45); - this.decryptInProgressWinTempRb.Name = "decryptInProgressWinTempRb"; - this.decryptInProgressWinTempRb.Size = new System.Drawing.Size(166, 30); - this.decryptInProgressWinTempRb.TabIndex = 1; - this.decryptInProgressWinTempRb.TabStop = true; - this.decryptInProgressWinTempRb.Text = "[desc]\r\n[winTemp\\DecryptInProgress]"; - this.decryptInProgressWinTempRb.UseVisualStyleBackColor = true; - // - // decryptInProgressDescLbl - // - this.decryptInProgressDescLbl.AutoSize = true; - this.decryptInProgressDescLbl.Location = new System.Drawing.Point(6, 16); - this.decryptInProgressDescLbl.Name = "decryptInProgressDescLbl"; - this.decryptInProgressDescLbl.Size = new System.Drawing.Size(38, 26); - this.decryptInProgressDescLbl.TabIndex = 0; - this.decryptInProgressDescLbl.Text = "[desc]\r\n[line 2]"; - // - // saveBtn - // - this.saveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.saveBtn.Location = new System.Drawing.Point(612, 544); - this.saveBtn.Name = "saveBtn"; - this.saveBtn.Size = new System.Drawing.Size(75, 23); - this.saveBtn.TabIndex = 15; - this.saveBtn.Text = "Save"; - this.saveBtn.UseVisualStyleBackColor = true; - this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click); - // - // cancelBtn - // - this.cancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelBtn.Location = new System.Drawing.Point(713, 544); - this.cancelBtn.Name = "cancelBtn"; - this.cancelBtn.Size = new System.Drawing.Size(75, 23); - this.cancelBtn.TabIndex = 16; - this.cancelBtn.Text = "Cancel"; - this.cancelBtn.UseVisualStyleBackColor = true; - this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.downloadsInProgressGb.SuspendLayout(); + this.decryptInProgressGb.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // decryptKeyLbl + // + this.decryptKeyLbl.AutoSize = true; + this.decryptKeyLbl.Location = new System.Drawing.Point(6, 22); + this.decryptKeyLbl.Name = "decryptKeyLbl"; + this.decryptKeyLbl.Size = new System.Drawing.Size(64, 13); + this.decryptKeyLbl.TabIndex = 0; + this.decryptKeyLbl.Text = "Decrypt key"; + // + // decryptKeyTb + // + this.decryptKeyTb.Location = new System.Drawing.Point(76, 19); + this.decryptKeyTb.Name = "decryptKeyTb"; + this.decryptKeyTb.Size = new System.Drawing.Size(100, 20); + this.decryptKeyTb.TabIndex = 1; + // + // booksLocationLbl + // + this.booksLocationLbl.AutoSize = true; + this.booksLocationLbl.Location = new System.Drawing.Point(12, 17); + this.booksLocationLbl.Name = "booksLocationLbl"; + this.booksLocationLbl.Size = new System.Drawing.Size(77, 13); + this.booksLocationLbl.TabIndex = 0; + this.booksLocationLbl.Text = "Books location"; + // + // booksLocationTb + // + this.booksLocationTb.Location = new System.Drawing.Point(95, 14); + this.booksLocationTb.Name = "booksLocationTb"; + this.booksLocationTb.Size = new System.Drawing.Size(652, 20); + this.booksLocationTb.TabIndex = 1; + // + // booksLocationSearchBtn + // + this.booksLocationSearchBtn.Location = new System.Drawing.Point(753, 12); + this.booksLocationSearchBtn.Name = "booksLocationSearchBtn"; + this.booksLocationSearchBtn.Size = new System.Drawing.Size(35, 23); + this.booksLocationSearchBtn.TabIndex = 2; + this.booksLocationSearchBtn.Text = "..."; + this.booksLocationSearchBtn.UseVisualStyleBackColor = true; + this.booksLocationSearchBtn.Click += new System.EventHandler(this.booksLocationSearchBtn_Click); + // + // decryptKeyDescLbl + // + this.decryptKeyDescLbl.AutoSize = true; + this.decryptKeyDescLbl.Location = new System.Drawing.Point(73, 42); + this.decryptKeyDescLbl.Name = "decryptKeyDescLbl"; + this.decryptKeyDescLbl.Size = new System.Drawing.Size(36, 13); + this.decryptKeyDescLbl.TabIndex = 2; + this.decryptKeyDescLbl.Text = "[desc]"; + // + // booksLocationDescLbl + // + this.booksLocationDescLbl.AutoSize = true; + this.booksLocationDescLbl.Location = new System.Drawing.Point(92, 37); + this.booksLocationDescLbl.Name = "booksLocationDescLbl"; + this.booksLocationDescLbl.Size = new System.Drawing.Size(36, 13); + this.booksLocationDescLbl.TabIndex = 3; + this.booksLocationDescLbl.Text = "[desc]"; + // + // downloadsInProgressGb + // + this.downloadsInProgressGb.Controls.Add(this.downloadsInProgressLibationFilesRb); + this.downloadsInProgressGb.Controls.Add(this.downloadsInProgressWinTempRb); + this.downloadsInProgressGb.Controls.Add(this.downloadsInProgressDescLbl); + this.downloadsInProgressGb.Location = new System.Drawing.Point(15, 58); + this.downloadsInProgressGb.Name = "downloadsInProgressGb"; + this.downloadsInProgressGb.Size = new System.Drawing.Size(758, 117); + this.downloadsInProgressGb.TabIndex = 4; + this.downloadsInProgressGb.TabStop = false; + this.downloadsInProgressGb.Text = "Downloads in progress"; + // + // downloadsInProgressLibationFilesRb + // + this.downloadsInProgressLibationFilesRb.AutoSize = true; + this.downloadsInProgressLibationFilesRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.downloadsInProgressLibationFilesRb.Location = new System.Drawing.Point(9, 81); + this.downloadsInProgressLibationFilesRb.Name = "downloadsInProgressLibationFilesRb"; + this.downloadsInProgressLibationFilesRb.Size = new System.Drawing.Size(193, 30); + this.downloadsInProgressLibationFilesRb.TabIndex = 2; + this.downloadsInProgressLibationFilesRb.TabStop = true; + this.downloadsInProgressLibationFilesRb.Text = "[desc]\r\n[libationFiles\\DownloadsInProgress]"; + this.downloadsInProgressLibationFilesRb.UseVisualStyleBackColor = true; + // + // downloadsInProgressWinTempRb + // + this.downloadsInProgressWinTempRb.AutoSize = true; + this.downloadsInProgressWinTempRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.downloadsInProgressWinTempRb.Location = new System.Drawing.Point(9, 45); + this.downloadsInProgressWinTempRb.Name = "downloadsInProgressWinTempRb"; + this.downloadsInProgressWinTempRb.Size = new System.Drawing.Size(182, 30); + this.downloadsInProgressWinTempRb.TabIndex = 1; + this.downloadsInProgressWinTempRb.TabStop = true; + this.downloadsInProgressWinTempRb.Text = "[desc]\r\n[winTemp\\DownloadsInProgress]"; + this.downloadsInProgressWinTempRb.UseVisualStyleBackColor = true; + // + // downloadsInProgressDescLbl + // + this.downloadsInProgressDescLbl.AutoSize = true; + this.downloadsInProgressDescLbl.Location = new System.Drawing.Point(6, 16); + this.downloadsInProgressDescLbl.Name = "downloadsInProgressDescLbl"; + this.downloadsInProgressDescLbl.Size = new System.Drawing.Size(38, 26); + this.downloadsInProgressDescLbl.TabIndex = 0; + this.downloadsInProgressDescLbl.Text = "[desc]\r\n[line 2]"; + // + // decryptInProgressGb + // + this.decryptInProgressGb.Controls.Add(this.decryptInProgressLibationFilesRb); + this.decryptInProgressGb.Controls.Add(this.decryptInProgressWinTempRb); + this.decryptInProgressGb.Controls.Add(this.decryptInProgressDescLbl); + this.decryptInProgressGb.Location = new System.Drawing.Point(9, 183); + this.decryptInProgressGb.Name = "decryptInProgressGb"; + this.decryptInProgressGb.Size = new System.Drawing.Size(758, 117); + this.decryptInProgressGb.TabIndex = 5; + this.decryptInProgressGb.TabStop = false; + this.decryptInProgressGb.Text = "Decrypt in progress"; + // + // decryptInProgressLibationFilesRb + // + this.decryptInProgressLibationFilesRb.AutoSize = true; + this.decryptInProgressLibationFilesRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.decryptInProgressLibationFilesRb.Location = new System.Drawing.Point(6, 81); + this.decryptInProgressLibationFilesRb.Name = "decryptInProgressLibationFilesRb"; + this.decryptInProgressLibationFilesRb.Size = new System.Drawing.Size(177, 30); + this.decryptInProgressLibationFilesRb.TabIndex = 2; + this.decryptInProgressLibationFilesRb.TabStop = true; + this.decryptInProgressLibationFilesRb.Text = "[desc]\r\n[libationFiles\\DecryptInProgress]"; + this.decryptInProgressLibationFilesRb.UseVisualStyleBackColor = true; + // + // decryptInProgressWinTempRb + // + this.decryptInProgressWinTempRb.AutoSize = true; + this.decryptInProgressWinTempRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.decryptInProgressWinTempRb.Location = new System.Drawing.Point(6, 45); + this.decryptInProgressWinTempRb.Name = "decryptInProgressWinTempRb"; + this.decryptInProgressWinTempRb.Size = new System.Drawing.Size(166, 30); + this.decryptInProgressWinTempRb.TabIndex = 1; + this.decryptInProgressWinTempRb.TabStop = true; + this.decryptInProgressWinTempRb.Text = "[desc]\r\n[winTemp\\DecryptInProgress]"; + this.decryptInProgressWinTempRb.UseVisualStyleBackColor = true; + // + // decryptInProgressDescLbl + // + this.decryptInProgressDescLbl.AutoSize = true; + this.decryptInProgressDescLbl.Location = new System.Drawing.Point(6, 16); + this.decryptInProgressDescLbl.Name = "decryptInProgressDescLbl"; + this.decryptInProgressDescLbl.Size = new System.Drawing.Size(38, 26); + this.decryptInProgressDescLbl.TabIndex = 0; + this.decryptInProgressDescLbl.Text = "[desc]\r\n[line 2]"; + // + // saveBtn + // + this.saveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.saveBtn.Location = new System.Drawing.Point(612, 404); + this.saveBtn.Name = "saveBtn"; + this.saveBtn.Size = new System.Drawing.Size(75, 23); + this.saveBtn.TabIndex = 7; + this.saveBtn.Text = "Save"; + this.saveBtn.UseVisualStyleBackColor = true; + this.saveBtn.Click += new System.EventHandler(this.saveBtn_Click); + // + // cancelBtn + // + this.cancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelBtn.Location = new System.Drawing.Point(713, 404); + this.cancelBtn.Name = "cancelBtn"; + this.cancelBtn.Size = new System.Drawing.Size(75, 23); + this.cancelBtn.TabIndex = 8; + this.cancelBtn.Text = "Cancel"; + this.cancelBtn.UseVisualStyleBackColor = true; + this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click); // // audibleLocaleLbl // this.audibleLocaleLbl.AutoSize = true; - this.audibleLocaleLbl.Location = new System.Drawing.Point(7, 98); + this.audibleLocaleLbl.Location = new System.Drawing.Point(12, 56); this.audibleLocaleLbl.Name = "audibleLocaleLbl"; this.audibleLocaleLbl.Size = new System.Drawing.Size(77, 13); - this.audibleLocaleLbl.TabIndex = 6; + this.audibleLocaleLbl.TabIndex = 4; this.audibleLocaleLbl.Text = "Audible Locale"; // // audibleLocaleCb @@ -361,81 +245,77 @@ "germany", "france", "canada"}); - this.audibleLocaleCb.Location = new System.Drawing.Point(90, 95); + this.audibleLocaleCb.Location = new System.Drawing.Point(95, 53); this.audibleLocaleCb.Name = "audibleLocaleCb"; - this.audibleLocaleCb.Size = new System.Drawing.Size(121, 21); - this.audibleLocaleCb.TabIndex = 7; + this.audibleLocaleCb.Size = new System.Drawing.Size(53, 21); + this.audibleLocaleCb.TabIndex = 5; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.decryptKeyTb); + this.groupBox1.Controls.Add(this.decryptKeyLbl); + this.groupBox1.Controls.Add(this.decryptKeyDescLbl); + this.groupBox1.Controls.Add(this.downloadsInProgressGb); + this.groupBox1.Controls.Add(this.decryptInProgressGb); + this.groupBox1.Location = new System.Drawing.Point(15, 90); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(773, 308); + this.groupBox1.TabIndex = 6; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Advanced settings for control freaks"; // // SettingsDialog // this.AcceptButton = this.saveBtn; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.cancelBtn; - this.ClientSize = new System.Drawing.Size(800, 579); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.cancelBtn; + this.ClientSize = new System.Drawing.Size(800, 439); + this.Controls.Add(this.groupBox1); this.Controls.Add(this.audibleLocaleCb); this.Controls.Add(this.audibleLocaleLbl); this.Controls.Add(this.cancelBtn); - this.Controls.Add(this.saveBtn); - this.Controls.Add(this.decryptInProgressGb); - this.Controls.Add(this.downloadsInProgressGb); - this.Controls.Add(this.libationFilesGb); - this.Controls.Add(this.booksLocationDescLbl); - this.Controls.Add(this.decryptKeyDescLbl); - this.Controls.Add(this.settingsFileDescLbl); - this.Controls.Add(this.booksLocationSearchBtn); - this.Controls.Add(this.booksLocationTb); - this.Controls.Add(this.booksLocationLbl); - this.Controls.Add(this.decryptKeyTb); - this.Controls.Add(this.decryptKeyLbl); - this.Controls.Add(this.settingsFileTb); - this.Controls.Add(this.settingsFileLbl); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; - this.Name = "SettingsDialog"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Edit Settings"; - this.Load += new System.EventHandler(this.SettingsDialog_Load); - this.libationFilesGb.ResumeLayout(false); - this.libationFilesGb.PerformLayout(); - this.downloadsInProgressGb.ResumeLayout(false); - this.downloadsInProgressGb.PerformLayout(); - this.decryptInProgressGb.ResumeLayout(false); - this.decryptInProgressGb.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.Controls.Add(this.saveBtn); + this.Controls.Add(this.booksLocationDescLbl); + this.Controls.Add(this.booksLocationSearchBtn); + this.Controls.Add(this.booksLocationTb); + this.Controls.Add(this.booksLocationLbl); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Name = "SettingsDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Edit Settings"; + this.Load += new System.EventHandler(this.SettingsDialog_Load); + this.downloadsInProgressGb.ResumeLayout(false); + this.downloadsInProgressGb.PerformLayout(); + this.decryptInProgressGb.ResumeLayout(false); + this.decryptInProgressGb.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); - } + } - #endregion - - private System.Windows.Forms.Label settingsFileLbl; - private System.Windows.Forms.TextBox settingsFileTb; - private System.Windows.Forms.Label decryptKeyLbl; - private System.Windows.Forms.TextBox decryptKeyTb; - private System.Windows.Forms.Label booksLocationLbl; - private System.Windows.Forms.TextBox booksLocationTb; - private System.Windows.Forms.Button booksLocationSearchBtn; - private System.Windows.Forms.Label settingsFileDescLbl; - private System.Windows.Forms.Label decryptKeyDescLbl; - private System.Windows.Forms.Label booksLocationDescLbl; - private System.Windows.Forms.GroupBox libationFilesGb; - private System.Windows.Forms.Button libationFilesCustomBtn; - private System.Windows.Forms.TextBox libationFilesCustomTb; - private System.Windows.Forms.RadioButton libationFilesCustomRb; - private System.Windows.Forms.RadioButton libationFilesMyDocsRb; - private System.Windows.Forms.RadioButton libationFilesRootRb; - private System.Windows.Forms.Label libationFilesDescLbl; - private System.Windows.Forms.GroupBox downloadsInProgressGb; - private System.Windows.Forms.Label downloadsInProgressDescLbl; - private System.Windows.Forms.RadioButton downloadsInProgressWinTempRb; - private System.Windows.Forms.RadioButton downloadsInProgressLibationFilesRb; - private System.Windows.Forms.GroupBox decryptInProgressGb; - private System.Windows.Forms.Label decryptInProgressDescLbl; - private System.Windows.Forms.RadioButton decryptInProgressLibationFilesRb; - private System.Windows.Forms.RadioButton decryptInProgressWinTempRb; - private System.Windows.Forms.Button saveBtn; - private System.Windows.Forms.Button cancelBtn; + #endregion + private System.Windows.Forms.Label decryptKeyLbl; + private System.Windows.Forms.TextBox decryptKeyTb; + private System.Windows.Forms.Label booksLocationLbl; + private System.Windows.Forms.TextBox booksLocationTb; + private System.Windows.Forms.Button booksLocationSearchBtn; + private System.Windows.Forms.Label decryptKeyDescLbl; + private System.Windows.Forms.Label booksLocationDescLbl; + private System.Windows.Forms.GroupBox downloadsInProgressGb; + private System.Windows.Forms.Label downloadsInProgressDescLbl; + private System.Windows.Forms.RadioButton downloadsInProgressWinTempRb; + private System.Windows.Forms.RadioButton downloadsInProgressLibationFilesRb; + private System.Windows.Forms.GroupBox decryptInProgressGb; + private System.Windows.Forms.Label decryptInProgressDescLbl; + private System.Windows.Forms.RadioButton decryptInProgressLibationFilesRb; + private System.Windows.Forms.RadioButton decryptInProgressWinTempRb; + private System.Windows.Forms.Button saveBtn; + private System.Windows.Forms.Button cancelBtn; private System.Windows.Forms.Label audibleLocaleLbl; private System.Windows.Forms.ComboBox audibleLocaleCb; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.cs b/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.cs index 718cf2be..bf349327 100644 --- a/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.cs +++ b/LibationWinForms/UNTESTED/Dialogs/SettingsDialog.cs @@ -4,42 +4,25 @@ using System.Windows.Forms; using Dinah.Core; using FileManager; -namespace LibationWinForms +namespace LibationWinForms.Dialogs { public partial class SettingsDialog : Form { Configuration config { get; } = Configuration.Instance; Func desc { get; } = Configuration.GetDescription; - string exeRoot { get; } - string myDocs { get; } - - bool isFirstLoad; public SettingsDialog() { InitializeComponent(); - this.libationFilesCustomTb.TextChanged += (_, __) => - { - if (!string.IsNullOrWhiteSpace(libationFilesCustomTb.Text)) - this.libationFilesCustomRb.Checked = true; - }; - - exeRoot = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Exe.FileLocationOnDisk), "Libation")); - myDocs = Path.GetFullPath(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Libation")); } private void SettingsDialog_Load(object sender, EventArgs e) { - isFirstLoad = string.IsNullOrWhiteSpace(config.Books); - - this.settingsFileTb.Text = config.Filepath; - this.settingsFileDescLbl.Text = desc(nameof(config.Filepath)); - this.decryptKeyTb.Text = config.DecryptKey; this.decryptKeyDescLbl.Text = desc(nameof(config.DecryptKey)); this.booksLocationTb.Text - = !string.IsNullOrWhiteSpace(config.Books) + = !string.IsNullOrWhiteSpace(config.Books) ? config.Books : Path.GetDirectoryName(Exe.FileLocationOnDisk); this.booksLocationDescLbl.Text = desc(nameof(config.Books)); @@ -49,21 +32,8 @@ namespace LibationWinForms ? config.LocaleCountryCode : "us"; - libationFilesDescLbl.Text = desc(nameof(config.LibationFiles)); - this.libationFilesRootRb.Text = "In the same folder that Libation is running from\r\n" + exeRoot; - this.libationFilesMyDocsRb.Text = "In My Documents\r\n" + myDocs; - if (config.LibationFiles == exeRoot) - libationFilesRootRb.Checked = true; - else if (config.LibationFiles == myDocs) - libationFilesMyDocsRb.Checked = true; - else - { - libationFilesCustomRb.Checked = true; - libationFilesCustomTb.Text = config.LibationFiles; - } - this.downloadsInProgressDescLbl.Text = desc(nameof(config.DownloadsInProgressEnum)); - var winTempDownloadsInProgress = Path.Combine(config.WinTemp, "DownloadsInProgress"); + var winTempDownloadsInProgress = Path.Combine(Configuration.WinTemp, "DownloadsInProgress"); this.downloadsInProgressWinTempRb.Text = "In your Windows temporary folder\r\n" + winTempDownloadsInProgress; switch (config.DownloadsInProgressEnum) { @@ -77,7 +47,7 @@ namespace LibationWinForms } this.decryptInProgressDescLbl.Text = desc(nameof(config.DecryptInProgressEnum)); - var winTempDecryptInProgress = Path.Combine(config.WinTemp, "DecryptInProgress"); + var winTempDecryptInProgress = Path.Combine(Configuration.WinTemp, "DecryptInProgress"); this.decryptInProgressWinTempRb.Text = "In your Windows temporary folder\r\n" + winTempDecryptInProgress; switch (config.DecryptInProgressEnum) { @@ -89,87 +59,38 @@ namespace LibationWinForms decryptInProgressWinTempRb.Checked = true; break; } - - libationFiles_Changed(this, null); - } - - private void libationFiles_Changed(object sender, EventArgs e) - { - var libationFilesDir - = libationFilesRootRb.Checked ? exeRoot - : libationFilesMyDocsRb.Checked ? myDocs - : libationFilesCustomTb.Text; - - var downloadsInProgress = Path.Combine(libationFilesDir, "DownloadsInProgress"); - this.downloadsInProgressLibationFilesRb.Text = $"In your Libation Files (ie: program-created files)\r\n{downloadsInProgress}"; - - var decryptInProgress = Path.Combine(libationFilesDir, "DecryptInProgress"); - this.decryptInProgressLibationFilesRb.Text = $"In your Libation Files (ie: program-created files)\r\n{decryptInProgress}"; } private void booksLocationSearchBtn_Click(object sender, EventArgs e) => selectFolder("Search for books location", this.booksLocationTb); - private void libationFilesCustomBtn_Click(object sender, EventArgs e) => selectFolder("Search for Libation Files location", this.libationFilesCustomTb); - private static void selectFolder(string desc, TextBox textbox) - { - using var dialog = new FolderBrowserDialog { Description = desc, SelectedPath = "" }; - dialog.ShowDialog(); - if (!string.IsNullOrWhiteSpace(dialog.SelectedPath)) - textbox.Text = dialog.SelectedPath; - } - - private void saveBtn_Click(object sender, EventArgs e) - { - config.DecryptKey = this.decryptKeyTb.Text; - - var pathsChanged = false; - - if (!Directory.Exists(this.booksLocationTb.Text)) - MessageBox.Show("Not saving change to Books location. This folder does not exist:\r\n" + this.booksLocationTb.Text); - else if (config.Books != this.booksLocationTb.Text) - { - pathsChanged = true; - config.Books = this.booksLocationTb.Text; - } + { + using var dialog = new FolderBrowserDialog { Description = desc, SelectedPath = "" }; + dialog.ShowDialog(); + if (!string.IsNullOrWhiteSpace(dialog.SelectedPath)) + textbox.Text = dialog.SelectedPath; + } + private void saveBtn_Click(object sender, EventArgs e) + { + config.DecryptKey = this.decryptKeyTb.Text; config.LocaleCountryCode = this.audibleLocaleCb.Text; + config.DownloadsInProgressEnum = downloadsInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp"; + config.DecryptInProgressEnum = decryptInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp"; - var libationDir - = libationFilesRootRb.Checked ? exeRoot - : libationFilesMyDocsRb.Checked ? myDocs - : libationFilesCustomTb.Text; - if (!Directory.Exists(libationDir)) - MessageBox.Show("Not saving change to Libation Files location. This folder does not exist:\r\n" + libationDir); - else if (config.LibationFiles != libationDir) - { - pathsChanged = true; - config.LibationFiles = libationDir; - } + var newBooks = this.booksLocationTb.Text; + if (!Directory.Exists(newBooks)) + { + MessageBox.Show($"Not saving change to Books location. This folder does not exist:\r\n{newBooks}"); + return; + } + else + config.Books = newBooks; - config.DownloadsInProgressEnum = downloadsInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp"; - config.DecryptInProgressEnum = decryptInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp"; + this.DialogResult = DialogResult.OK; + this.Close(); + } - if (!isFirstLoad && pathsChanged) - { - var shutdownResult = MessageBox.Show( - "You have changed a file path important for this program. All files will remain in their original location; nothing will be moved. It is highly recommended that you restart this program so these changes are handled correctly." - + "\r\n" - + "\r\nClose program?", - "Restart program", - MessageBoxButtons.YesNo, - MessageBoxIcon.Exclamation, - MessageBoxDefaultButton.Button1); - if (shutdownResult == DialogResult.Yes) - { - Application.Exit(); - } - } - - this.DialogResult = DialogResult.OK; - this.Close(); - } - - private void cancelBtn_Click(object sender, EventArgs e) => this.Close(); + private void cancelBtn_Click(object sender, EventArgs e) => this.Close(); } } diff --git a/LibationWinForms/UNTESTED/Dialogs/SetupDialog.Designer.cs b/LibationWinForms/UNTESTED/Dialogs/SetupDialog.Designer.cs new file mode 100644 index 00000000..f35f4600 --- /dev/null +++ b/LibationWinForms/UNTESTED/Dialogs/SetupDialog.Designer.cs @@ -0,0 +1,99 @@ +namespace LibationWinForms.Dialogs +{ + partial class SetupDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetupDialog)); + this.welcomeLbl = new System.Windows.Forms.Label(); + this.noQuestionsBtn = new System.Windows.Forms.Button(); + this.basicBtn = new System.Windows.Forms.Button(); + this.advancedBtn = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // welcomeLbl + // + this.welcomeLbl.AutoSize = true; + this.welcomeLbl.Location = new System.Drawing.Point(12, 9); + this.welcomeLbl.Name = "welcomeLbl"; + this.welcomeLbl.Size = new System.Drawing.Size(399, 78); + this.welcomeLbl.TabIndex = 0; + this.welcomeLbl.Text = resources.GetString("welcomeLbl.Text"); + // + // noQuestionsBtn + // + this.noQuestionsBtn.Location = new System.Drawing.Point(15, 90); + this.noQuestionsBtn.Name = "noQuestionsBtn"; + this.noQuestionsBtn.Size = new System.Drawing.Size(396, 57); + this.noQuestionsBtn.TabIndex = 1; + this.noQuestionsBtn.Text = "NO-QUESTIONS SETUP\r\n\r\nAccept all defaults"; + this.noQuestionsBtn.UseVisualStyleBackColor = true; + // + // basicBtn + // + this.basicBtn.Location = new System.Drawing.Point(15, 153); + this.basicBtn.Name = "basicBtn"; + this.basicBtn.Size = new System.Drawing.Size(396, 57); + this.basicBtn.TabIndex = 2; + this.basicBtn.Text = "BASIC SETUP\r\n\r\nChoose settings"; + this.basicBtn.UseVisualStyleBackColor = true; + // + // advancedBtn + // + this.advancedBtn.Location = new System.Drawing.Point(15, 216); + this.advancedBtn.Name = "advancedBtn"; + this.advancedBtn.Size = new System.Drawing.Size(396, 57); + this.advancedBtn.TabIndex = 3; + this.advancedBtn.Text = "ADVANCED SETUP\r\n\r\nChoose settings and where to store them"; + this.advancedBtn.UseVisualStyleBackColor = true; + // + // SetupDialog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(423, 285); + this.Controls.Add(this.advancedBtn); + this.Controls.Add(this.basicBtn); + this.Controls.Add(this.noQuestionsBtn); + this.Controls.Add(this.welcomeLbl); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Name = "SetupDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Welcome to Libation"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label welcomeLbl; + private System.Windows.Forms.Button noQuestionsBtn; + private System.Windows.Forms.Button basicBtn; + private System.Windows.Forms.Button advancedBtn; + } +} \ No newline at end of file diff --git a/LibationWinForms/UNTESTED/Dialogs/SetupDialog.cs b/LibationWinForms/UNTESTED/Dialogs/SetupDialog.cs new file mode 100644 index 00000000..b31d4c9b --- /dev/null +++ b/LibationWinForms/UNTESTED/Dialogs/SetupDialog.cs @@ -0,0 +1,37 @@ +using System; +using System.Windows.Forms; + +namespace LibationWinForms.Dialogs +{ + public partial class SetupDialog : Form + { + public event EventHandler NoQuestionsBtn_Click + { + add => noQuestionsBtn.Click += value; + remove => noQuestionsBtn.Click -= value; + } + + public event EventHandler BasicBtn_Click + { + add => basicBtn.Click += value; + remove => basicBtn.Click -= value; + } + + public event EventHandler AdvancedBtn_Click + { + add => advancedBtn.Click += value; + remove => advancedBtn.Click -= value; + } + + public SetupDialog() + { + InitializeComponent(); + + noQuestionsBtn.Click += btn_Click; + basicBtn.Click += btn_Click; + advancedBtn.Click += btn_Click; + } + + private void btn_Click(object sender, EventArgs e) => Close(); + } +} diff --git a/LibationWinForms/UNTESTED/Dialogs/SetupDialog.resx b/LibationWinForms/UNTESTED/Dialogs/SetupDialog.resx new file mode 100644 index 00000000..d2709b5f --- /dev/null +++ b/LibationWinForms/UNTESTED/Dialogs/SetupDialog.resx @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + This appears to be your first time using Libation or a previous setup was incomplete. + +Please fill in a few settings. You can also change these settings later. + +After you make your selections, get started by importing your library. +Go to Import > Scan Library + + \ No newline at end of file diff --git a/LibationWinForms/UNTESTED/Form1.cs b/LibationWinForms/UNTESTED/Form1.cs index b0582d82..27036fc4 100644 --- a/LibationWinForms/UNTESTED/Form1.cs +++ b/LibationWinForms/UNTESTED/Form1.cs @@ -8,6 +8,7 @@ using Dinah.Core; using Dinah.Core.Drawing; using Dinah.Core.Windows.Forms; using FileManager; +using LibationWinForms.Dialogs; namespace LibationWinForms { diff --git a/LibationWinForms/UNTESTED/ProductsGrid.cs b/LibationWinForms/UNTESTED/ProductsGrid.cs index 5c821340..dfe6f5a5 100644 --- a/LibationWinForms/UNTESTED/ProductsGrid.cs +++ b/LibationWinForms/UNTESTED/ProductsGrid.cs @@ -7,6 +7,7 @@ using DataLayer; using Dinah.Core.Collections.Generic; using Dinah.Core.DataBinding; using Dinah.Core.Windows.Forms; +using LibationWinForms.Dialogs; namespace LibationWinForms { diff --git a/WinFormsDesigner/Dialogs/LibationFilesDialog.Designer.cs b/WinFormsDesigner/Dialogs/LibationFilesDialog.Designer.cs new file mode 100644 index 00000000..9f7636db --- /dev/null +++ b/WinFormsDesigner/Dialogs/LibationFilesDialog.Designer.cs @@ -0,0 +1,156 @@ +namespace WinFormsDesigner.Dialogs +{ + partial class LibationFilesDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.libationFilesDescLbl = new System.Windows.Forms.Label(); + this.libationFilesCustomBtn = new System.Windows.Forms.Button(); + this.libationFilesCustomTb = new System.Windows.Forms.TextBox(); + this.libationFilesCustomRb = new System.Windows.Forms.RadioButton(); + this.libationFilesMyDocsRb = new System.Windows.Forms.RadioButton(); + this.libationFilesRootRb = new System.Windows.Forms.RadioButton(); + this.cancelBtn = new System.Windows.Forms.Button(); + this.saveBtn = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // libationFilesDescLbl + // + this.libationFilesDescLbl.AutoSize = true; + this.libationFilesDescLbl.Location = new System.Drawing.Point(12, 9); + this.libationFilesDescLbl.Name = "libationFilesDescLbl"; + this.libationFilesDescLbl.Size = new System.Drawing.Size(36, 13); + this.libationFilesDescLbl.TabIndex = 0; + this.libationFilesDescLbl.Text = "[desc]"; + // + // libationFilesCustomBtn + // + this.libationFilesCustomBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.libationFilesCustomBtn.Location = new System.Drawing.Point(753, 95); + this.libationFilesCustomBtn.Name = "libationFilesCustomBtn"; + this.libationFilesCustomBtn.Size = new System.Drawing.Size(35, 23); + this.libationFilesCustomBtn.TabIndex = 5; + this.libationFilesCustomBtn.Text = "..."; + this.libationFilesCustomBtn.UseVisualStyleBackColor = true; + // + // libationFilesCustomTb + // + this.libationFilesCustomTb.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.libationFilesCustomTb.Location = new System.Drawing.Point(35, 97); + this.libationFilesCustomTb.Name = "libationFilesCustomTb"; + this.libationFilesCustomTb.Size = new System.Drawing.Size(712, 20); + this.libationFilesCustomTb.TabIndex = 4; + // + // libationFilesCustomRb + // + this.libationFilesCustomRb.AutoSize = true; + this.libationFilesCustomRb.Location = new System.Drawing.Point(15, 100); + this.libationFilesCustomRb.Name = "libationFilesCustomRb"; + this.libationFilesCustomRb.Size = new System.Drawing.Size(14, 13); + this.libationFilesCustomRb.TabIndex = 3; + this.libationFilesCustomRb.TabStop = true; + this.libationFilesCustomRb.UseVisualStyleBackColor = true; + // + // libationFilesMyDocsRb + // + this.libationFilesMyDocsRb.AutoSize = true; + this.libationFilesMyDocsRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.libationFilesMyDocsRb.Location = new System.Drawing.Point(15, 61); + this.libationFilesMyDocsRb.Name = "libationFilesMyDocsRb"; + this.libationFilesMyDocsRb.Size = new System.Drawing.Size(111, 30); + this.libationFilesMyDocsRb.TabIndex = 2; + this.libationFilesMyDocsRb.TabStop = true; + this.libationFilesMyDocsRb.Text = "[desc]\r\n[myDocs\\Libation]"; + this.libationFilesMyDocsRb.UseVisualStyleBackColor = true; + // + // libationFilesRootRb + // + this.libationFilesRootRb.AutoSize = true; + this.libationFilesRootRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; + this.libationFilesRootRb.Location = new System.Drawing.Point(15, 25); + this.libationFilesRootRb.Name = "libationFilesRootRb"; + this.libationFilesRootRb.Size = new System.Drawing.Size(113, 30); + this.libationFilesRootRb.TabIndex = 1; + this.libationFilesRootRb.TabStop = true; + this.libationFilesRootRb.Text = "[desc]\r\n[exeRoot\\Libation]"; + this.libationFilesRootRb.UseVisualStyleBackColor = true; + // + // cancelBtn + // + this.cancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelBtn.Location = new System.Drawing.Point(713, 124); + this.cancelBtn.Name = "cancelBtn"; + this.cancelBtn.Size = new System.Drawing.Size(75, 23); + this.cancelBtn.TabIndex = 10; + this.cancelBtn.Text = "Cancel"; + this.cancelBtn.UseVisualStyleBackColor = true; + // + // saveBtn + // + this.saveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.saveBtn.Location = new System.Drawing.Point(612, 124); + this.saveBtn.Name = "saveBtn"; + this.saveBtn.Size = new System.Drawing.Size(75, 23); + this.saveBtn.TabIndex = 9; + this.saveBtn.Text = "Save"; + this.saveBtn.UseVisualStyleBackColor = true; + // + // LibationFilesDialog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 159); + this.Controls.Add(this.cancelBtn); + this.Controls.Add(this.saveBtn); + this.Controls.Add(this.libationFilesDescLbl); + this.Controls.Add(this.libationFilesCustomBtn); + this.Controls.Add(this.libationFilesCustomTb); + this.Controls.Add(this.libationFilesRootRb); + this.Controls.Add(this.libationFilesCustomRb); + this.Controls.Add(this.libationFilesMyDocsRb); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Name = "LibationFilesDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Libation Files location"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Label libationFilesDescLbl; + private System.Windows.Forms.Button libationFilesCustomBtn; + private System.Windows.Forms.TextBox libationFilesCustomTb; + private System.Windows.Forms.RadioButton libationFilesCustomRb; + private System.Windows.Forms.RadioButton libationFilesMyDocsRb; + private System.Windows.Forms.RadioButton libationFilesRootRb; + private System.Windows.Forms.Button cancelBtn; + private System.Windows.Forms.Button saveBtn; + } +} \ No newline at end of file diff --git a/WinFormsDesigner/Dialogs/LibationFilesDialog.cs b/WinFormsDesigner/Dialogs/LibationFilesDialog.cs new file mode 100644 index 00000000..451dd685 --- /dev/null +++ b/WinFormsDesigner/Dialogs/LibationFilesDialog.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace WinFormsDesigner.Dialogs +{ + public partial class LibationFilesDialog : Form + { + public LibationFilesDialog() + { + InitializeComponent(); + } + } +} diff --git a/WinFormsDesigner/Dialogs/LibationFilesDialog.resx b/WinFormsDesigner/Dialogs/LibationFilesDialog.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/WinFormsDesigner/Dialogs/LibationFilesDialog.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WinFormsDesigner/Dialogs/SettingsDialog.Designer.cs b/WinFormsDesigner/Dialogs/SettingsDialog.Designer.cs index e2700417..2c74f3e2 100644 --- a/WinFormsDesigner/Dialogs/SettingsDialog.Designer.cs +++ b/WinFormsDesigner/Dialogs/SettingsDialog.Designer.cs @@ -1,4 +1,4 @@ -namespace WinFormsDesigner +namespace WinFormsDesigner.Dialogs { partial class SettingsDialog { @@ -28,23 +28,13 @@ /// private void InitializeComponent() { - this.settingsFileLbl = new System.Windows.Forms.Label(); - this.settingsFileTb = new System.Windows.Forms.TextBox(); this.decryptKeyLbl = new System.Windows.Forms.Label(); this.decryptKeyTb = new System.Windows.Forms.TextBox(); this.booksLocationLbl = new System.Windows.Forms.Label(); this.booksLocationTb = new System.Windows.Forms.TextBox(); this.booksLocationSearchBtn = new System.Windows.Forms.Button(); - this.settingsFileDescLbl = new System.Windows.Forms.Label(); this.decryptKeyDescLbl = new System.Windows.Forms.Label(); this.booksLocationDescLbl = new System.Windows.Forms.Label(); - this.libationFilesGb = new System.Windows.Forms.GroupBox(); - this.libationFilesDescLbl = new System.Windows.Forms.Label(); - this.libationFilesCustomBtn = new System.Windows.Forms.Button(); - this.libationFilesCustomTb = new System.Windows.Forms.TextBox(); - this.libationFilesCustomRb = new System.Windows.Forms.RadioButton(); - this.libationFilesMyDocsRb = new System.Windows.Forms.RadioButton(); - this.libationFilesRootRb = new System.Windows.Forms.RadioButton(); this.downloadsInProgressGb = new System.Windows.Forms.GroupBox(); this.downloadsInProgressLibationFilesRb = new System.Windows.Forms.RadioButton(); this.downloadsInProgressWinTempRb = new System.Windows.Forms.RadioButton(); @@ -57,182 +47,80 @@ this.cancelBtn = new System.Windows.Forms.Button(); this.audibleLocaleLbl = new System.Windows.Forms.Label(); this.audibleLocaleCb = new System.Windows.Forms.ComboBox(); - this.libationFilesGb.SuspendLayout(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); this.downloadsInProgressGb.SuspendLayout(); this.decryptInProgressGb.SuspendLayout(); + this.groupBox1.SuspendLayout(); this.SuspendLayout(); // - // settingsFileLbl - // - this.settingsFileLbl.AutoSize = true; - this.settingsFileLbl.Location = new System.Drawing.Point(7, 15); - this.settingsFileLbl.Name = "settingsFileLbl"; - this.settingsFileLbl.Size = new System.Drawing.Size(61, 13); - this.settingsFileLbl.TabIndex = 0; - this.settingsFileLbl.Text = "Settings file"; - // - // settingsFileTb - // - this.settingsFileTb.Location = new System.Drawing.Point(90, 12); - this.settingsFileTb.Name = "settingsFileTb"; - this.settingsFileTb.ReadOnly = true; - this.settingsFileTb.Size = new System.Drawing.Size(698, 20); - this.settingsFileTb.TabIndex = 1; - // // decryptKeyLbl // this.decryptKeyLbl.AutoSize = true; - this.decryptKeyLbl.Location = new System.Drawing.Point(7, 59); + this.decryptKeyLbl.Location = new System.Drawing.Point(6, 22); this.decryptKeyLbl.Name = "decryptKeyLbl"; this.decryptKeyLbl.Size = new System.Drawing.Size(64, 13); - this.decryptKeyLbl.TabIndex = 3; + this.decryptKeyLbl.TabIndex = 0; this.decryptKeyLbl.Text = "Decrypt key"; // // decryptKeyTb // - this.decryptKeyTb.Location = new System.Drawing.Point(90, 56); + this.decryptKeyTb.Location = new System.Drawing.Point(76, 19); this.decryptKeyTb.Name = "decryptKeyTb"; this.decryptKeyTb.Size = new System.Drawing.Size(100, 20); - this.decryptKeyTb.TabIndex = 4; + this.decryptKeyTb.TabIndex = 1; // // booksLocationLbl // this.booksLocationLbl.AutoSize = true; - this.booksLocationLbl.Location = new System.Drawing.Point(7, 125); + this.booksLocationLbl.Location = new System.Drawing.Point(12, 17); this.booksLocationLbl.Name = "booksLocationLbl"; this.booksLocationLbl.Size = new System.Drawing.Size(77, 13); - this.booksLocationLbl.TabIndex = 8; + this.booksLocationLbl.TabIndex = 0; this.booksLocationLbl.Text = "Books location"; // // booksLocationTb // - this.booksLocationTb.Location = new System.Drawing.Point(90, 122); + this.booksLocationTb.Location = new System.Drawing.Point(95, 14); this.booksLocationTb.Name = "booksLocationTb"; - this.booksLocationTb.Size = new System.Drawing.Size(657, 20); - this.booksLocationTb.TabIndex = 9; + this.booksLocationTb.Size = new System.Drawing.Size(652, 20); + this.booksLocationTb.TabIndex = 1; // // booksLocationSearchBtn // - this.booksLocationSearchBtn.Location = new System.Drawing.Point(753, 120); + this.booksLocationSearchBtn.Location = new System.Drawing.Point(753, 12); this.booksLocationSearchBtn.Name = "booksLocationSearchBtn"; this.booksLocationSearchBtn.Size = new System.Drawing.Size(35, 23); - this.booksLocationSearchBtn.TabIndex = 10; + this.booksLocationSearchBtn.TabIndex = 2; this.booksLocationSearchBtn.Text = "..."; this.booksLocationSearchBtn.UseVisualStyleBackColor = true; // - // settingsFileDescLbl - // - this.settingsFileDescLbl.AutoSize = true; - this.settingsFileDescLbl.Location = new System.Drawing.Point(87, 35); - this.settingsFileDescLbl.Name = "settingsFileDescLbl"; - this.settingsFileDescLbl.Size = new System.Drawing.Size(36, 13); - this.settingsFileDescLbl.TabIndex = 2; - this.settingsFileDescLbl.Text = "[desc]"; - // // decryptKeyDescLbl // this.decryptKeyDescLbl.AutoSize = true; - this.decryptKeyDescLbl.Location = new System.Drawing.Point(87, 79); + this.decryptKeyDescLbl.Location = new System.Drawing.Point(73, 42); this.decryptKeyDescLbl.Name = "decryptKeyDescLbl"; this.decryptKeyDescLbl.Size = new System.Drawing.Size(36, 13); - this.decryptKeyDescLbl.TabIndex = 5; + this.decryptKeyDescLbl.TabIndex = 2; this.decryptKeyDescLbl.Text = "[desc]"; // // booksLocationDescLbl // this.booksLocationDescLbl.AutoSize = true; - this.booksLocationDescLbl.Location = new System.Drawing.Point(87, 145); + this.booksLocationDescLbl.Location = new System.Drawing.Point(92, 37); this.booksLocationDescLbl.Name = "booksLocationDescLbl"; this.booksLocationDescLbl.Size = new System.Drawing.Size(36, 13); - this.booksLocationDescLbl.TabIndex = 11; + this.booksLocationDescLbl.TabIndex = 3; this.booksLocationDescLbl.Text = "[desc]"; // - // libationFilesGb - // - this.libationFilesGb.Controls.Add(this.libationFilesDescLbl); - this.libationFilesGb.Controls.Add(this.libationFilesCustomBtn); - this.libationFilesGb.Controls.Add(this.libationFilesCustomTb); - this.libationFilesGb.Controls.Add(this.libationFilesCustomRb); - this.libationFilesGb.Controls.Add(this.libationFilesMyDocsRb); - this.libationFilesGb.Controls.Add(this.libationFilesRootRb); - this.libationFilesGb.Location = new System.Drawing.Point(12, 161); - this.libationFilesGb.Name = "libationFilesGb"; - this.libationFilesGb.Size = new System.Drawing.Size(776, 131); - this.libationFilesGb.TabIndex = 12; - this.libationFilesGb.TabStop = false; - this.libationFilesGb.Text = "Libation files"; - // - // libationFilesDescLbl - // - this.libationFilesDescLbl.AutoSize = true; - this.libationFilesDescLbl.Location = new System.Drawing.Point(6, 16); - this.libationFilesDescLbl.Name = "libationFilesDescLbl"; - this.libationFilesDescLbl.Size = new System.Drawing.Size(36, 13); - this.libationFilesDescLbl.TabIndex = 0; - this.libationFilesDescLbl.Text = "[desc]"; - // - // libationFilesCustomBtn - // - this.libationFilesCustomBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.libationFilesCustomBtn.Location = new System.Drawing.Point(741, 102); - this.libationFilesCustomBtn.Name = "libationFilesCustomBtn"; - this.libationFilesCustomBtn.Size = new System.Drawing.Size(35, 23); - this.libationFilesCustomBtn.TabIndex = 5; - this.libationFilesCustomBtn.Text = "..."; - this.libationFilesCustomBtn.UseVisualStyleBackColor = true; - // - // libationFilesCustomTb - // - this.libationFilesCustomTb.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.libationFilesCustomTb.Location = new System.Drawing.Point(29, 104); - this.libationFilesCustomTb.Name = "libationFilesCustomTb"; - this.libationFilesCustomTb.Size = new System.Drawing.Size(706, 20); - this.libationFilesCustomTb.TabIndex = 4; - // - // libationFilesCustomRb - // - this.libationFilesCustomRb.AutoSize = true; - this.libationFilesCustomRb.Location = new System.Drawing.Point(9, 107); - this.libationFilesCustomRb.Name = "libationFilesCustomRb"; - this.libationFilesCustomRb.Size = new System.Drawing.Size(14, 13); - this.libationFilesCustomRb.TabIndex = 3; - this.libationFilesCustomRb.TabStop = true; - this.libationFilesCustomRb.UseVisualStyleBackColor = true; - // - // libationFilesMyDocsRb - // - this.libationFilesMyDocsRb.AutoSize = true; - this.libationFilesMyDocsRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.libationFilesMyDocsRb.Location = new System.Drawing.Point(9, 68); - this.libationFilesMyDocsRb.Name = "libationFilesMyDocsRb"; - this.libationFilesMyDocsRb.Size = new System.Drawing.Size(111, 30); - this.libationFilesMyDocsRb.TabIndex = 2; - this.libationFilesMyDocsRb.TabStop = true; - this.libationFilesMyDocsRb.Text = "[desc]\r\n[myDocs\\Libation]"; - this.libationFilesMyDocsRb.UseVisualStyleBackColor = true; - // - // libationFilesRootRb - // - this.libationFilesRootRb.AutoSize = true; - this.libationFilesRootRb.CheckAlign = System.Drawing.ContentAlignment.TopLeft; - this.libationFilesRootRb.Location = new System.Drawing.Point(9, 32); - this.libationFilesRootRb.Name = "libationFilesRootRb"; - this.libationFilesRootRb.Size = new System.Drawing.Size(113, 30); - this.libationFilesRootRb.TabIndex = 1; - this.libationFilesRootRb.TabStop = true; - this.libationFilesRootRb.Text = "[desc]\r\n[exeRoot\\Libation]"; - this.libationFilesRootRb.UseVisualStyleBackColor = true; - // // downloadsInProgressGb // this.downloadsInProgressGb.Controls.Add(this.downloadsInProgressLibationFilesRb); this.downloadsInProgressGb.Controls.Add(this.downloadsInProgressWinTempRb); this.downloadsInProgressGb.Controls.Add(this.downloadsInProgressDescLbl); - this.downloadsInProgressGb.Location = new System.Drawing.Point(12, 298); + this.downloadsInProgressGb.Location = new System.Drawing.Point(15, 58); this.downloadsInProgressGb.Name = "downloadsInProgressGb"; - this.downloadsInProgressGb.Size = new System.Drawing.Size(776, 117); - this.downloadsInProgressGb.TabIndex = 13; + this.downloadsInProgressGb.Size = new System.Drawing.Size(758, 117); + this.downloadsInProgressGb.TabIndex = 4; this.downloadsInProgressGb.TabStop = false; this.downloadsInProgressGb.Text = "Downloads in progress"; // @@ -274,10 +162,10 @@ this.decryptInProgressGb.Controls.Add(this.decryptInProgressLibationFilesRb); this.decryptInProgressGb.Controls.Add(this.decryptInProgressWinTempRb); this.decryptInProgressGb.Controls.Add(this.decryptInProgressDescLbl); - this.decryptInProgressGb.Location = new System.Drawing.Point(12, 421); + this.decryptInProgressGb.Location = new System.Drawing.Point(9, 183); this.decryptInProgressGb.Name = "decryptInProgressGb"; - this.decryptInProgressGb.Size = new System.Drawing.Size(776, 117); - this.decryptInProgressGb.TabIndex = 14; + this.decryptInProgressGb.Size = new System.Drawing.Size(758, 117); + this.decryptInProgressGb.TabIndex = 5; this.decryptInProgressGb.TabStop = false; this.decryptInProgressGb.Text = "Decrypt in progress"; // @@ -317,10 +205,10 @@ // saveBtn // this.saveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.saveBtn.Location = new System.Drawing.Point(612, 544); + this.saveBtn.Location = new System.Drawing.Point(612, 404); this.saveBtn.Name = "saveBtn"; this.saveBtn.Size = new System.Drawing.Size(75, 23); - this.saveBtn.TabIndex = 15; + this.saveBtn.TabIndex = 7; this.saveBtn.Text = "Save"; this.saveBtn.UseVisualStyleBackColor = true; // @@ -328,20 +216,20 @@ // this.cancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelBtn.Location = new System.Drawing.Point(713, 544); + this.cancelBtn.Location = new System.Drawing.Point(713, 404); this.cancelBtn.Name = "cancelBtn"; this.cancelBtn.Size = new System.Drawing.Size(75, 23); - this.cancelBtn.TabIndex = 16; + this.cancelBtn.TabIndex = 8; this.cancelBtn.Text = "Cancel"; this.cancelBtn.UseVisualStyleBackColor = true; // // audibleLocaleLbl // this.audibleLocaleLbl.AutoSize = true; - this.audibleLocaleLbl.Location = new System.Drawing.Point(7, 98); + this.audibleLocaleLbl.Location = new System.Drawing.Point(12, 56); this.audibleLocaleLbl.Name = "audibleLocaleLbl"; this.audibleLocaleLbl.Size = new System.Drawing.Size(77, 13); - this.audibleLocaleLbl.TabIndex = 6; + this.audibleLocaleLbl.TabIndex = 4; this.audibleLocaleLbl.Text = "Audible Locale"; // // audibleLocaleCb @@ -354,10 +242,24 @@ "germany", "france", "canada"}); - this.audibleLocaleCb.Location = new System.Drawing.Point(90, 95); + this.audibleLocaleCb.Location = new System.Drawing.Point(95, 53); this.audibleLocaleCb.Name = "audibleLocaleCb"; - this.audibleLocaleCb.Size = new System.Drawing.Size(121, 21); - this.audibleLocaleCb.TabIndex = 7; + this.audibleLocaleCb.Size = new System.Drawing.Size(53, 21); + this.audibleLocaleCb.TabIndex = 5; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.decryptKeyTb); + this.groupBox1.Controls.Add(this.decryptKeyLbl); + this.groupBox1.Controls.Add(this.decryptKeyDescLbl); + this.groupBox1.Controls.Add(this.downloadsInProgressGb); + this.groupBox1.Controls.Add(this.decryptInProgressGb); + this.groupBox1.Location = new System.Drawing.Point(15, 90); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(773, 308); + this.groupBox1.TabIndex = 6; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Advanced settings for control freaks"; // // SettingsDialog // @@ -365,58 +267,39 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.cancelBtn; - this.ClientSize = new System.Drawing.Size(800, 579); + this.ClientSize = new System.Drawing.Size(800, 439); + this.Controls.Add(this.groupBox1); this.Controls.Add(this.audibleLocaleCb); this.Controls.Add(this.audibleLocaleLbl); this.Controls.Add(this.cancelBtn); this.Controls.Add(this.saveBtn); - this.Controls.Add(this.decryptInProgressGb); - this.Controls.Add(this.downloadsInProgressGb); - this.Controls.Add(this.libationFilesGb); this.Controls.Add(this.booksLocationDescLbl); - this.Controls.Add(this.decryptKeyDescLbl); - this.Controls.Add(this.settingsFileDescLbl); this.Controls.Add(this.booksLocationSearchBtn); this.Controls.Add(this.booksLocationTb); this.Controls.Add(this.booksLocationLbl); - this.Controls.Add(this.decryptKeyTb); - this.Controls.Add(this.decryptKeyLbl); - this.Controls.Add(this.settingsFileTb); - this.Controls.Add(this.settingsFileLbl); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.Name = "SettingsDialog"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Edit Settings"; - this.libationFilesGb.ResumeLayout(false); - this.libationFilesGb.PerformLayout(); this.downloadsInProgressGb.ResumeLayout(false); this.downloadsInProgressGb.PerformLayout(); this.decryptInProgressGb.ResumeLayout(false); this.decryptInProgressGb.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); } #endregion - - private System.Windows.Forms.Label settingsFileLbl; - private System.Windows.Forms.TextBox settingsFileTb; private System.Windows.Forms.Label decryptKeyLbl; private System.Windows.Forms.TextBox decryptKeyTb; private System.Windows.Forms.Label booksLocationLbl; private System.Windows.Forms.TextBox booksLocationTb; private System.Windows.Forms.Button booksLocationSearchBtn; - private System.Windows.Forms.Label settingsFileDescLbl; private System.Windows.Forms.Label decryptKeyDescLbl; private System.Windows.Forms.Label booksLocationDescLbl; - private System.Windows.Forms.GroupBox libationFilesGb; - private System.Windows.Forms.Button libationFilesCustomBtn; - private System.Windows.Forms.TextBox libationFilesCustomTb; - private System.Windows.Forms.RadioButton libationFilesCustomRb; - private System.Windows.Forms.RadioButton libationFilesMyDocsRb; - private System.Windows.Forms.RadioButton libationFilesRootRb; - private System.Windows.Forms.Label libationFilesDescLbl; private System.Windows.Forms.GroupBox downloadsInProgressGb; private System.Windows.Forms.Label downloadsInProgressDescLbl; private System.Windows.Forms.RadioButton downloadsInProgressWinTempRb; @@ -429,5 +312,6 @@ private System.Windows.Forms.Button cancelBtn; private System.Windows.Forms.Label audibleLocaleLbl; private System.Windows.Forms.ComboBox audibleLocaleCb; + private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file diff --git a/WinFormsDesigner/Dialogs/SettingsDialog.cs b/WinFormsDesigner/Dialogs/SettingsDialog.cs index 54b428ac..98184d4d 100644 --- a/WinFormsDesigner/Dialogs/SettingsDialog.cs +++ b/WinFormsDesigner/Dialogs/SettingsDialog.cs @@ -1,14 +1,13 @@ using System; using System.Windows.Forms; -namespace WinFormsDesigner +namespace WinFormsDesigner.Dialogs { public partial class SettingsDialog : Form { public SettingsDialog() { InitializeComponent(); - audibleLocaleCb.SelectedIndex = 0; } } } diff --git a/WinFormsDesigner/Dialogs/SetupDialog.Designer.cs b/WinFormsDesigner/Dialogs/SetupDialog.Designer.cs new file mode 100644 index 00000000..0b49b6aa --- /dev/null +++ b/WinFormsDesigner/Dialogs/SetupDialog.Designer.cs @@ -0,0 +1,99 @@ +namespace WinFormsDesigner.Dialogs +{ + partial class SetupDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetupDialog)); + this.welcomeLbl = new System.Windows.Forms.Label(); + this.noQuestionsBtn = new System.Windows.Forms.Button(); + this.basicBtn = new System.Windows.Forms.Button(); + this.advancedBtn = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // welcomeLbl + // + this.welcomeLbl.AutoSize = true; + this.welcomeLbl.Location = new System.Drawing.Point(12, 9); + this.welcomeLbl.Name = "welcomeLbl"; + this.welcomeLbl.Size = new System.Drawing.Size(399, 78); + this.welcomeLbl.TabIndex = 0; + this.welcomeLbl.Text = resources.GetString("welcomeLbl.Text"); + // + // noQuestionsBtn + // + this.noQuestionsBtn.Location = new System.Drawing.Point(15, 90); + this.noQuestionsBtn.Name = "noQuestionsBtn"; + this.noQuestionsBtn.Size = new System.Drawing.Size(396, 57); + this.noQuestionsBtn.TabIndex = 1; + this.noQuestionsBtn.Text = "NO-QUESTIONS SETUP\r\n\r\nAccept all defaults"; + this.noQuestionsBtn.UseVisualStyleBackColor = true; + // + // basicBtn + // + this.basicBtn.Location = new System.Drawing.Point(15, 153); + this.basicBtn.Name = "basicBtn"; + this.basicBtn.Size = new System.Drawing.Size(396, 57); + this.basicBtn.TabIndex = 2; + this.basicBtn.Text = "BASIC SETUP\r\n\r\nChoose settings"; + this.basicBtn.UseVisualStyleBackColor = true; + // + // advancedBtn + // + this.advancedBtn.Location = new System.Drawing.Point(15, 216); + this.advancedBtn.Name = "advancedBtn"; + this.advancedBtn.Size = new System.Drawing.Size(396, 57); + this.advancedBtn.TabIndex = 3; + this.advancedBtn.Text = "ADVANCED SETUP\r\n\r\nChoose settings and where to store them"; + this.advancedBtn.UseVisualStyleBackColor = true; + // + // SetupDialog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(423, 285); + this.Controls.Add(this.advancedBtn); + this.Controls.Add(this.basicBtn); + this.Controls.Add(this.noQuestionsBtn); + this.Controls.Add(this.welcomeLbl); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Name = "SetupDialog"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Welcome to Libation"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label welcomeLbl; + private System.Windows.Forms.Button noQuestionsBtn; + private System.Windows.Forms.Button basicBtn; + private System.Windows.Forms.Button advancedBtn; + } +} \ No newline at end of file diff --git a/WinFormsDesigner/Dialogs/SetupDialog.cs b/WinFormsDesigner/Dialogs/SetupDialog.cs new file mode 100644 index 00000000..551726e2 --- /dev/null +++ b/WinFormsDesigner/Dialogs/SetupDialog.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace WinFormsDesigner.Dialogs +{ + public partial class SetupDialog : Form + { + public SetupDialog() + { + InitializeComponent(); + } + } +} diff --git a/WinFormsDesigner/Dialogs/SetupDialog.resx b/WinFormsDesigner/Dialogs/SetupDialog.resx new file mode 100644 index 00000000..d2709b5f --- /dev/null +++ b/WinFormsDesigner/Dialogs/SetupDialog.resx @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + This appears to be your first time using Libation or a previous setup was incomplete. + +Please fill in a few settings. You can also change these settings later. + +After you make your selections, get started by importing your library. +Go to Import > Scan Library + + \ No newline at end of file diff --git a/WinFormsDesigner/WinFormsDesigner.csproj b/WinFormsDesigner/WinFormsDesigner.csproj index 37104786..d0e4bd8c 100644 --- a/WinFormsDesigner/WinFormsDesigner.csproj +++ b/WinFormsDesigner/WinFormsDesigner.csproj @@ -6,8 +6,8 @@ AnyCPU {0807616A-A77A-4B08-A65A-1582B09E114B} WinExe - LibationWinForm_Framework - LibationWinForm_Framework + WinFormsDesigner + WinFormsDesigner v4.8 512 true @@ -77,6 +77,12 @@ IndexLibraryDialog.cs + + Form + + + LibationFilesDialog.cs + Form @@ -101,17 +107,23 @@ EditTagsDialog.cs + + Form + + + SettingsDialog.cs + Form SearchSyntaxDialog.cs - + Form - - SettingsDialog.cs + + SetupDialog.cs Form @@ -145,6 +157,9 @@ IndexLibraryDialog.cs + + LibationFilesDialog.cs + AudibleLoginDialog.cs @@ -154,11 +169,14 @@ _2faCodeDialog.cs + + SettingsDialog.cs + SearchSyntaxDialog.cs - - SettingsDialog.cs + + SetupDialog.cs Form1.cs