Added login dialogs
This commit is contained in:
parent
503e1e143e
commit
9ecb32c3d2
40 changed files with 1100 additions and 169 deletions
|
|
@ -9,7 +9,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
{
|
||||
private void Configure_Export() { }
|
||||
|
||||
public async void exportLibraryToolStripMenuItem_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||
public void exportLibraryToolStripMenuItem_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -37,11 +37,11 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
break;
|
||||
}
|
||||
|
||||
await MessageBox.Show("Library exported to:\r\n" + saveFileDialog.FileName);
|
||||
MessageBox.Show("Library exported to:\r\n" + saveFileDialog.FileName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await MessageBox.ShowAdminAlert(this, "Error attempting to export your library.", "Error exporting", ex);
|
||||
MessageBox.ShowAdminAlert(this, "Error attempting to export your library.", "Error exporting", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await MessageBox.Show($"Bad filter string:\r\n\r\n{ex.Message}", "Bad filter string", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show($"Bad filter string:\r\n\r\n{ex.Message}", "Bad filter string", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
||||
// re-apply last good filter
|
||||
await performFilter(lastGoodFilter);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
|
||||
public async void convertAllM4bToMp3ToolStripMenuItem_Click(object sender, Avalonia.Interactivity.RoutedEventArgs args)
|
||||
{
|
||||
var result = await MessageBox.Show(
|
||||
var result = MessageBox.Show(
|
||||
"This converts all m4b titles in your library to mp3 files. Original files are not deleted."
|
||||
+ "\r\nFor large libraries this will take a long time and will take up more disk space."
|
||||
+ "\r\n\r\nContinue?"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
SetQueueCollapseState(collapseState);
|
||||
}
|
||||
|
||||
public async void ProductsDisplay_LiberateClicked(object sender, LibraryBook libraryBook)
|
||||
public void ProductsDisplay_LiberateClicked(object sender, LibraryBook libraryBook)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -38,7 +38,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
if (!Go.To.File(filePath?.ShortPathName))
|
||||
{
|
||||
var suffix = string.IsNullOrWhiteSpace(filePath) ? "" : $":\r\n{filePath}";
|
||||
await MessageBox.Show($"File not found" + suffix);
|
||||
MessageBox.Show($"File not found" + suffix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
// in autoScan, new books SHALL NOT show dialog
|
||||
try
|
||||
{
|
||||
await LibraryCommands.ImportAccountAsync(Login.WinformLoginChoiceEager.ApiExtendedFunc, accounts);
|
||||
await LibraryCommands.ImportAccountAsync(Dialogs.Login.AvaloniaLoginChoiceEager.ApiExtendedFunc, accounts);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
|
||||
public async void noAccountsYetAddAccountToolStripMenuItem_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||
{
|
||||
await MessageBox.Show("To load your Audible library, come back here to the Import menu after adding your account");
|
||||
MessageBox.Show("To load your Audible library, come back here to the Import menu after adding your account");
|
||||
await new Dialogs.AccountsDialog().ShowDialog(this);
|
||||
}
|
||||
|
||||
|
|
@ -63,15 +63,15 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
{
|
||||
try
|
||||
{
|
||||
var (totalProcessed, newAdded) = await LibraryCommands.ImportAccountAsync(Login.WinformLoginChoiceEager.ApiExtendedFunc, accounts);
|
||||
var (totalProcessed, newAdded) = await LibraryCommands.ImportAccountAsync(Dialogs.Login.AvaloniaLoginChoiceEager.ApiExtendedFunc, accounts);
|
||||
|
||||
// this is here instead of ScanEnd so that the following is only possible when it's user-initiated, not automatic loop
|
||||
if (Configuration.Instance.ShowImportedStats && newAdded > 0)
|
||||
await MessageBox.Show($"Total processed: {totalProcessed}\r\nNew: {newAdded}");
|
||||
MessageBox.Show($"Total processed: {totalProcessed}\r\nNew: {newAdded}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await MessageBox.ShowAdminAlert(
|
||||
MessageBox.ShowAdminAlert(
|
||||
this,
|
||||
"Error importing library. Please try again. If this still happens after 2 or 3 tries, stop and contact administrator",
|
||||
"Error importing library",
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
public async void basicSettingsToolStripMenuItem_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e) => await new Dialogs.SettingsDialog().ShowDialog(this);
|
||||
|
||||
public async void aboutToolStripMenuItem_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||
=> await MessageBox.Show($"Running Libation version {AppScaffolding.LibationScaffolding.BuildVersion}", $"Libation v{AppScaffolding.LibationScaffolding.BuildVersion}");
|
||||
=> MessageBox.Show($"Running Libation version {AppScaffolding.LibationScaffolding.BuildVersion}", $"Libation v{AppScaffolding.LibationScaffolding.BuildVersion}");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
|
||||
var visibleLibraryBooks = _viewModel.ProductsDisplay.GetVisibleBookEntries();
|
||||
|
||||
var confirmationResult = await MessageBox.ShowConfirmationDialog(
|
||||
var confirmationResult = MessageBox.ShowConfirmationDialog(
|
||||
this,
|
||||
visibleLibraryBooks,
|
||||
"Are you sure you want to replace tags in {0}?",
|
||||
|
|
@ -71,7 +71,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
|
||||
var visibleLibraryBooks = _viewModel.ProductsDisplay.GetVisibleBookEntries();
|
||||
|
||||
var confirmationResult = await MessageBox.ShowConfirmationDialog(
|
||||
var confirmationResult = MessageBox.ShowConfirmationDialog(
|
||||
this,
|
||||
visibleLibraryBooks,
|
||||
"Are you sure you want to replace downloaded status in {0}?",
|
||||
|
|
@ -89,7 +89,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
{
|
||||
var visibleLibraryBooks = _viewModel.ProductsDisplay.GetVisibleBookEntries();
|
||||
|
||||
var confirmationResult = await MessageBox.ShowConfirmationDialog(
|
||||
var confirmationResult = MessageBox.ShowConfirmationDialog(
|
||||
this,
|
||||
visibleLibraryBooks,
|
||||
"Are you sure you want to remove {0} from Libation's library?",
|
||||
|
|
|
|||
|
|
@ -67,8 +67,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
|||
|
||||
private async void MainWindow_Opened(object sender, EventArgs e)
|
||||
{
|
||||
//var dialog = new EditReplacementChars();
|
||||
//await dialog.ShowDialog(this);
|
||||
|
||||
}
|
||||
|
||||
public void ProductsDisplay_Initialized1(object sender, EventArgs e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue