Minor refactor
This commit is contained in:
parent
7b28a274a8
commit
a5d225dc44
@ -43,7 +43,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
||||
Tag = quickFilterTag,
|
||||
Header = $"_{++index}: {filter}"
|
||||
};
|
||||
quickFilterMenuItem.Click += (_, __) => performFilter(filter);
|
||||
quickFilterMenuItem.Click += async (_, __) => await performFilter(filter);
|
||||
allItems.Add(quickFilterMenuItem);
|
||||
}
|
||||
quickFiltersToolStripMenuItem.Items = allItems;
|
||||
@ -60,10 +60,10 @@ namespace LibationWinForms.AvaloniaUI.Views
|
||||
|
||||
public void editQuickFiltersToolStripMenuItem_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e) => new EditQuickFilters().ShowDialog();
|
||||
|
||||
public void productsDisplay_Initialized(object sender, EventArgs e)
|
||||
public async void productsDisplay_Initialized(object sender, EventArgs e)
|
||||
{
|
||||
if (QuickFilters.UseDefault)
|
||||
performFilter(QuickFilters.Filters.FirstOrDefault());
|
||||
await performFilter(QuickFilters.Filters.FirstOrDefault());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
||||
await productsDisplay.RemoveCheckedBooksAsync();
|
||||
}
|
||||
|
||||
public void doneRemovingBtn_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||
public async void doneRemovingBtn_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||
{
|
||||
removeBooksBtn.IsVisible = false;
|
||||
doneRemovingBtn.IsVisible = false;
|
||||
@ -30,7 +30,7 @@ namespace LibationWinForms.AvaloniaUI.Views
|
||||
//Restore the filter
|
||||
filterSearchTb.IsEnabled = true;
|
||||
filterSearchTb.IsVisible = true;
|
||||
performFilter(filterSearchTb.Text);
|
||||
await performFilter(filterSearchTb.Text);
|
||||
}
|
||||
|
||||
public void removeLibraryBooksToolStripMenuItem_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||
|
||||
@ -20,8 +20,6 @@ namespace LibationWinForms
|
||||
[return: System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.Bool)]
|
||||
static extern bool AllocConsole();
|
||||
|
||||
static bool UseAvaloniaUI = true;
|
||||
|
||||
[STAThread]
|
||||
static async Task Main()
|
||||
{
|
||||
@ -39,7 +37,6 @@ namespace LibationWinForms
|
||||
if (!startupTask.Result.success)
|
||||
return;
|
||||
|
||||
|
||||
//When RunStartupStuff completes, check if user has opted into beta and run Avalonia UI if they did.
|
||||
//Otherwise we just ignore all the Avalonia app build stuff and continue with winforms.
|
||||
|
||||
@ -121,7 +118,7 @@ namespace LibationWinForms
|
||||
// global exception handling (ShowAdminAlert) attempts to use logging. only call it after logging has been init'd
|
||||
postLoggingGlobalExceptionHandling();
|
||||
|
||||
return (true, !useBeta);
|
||||
return (true, useBeta);
|
||||
}
|
||||
|
||||
private static void RunInstaller(Configuration config)
|
||||
|
||||
@ -12,5 +12,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Loading…
x
Reference in New Issue
Block a user