Display settings wizard on first run
This commit is contained in:
parent
22e5dbf83d
commit
0b08bb3c4a
@ -38,7 +38,7 @@ namespace FileManager
|
|||||||
[Description("Location of the configuration file where these settings are saved. Please do not edit this file directly while Libation is running.")]
|
[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 { get; }
|
public string Filepath { get; }
|
||||||
|
|
||||||
[Description("Your user-specific key used to decrypt your audible files (*.aax) into audio files you can use anywhere (*.m4b)")]
|
[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)")]
|
||||||
public string DecryptKey
|
public string DecryptKey
|
||||||
{
|
{
|
||||||
get => persistentDictionary[nameof(DecryptKey)];
|
get => persistentDictionary[nameof(DecryptKey)];
|
||||||
|
|||||||
@ -202,6 +202,7 @@
|
|||||||
this.libationFilesCustomRb.TabIndex = 3;
|
this.libationFilesCustomRb.TabIndex = 3;
|
||||||
this.libationFilesCustomRb.TabStop = true;
|
this.libationFilesCustomRb.TabStop = true;
|
||||||
this.libationFilesCustomRb.UseVisualStyleBackColor = true;
|
this.libationFilesCustomRb.UseVisualStyleBackColor = true;
|
||||||
|
this.libationFilesCustomRb.CheckedChanged += new System.EventHandler(this.libationFilesCustomRb_CheckedChanged);
|
||||||
//
|
//
|
||||||
// libationFilesMyDocsRb
|
// libationFilesMyDocsRb
|
||||||
//
|
//
|
||||||
|
|||||||
@ -1,15 +1,8 @@
|
|||||||
using FileManager;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Dinah.Core;
|
using Dinah.Core;
|
||||||
|
using FileManager;
|
||||||
|
|
||||||
namespace LibationWinForm
|
namespace LibationWinForm
|
||||||
{
|
{
|
||||||
@ -20,6 +13,8 @@ namespace LibationWinForm
|
|||||||
string exeRoot { get; }
|
string exeRoot { get; }
|
||||||
string myDocs { get; }
|
string myDocs { get; }
|
||||||
|
|
||||||
|
bool isFirstLoad;
|
||||||
|
|
||||||
public SettingsDialog()
|
public SettingsDialog()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -31,6 +26,8 @@ namespace LibationWinForm
|
|||||||
|
|
||||||
private void SettingsDialog_Load(object sender, EventArgs e)
|
private void SettingsDialog_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
isFirstLoad = string.IsNullOrWhiteSpace(config.Books);
|
||||||
|
|
||||||
this.settingsFileTb.Text = config.Filepath;
|
this.settingsFileTb.Text = config.Filepath;
|
||||||
this.settingsFileDescLbl.Text = desc(nameof(config.Filepath));
|
this.settingsFileDescLbl.Text = desc(nameof(config.Filepath));
|
||||||
|
|
||||||
@ -88,6 +85,8 @@ namespace LibationWinForm
|
|||||||
|
|
||||||
private void libationFiles_Changed(object sender, EventArgs e)
|
private void libationFiles_Changed(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Check_libationFilesCustom_RadioButton();
|
||||||
|
|
||||||
var libationFilesDir
|
var libationFilesDir
|
||||||
= libationFilesRootRb.Checked ? exeRoot
|
= libationFilesRootRb.Checked ? exeRoot
|
||||||
: libationFilesMyDocsRb.Checked ? myDocs
|
: libationFilesMyDocsRb.Checked ? myDocs
|
||||||
@ -102,7 +101,14 @@ namespace LibationWinForm
|
|||||||
|
|
||||||
private void booksLocationSearchBtn_Click(object sender, EventArgs e) => selectFolder("Search for books location", this.booksLocationTb);
|
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 void libationFilesCustomBtn_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Check_libationFilesCustom_RadioButton();
|
||||||
|
selectFolder("Search for Libation Files location", this.libationFilesCustomTb);
|
||||||
|
}
|
||||||
|
private void libationFilesCustomRb_CheckedChanged(object sender, EventArgs e) => Check_libationFilesCustom_RadioButton();
|
||||||
|
|
||||||
|
private void Check_libationFilesCustom_RadioButton() => this.libationFilesCustomRb.Checked = true;
|
||||||
|
|
||||||
private static void selectFolder(string desc, TextBox textbox)
|
private static void selectFolder(string desc, TextBox textbox)
|
||||||
{
|
{
|
||||||
@ -143,7 +149,7 @@ namespace LibationWinForm
|
|||||||
config.DownloadsInProgressEnum = downloadsInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
|
config.DownloadsInProgressEnum = downloadsInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
|
||||||
config.DecryptInProgressEnum = decryptInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
|
config.DecryptInProgressEnum = decryptInProgressLibationFilesRb.Checked ? "LibationFiles" : "WinTemp";
|
||||||
|
|
||||||
if (pathsChanged)
|
if (!isFirstLoad && pathsChanged)
|
||||||
{
|
{
|
||||||
var shutdownResult = MessageBox.Show(
|
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."
|
"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."
|
||||||
|
|||||||
@ -1,7 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace LibationWinForm
|
namespace LibationWinForm
|
||||||
@ -16,6 +13,20 @@ namespace LibationWinForm
|
|||||||
{
|
{
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(FileManager.Configuration.Instance.Books))
|
||||||
|
{
|
||||||
|
var welcomeText = @"
|
||||||
|
This appears to be your first time using Libation. Welcome.
|
||||||
|
Please fill fill in a few settings on the following page. You can also change these settings later.
|
||||||
|
|
||||||
|
After you make your selections, get started by importing your library.
|
||||||
|
Go to Import > Scan Library
|
||||||
|
".Trim();
|
||||||
|
MessageBox.Show(welcomeText, "Welcom to Libation", MessageBoxButtons.OK);
|
||||||
|
new SettingsDialog().ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
Application.Run(new Form1());
|
Application.Run(new Form1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
45
__TODO.txt
45
__TODO.txt
@ -1,4 +1,27 @@
|
|||||||
-- begin ENHANCEMENT, PERFORMANCE: IMPORT ---------------------------------------------------------------------------------------------------------------------
|
-- begin BETA ---------------------------------------------------------------------------------------------------------------------
|
||||||
|
Screenshots and examples. Import. Search. Save tag. Search by tag.
|
||||||
|
Link to site with search syntax
|
||||||
|
|
||||||
|
Warn of know performance issues
|
||||||
|
- Library import
|
||||||
|
- Tag add/edit
|
||||||
|
- Grid is slow to respond loading when books aren't liberated
|
||||||
|
|
||||||
|
Error logging
|
||||||
|
|
||||||
|
Instructions on how to send me error logs
|
||||||
|
|
||||||
|
how to use tags. add, edit, search. spaces, underscores. search
|
||||||
|
partial (eg: [bio] also shows auto_bio)
|
||||||
|
|
||||||
|
instructions for using and saving filters
|
||||||
|
|
||||||
|
how to tag for hidden/greyed out
|
||||||
|
|
||||||
|
Create release version and installer
|
||||||
|
-- end BETA ---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- begin ENHANCEMENT, PERFORMANCE: IMPORT ---------------------------------------------------------------------------------------------------------------------
|
||||||
imports are PAINFULLY slow for just a few hundred items. wtf is taking so long?
|
imports are PAINFULLY slow for just a few hundred items. wtf is taking so long?
|
||||||
-- end ENHANCEMENT, PERFORMANCE: IMPORT ---------------------------------------------------------------------------------------------------------------------
|
-- end ENHANCEMENT, PERFORMANCE: IMPORT ---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -43,14 +66,14 @@ stack trace
|
|||||||
at System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion()
|
at System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion()
|
||||||
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
|
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
|
||||||
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
|
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
|
||||||
at FileManager.FilePathCache.GetPath(String id, FileType type) in C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\Libation\FileManager\UNTESTED\FilePathCache.cs:line 33
|
at FileManager.FilePathCache.GetPath(String id, FileType type) in \Libation\FileManager\UNTESTED\FilePathCache.cs:line 33
|
||||||
at FileManager.AudibleFileStorage.<getAsync>d__32.MoveNext() in C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\Libation\FileManager\UNTESTED\AudibleFileStorage.cs:line 112
|
at FileManager.AudibleFileStorage.<getAsync>d__32.MoveNext() in \Libation\FileManager\UNTESTED\AudibleFileStorage.cs:line 112
|
||||||
at FileManager.AudibleFileStorage.<GetAsync>d__31.MoveNext() in C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\Libation\FileManager\UNTESTED\AudibleFileStorage.cs:line 107
|
at FileManager.AudibleFileStorage.<GetAsync>d__31.MoveNext() in \Libation\FileManager\UNTESTED\AudibleFileStorage.cs:line 107
|
||||||
at FileManager.AudibleFileStorage.<ExistsAsync>d__30.MoveNext() in C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\Libation\FileManager\UNTESTED\AudibleFileStorage.cs:line 104
|
at FileManager.AudibleFileStorage.<ExistsAsync>d__30.MoveNext() in \Libation\FileManager\UNTESTED\AudibleFileStorage.cs:line 104
|
||||||
at LibationWinForm.Form1.<<setBookBackupCountsAsync>g__getAudioFileStateAsync|15_1>d.MoveNext() in C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\Libation\LibationWinForm\UNTESTED\Form1.cs:line 110
|
at LibationWinForm.Form1.<<setBookBackupCountsAsync>g__getAudioFileStateAsync|15_1>d.MoveNext() in \Libation\LibationWinForm\UNTESTED\Form1.cs:line 110
|
||||||
at LibationWinForm.Form1.<setBookBackupCountsAsync>d__15.MoveNext() in C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\Libation\LibationWinForm\UNTESTED\Form1.cs:line 117
|
at LibationWinForm.Form1.<setBookBackupCountsAsync>d__15.MoveNext() in \Libation\LibationWinForm\UNTESTED\Form1.cs:line 117
|
||||||
at LibationWinForm.Form1.<setBackupCountsAsync>d__13.MoveNext() in C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\Libation\LibationWinForm\UNTESTED\Form1.cs:line 81
|
at LibationWinForm.Form1.<setBackupCountsAsync>d__13.MoveNext() in \Libation\LibationWinForm\UNTESTED\Form1.cs:line 81
|
||||||
at LibationWinForm.Form1.<Form1_Load>d__11.MoveNext() in C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\Libation\LibationWinForm\UNTESTED\Form1.cs:line 60
|
at LibationWinForm.Form1.<Form1_Load>d__11.MoveNext() in \Libation\LibationWinForm\UNTESTED\Form1.cs:line 60
|
||||||
-- end BUG, MOVING FILES ---------------------------------------------------------------------------------------------------------------------
|
-- end BUG, MOVING FILES ---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- begin CONFIG FILES ---------------------------------------------------------------------------------------------------------------------
|
-- begin CONFIG FILES ---------------------------------------------------------------------------------------------------------------------
|
||||||
@ -63,8 +86,8 @@ multiple files named "appsettings.json" will overwrite each other
|
|||||||
libraries should avoid this generic name. ok for applications to use them
|
libraries should avoid this generic name. ok for applications to use them
|
||||||
|
|
||||||
Audible API
|
Audible API
|
||||||
C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\audible api\AudibleApi\_Tests\AudibleApi.Tests\bin\Debug\netcoreapp3.0\L1
|
\AudibleApi\_Tests\AudibleApi.Tests\bin\Debug\netcoreapp3.0\L1
|
||||||
C:\Dropbox\Dinah's folder\coding\_NET\Visual Studio 2019\audible api\AudibleApi\_Tests\AudibleApi.Tests\bin\Debug\netcoreapp3.0\ComputedTestValues
|
\AudibleApi\_Tests\AudibleApi.Tests\bin\Debug\netcoreapp3.0\ComputedTestValues
|
||||||
14+ json files
|
14+ json files
|
||||||
these can go in a shared solution folder
|
these can go in a shared solution folder
|
||||||
BasePath => recursively search directories upward-only until fild dir with .sln
|
BasePath => recursively search directories upward-only until fild dir with .sln
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user