add DataGrid extension for Avalonia

This commit is contained in:
Florian Stinglmayr 2024-11-08 08:54:57 +01:00
parent 9befb10587
commit af16659f97
3 changed files with 9 additions and 2 deletions

View File

@ -51,6 +51,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia" Version="11.2.0" /> <PackageReference Include="Avalonia" Version="11.2.0" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.2.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> <PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.1" /> <PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
<PackageReference Include="System.Drawing.Common" Version="8.0.10" /> <PackageReference Include="System.Drawing.Common" Version="8.0.10" />

View File

@ -4,6 +4,8 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using Avalonia; using Avalonia;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Input;
using EDPlayerJournal.Entries; using EDPlayerJournal.Entries;
using EliteBGS.Util; using EliteBGS.Util;
using EDPlayerJournal.BGS; using EDPlayerJournal.BGS;

View File

@ -11,6 +11,8 @@ using System.Globalization;
using System.Diagnostics; using System.Diagnostics;
using Avalonia; using Avalonia;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Input;
namespace EliteBGS; namespace EliteBGS;
@ -484,7 +486,7 @@ public partial class MainWindow : Window {
RefreshView(); RefreshView();
} }
private void Profit_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) { private void Profit_KeyUp(object sender, KeyEventArgs e) {
if (e.Key == Key.Enter) { if (e.Key == Key.Enter) {
RefreshView(); RefreshView();
} }
@ -547,13 +549,15 @@ public partial class MainWindow : Window {
UpdateTheme(); UpdateTheme();
} }
private void URL_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { /*
private void URL_RequestNavigate(object sender, RequestNavigateEventArgs e) {
ProcessStartInfo info = new ProcessStartInfo(); ProcessStartInfo info = new ProcessStartInfo();
info.UseShellExecute = true; info.UseShellExecute = true;
info.FileName = e.Uri.AbsoluteUri; info.FileName = e.Uri.AbsoluteUri;
Process.Start(info); Process.Start(info);
e.Handled = true; e.Handled = true;
} }
*/
private void NoInfluenceSupport_Toggled(object sender, RoutedEventArgs e) { private void NoInfluenceSupport_Toggled(object sender, RoutedEventArgs e) {
Config.Global.IgnoreInfluenceSupport = this.NoInfluenceSupport.IsOn; Config.Global.IgnoreInfluenceSupport = this.NoInfluenceSupport.IsOn;