Linux compat

This commit is contained in:
Michael Bucari-Tovo 2022-07-24 14:46:27 -06:00
parent 683c221ca8
commit 3fc1da66de
4 changed files with 18 additions and 13 deletions

View File

@ -343,6 +343,7 @@
<Button
Grid.Row="6"
Grid.Column="0"
IsEnabled="False"
Content="{Binding DownloadDecryptSettings.EditCharReplacementText}"
Height="30"
Padding="30,3,30,3"

View File

@ -71,6 +71,8 @@
<None Remove="Assets\SEGOEUI.TTF" />
<None Remove="Assets\up.png" />
<None Remove="Assets\WINGDING.TTF" />
<None Remove="MessageBox.cs~RF105afb8d.TMP" />
<None Remove="Views\MainWindow\MainWindow.Export.axaml.cs~RF10732d95.TMP" />
</ItemGroup>
<ItemGroup>

View File

@ -10,7 +10,7 @@ namespace LibationAvalonia.Views
{
private void Configure_Export() { }
public void exportLibraryToolStripMenuItem_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
public async void exportLibraryToolStripMenuItem_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
{
try
{
@ -23,25 +23,25 @@ namespace LibationAvalonia.Views
saveFileDialog.Filters.Add(new FileDialogFilter { Name = "JSON files (*.json)", Extensions = new() { "json" } });
saveFileDialog.Filters.Add(new FileDialogFilter { Name = "All files (*.*)", Extensions = new() { "*" } });
var fileName = await saveFileDialog.ShowAsync(this);
if (fileName is null) return;
// FilterIndex is 1-based, NOT 0-based
/*
switch (saveFileDialog.FilterIndex)
var ext = System.IO.Path.GetExtension(fileName);
switch (ext)
{
case 1: // xlsx
case "xlsx": // xlsx
default:
LibraryExporter.ToXlsx(saveFileDialog.FileName);
LibraryExporter.ToXlsx(fileName);
break;
case 2: // csv
LibraryExporter.ToCsv(saveFileDialog.FileName);
case "csv": // csv
LibraryExporter.ToCsv(fileName);
break;
case 3: // json
LibraryExporter.ToJson(saveFileDialog.FileName);
case "json": // json
LibraryExporter.ToJson(fileName);
break;
}
MessageBox.Show("Library exported to:\r\n" + saveFileDialog.FileName);
*/
MessageBox.Show("Library exported to:\r\n" + fileName, "Library Exported");
}
catch (Exception ex)
{

View File

@ -67,9 +67,11 @@ namespace LibationAvalonia.Views
private async void MainWindow_Opened(object sender, EventArgs e)
{
/*
var charReplace = new EditReplacementChars();
await charReplace.ShowDialog(this);
*/
}
public void ProductsDisplay_Initialized1(object sender, EventArgs e)