Linux compat
This commit is contained in:
parent
683c221ca8
commit
3fc1da66de
@ -343,6 +343,7 @@
|
||||
<Button
|
||||
Grid.Row="6"
|
||||
Grid.Column="0"
|
||||
IsEnabled="False"
|
||||
Content="{Binding DownloadDecryptSettings.EditCharReplacementText}"
|
||||
Height="30"
|
||||
Padding="30,3,30,3"
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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
|
||||
{
|
||||
@ -22,26 +22,26 @@ namespace LibationAvalonia.Views
|
||||
saveFileDialog.Filters.Add(new FileDialogFilter { Name = "CSV files (*.csv)", Extensions = new() { "csv" } });
|
||||
saveFileDialog.Filters.Add(new FileDialogFilter { Name = "JSON files (*.json)", Extensions = new() { "json" } });
|
||||
saveFileDialog.Filters.Add(new FileDialogFilter { Name = "All files (*.*)", Extensions = new() { "*" } });
|
||||
|
||||
|
||||
// FilterIndex is 1-based, NOT 0-based
|
||||
/*
|
||||
switch (saveFileDialog.FilterIndex)
|
||||
var fileName = await saveFileDialog.ShowAsync(this);
|
||||
if (fileName is null) return;
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user