Linux compat
This commit is contained in:
parent
683c221ca8
commit
3fc1da66de
@ -343,6 +343,7 @@
|
|||||||
<Button
|
<Button
|
||||||
Grid.Row="6"
|
Grid.Row="6"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
IsEnabled="False"
|
||||||
Content="{Binding DownloadDecryptSettings.EditCharReplacementText}"
|
Content="{Binding DownloadDecryptSettings.EditCharReplacementText}"
|
||||||
Height="30"
|
Height="30"
|
||||||
Padding="30,3,30,3"
|
Padding="30,3,30,3"
|
||||||
|
|||||||
@ -71,6 +71,8 @@
|
|||||||
<None Remove="Assets\SEGOEUI.TTF" />
|
<None Remove="Assets\SEGOEUI.TTF" />
|
||||||
<None Remove="Assets\up.png" />
|
<None Remove="Assets\up.png" />
|
||||||
<None Remove="Assets\WINGDING.TTF" />
|
<None Remove="Assets\WINGDING.TTF" />
|
||||||
|
<None Remove="MessageBox.cs~RF105afb8d.TMP" />
|
||||||
|
<None Remove="Views\MainWindow\MainWindow.Export.axaml.cs~RF10732d95.TMP" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -10,7 +10,7 @@ namespace LibationAvalonia.Views
|
|||||||
{
|
{
|
||||||
private void Configure_Export() { }
|
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
|
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 = "JSON files (*.json)", Extensions = new() { "json" } });
|
||||||
saveFileDialog.Filters.Add(new FileDialogFilter { Name = "All files (*.*)", Extensions = new() { "*" } });
|
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
|
var ext = System.IO.Path.GetExtension(fileName);
|
||||||
/*
|
switch (ext)
|
||||||
switch (saveFileDialog.FilterIndex)
|
|
||||||
{
|
{
|
||||||
case 1: // xlsx
|
case "xlsx": // xlsx
|
||||||
default:
|
default:
|
||||||
LibraryExporter.ToXlsx(saveFileDialog.FileName);
|
LibraryExporter.ToXlsx(fileName);
|
||||||
break;
|
break;
|
||||||
case 2: // csv
|
case "csv": // csv
|
||||||
LibraryExporter.ToCsv(saveFileDialog.FileName);
|
LibraryExporter.ToCsv(fileName);
|
||||||
break;
|
break;
|
||||||
case 3: // json
|
case "json": // json
|
||||||
LibraryExporter.ToJson(saveFileDialog.FileName);
|
LibraryExporter.ToJson(fileName);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageBox.Show("Library exported to:\r\n" + saveFileDialog.FileName);
|
MessageBox.Show("Library exported to:\r\n" + fileName, "Library Exported");
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -67,9 +67,11 @@ namespace LibationAvalonia.Views
|
|||||||
|
|
||||||
private async void MainWindow_Opened(object sender, EventArgs e)
|
private async void MainWindow_Opened(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
var charReplace = new EditReplacementChars();
|
var charReplace = new EditReplacementChars();
|
||||||
|
|
||||||
await charReplace.ShowDialog(this);
|
await charReplace.ShowDialog(this);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ProductsDisplay_Initialized1(object sender, EventArgs e)
|
public void ProductsDisplay_Initialized1(object sender, EventArgs e)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user