Fix some trim warnings
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<TrimmerRootAssembly Include="PdfSharp" />
|
<TrimmerRootAssembly Include="PdfSharp" />
|
||||||
|
<TrimmerRootAssembly Include="Avalonia.Controls.DataGrid" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AvaloniaResource Include="Assets\**" />
|
<AvaloniaResource Include="Assets\**" />
|
||||||
|
|||||||
@@ -155,7 +155,9 @@ class MainViewModel : BaseViewModel, IFontResolver
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void RemoveFile(ReportFile file)
|
public void RemoveFile(object f) => RemoveFileImpl((ReportFile)f);
|
||||||
|
|
||||||
|
public async void RemoveFileImpl(ReportFile file)
|
||||||
{
|
{
|
||||||
var result = await DialogHost.Show(new WarningDeleteItemModel(file));
|
var result = await DialogHost.Show(new WarningDeleteItemModel(file));
|
||||||
if (result != null && (bool)result)
|
if (result != null && (bool)result)
|
||||||
@@ -168,7 +170,10 @@ class MainViewModel : BaseViewModel, IFontResolver
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void EditFileProperties(ReportFile file)
|
// https://github.com/AvaloniaUI/Avalonia/issues/10075
|
||||||
|
public void EditFileProperties(object f) => EditFilePropertiesImpl((ReportFile)f);
|
||||||
|
|
||||||
|
public async void EditFilePropertiesImpl(ReportFile file)
|
||||||
{
|
{
|
||||||
var result = await DialogHost.Show(new EditFileViewModel(file, ViewModelChanger));
|
var result = await DialogHost.Show(new EditFileViewModel(file, ViewModelChanger));
|
||||||
if (result != null && result is ReportFile updatedData)
|
if (result != null && result is ReportFile updatedData)
|
||||||
@@ -260,7 +265,9 @@ class MainViewModel : BaseViewModel, IFontResolver
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OpenFile(ReportFile file)
|
// https://github.com/AvaloniaUI/Avalonia/issues/10075
|
||||||
|
public void OpenFile(object f) => OpenFileImpl((ReportFile)f);
|
||||||
|
public void OpenFileImpl(ReportFile file)
|
||||||
{
|
{
|
||||||
var topLevel = TopLevelGrabber?.GetTopLevel();
|
var topLevel = TopLevelGrabber?.GetTopLevel();
|
||||||
if (topLevel is not null)
|
if (topLevel is not null)
|
||||||
@@ -271,7 +278,9 @@ class MainViewModel : BaseViewModel, IFontResolver
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OpenFileLocation(ReportFile file)
|
public void OpenFileLocation(object f) => OpenFileLocationImpl((ReportFile)f);
|
||||||
|
|
||||||
|
private void OpenFileLocationImpl(ReportFile file)
|
||||||
{
|
{
|
||||||
var topLevel = TopLevelGrabber?.GetTopLevel();
|
var topLevel = TopLevelGrabber?.GetTopLevel();
|
||||||
var dirName = Path.GetDirectoryName(file.FilePath);
|
var dirName = Path.GetDirectoryName(file.FilePath);
|
||||||
|
|||||||
Reference in New Issue
Block a user