more changes to Avalonia code

This commit is contained in:
Florian Stinglmayr 2024-11-18 10:16:28 +01:00
parent a95c882370
commit f08bf38bab
6 changed files with 29 additions and 18 deletions

View File

@ -50,8 +50,11 @@
<Resource Include="Salus.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.2.0" />
<PackageReference Include="Avalonia" Version="11.2.1" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.2.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.0" />
<PackageReference Include="System.Drawing.Common" Version="9.0.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>
<ItemGroup>

View File

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

View File

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

View File

@ -1,5 +1,6 @@
using System.Globalization;
using System;
using Avalonia.Data.Converters;
namespace EliteBGS;

View File

@ -63,10 +63,10 @@ namespace EliteBGS.Properties {
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Common.Icon EliteBGS {
internal static System.Drawing.Icon EliteBGS {
get {
object obj = ResourceManager.GetObject("EliteBGS", resourceCulture);
return ((System.Drawing.Common.Icon)(obj));
return ((System.Drawing.Icon)(obj));
}
}
}

View File

@ -10,6 +10,7 @@
namespace EliteBGS {
using System;
using System.Drawing;
/// <summary>
@ -63,20 +64,20 @@ namespace EliteBGS {
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap logo_v5 {
public static Bitmap logo_v5 {
get {
object obj = ResourceManager.GetObject("logo_v5", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
return ((Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon Salus {
public static Icon Salus {
get {
object obj = ResourceManager.GetObject("Salus", resourceCulture);
return ((System.Drawing.Icon)(obj));
return ((Icon)(obj));
}
}
}