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" /> <Resource Include="Salus.ico" />
</ItemGroup> </ItemGroup>
<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="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" /> <PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

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;

View File

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

View File

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

View File

@ -10,8 +10,9 @@
namespace EliteBGS { namespace EliteBGS {
using System; using System;
using System.Drawing;
/// <summary> /// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc. /// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary> /// </summary>
@ -23,15 +24,15 @@ namespace EliteBGS {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources { public class Resources {
private static global::System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() { internal Resources() {
} }
/// <summary> /// <summary>
/// Returns the cached ResourceManager instance used by this class. /// Returns the cached ResourceManager instance used by this class.
/// </summary> /// </summary>
@ -45,7 +46,7 @@ namespace EliteBGS {
return resourceMan; return resourceMan;
} }
} }
/// <summary> /// <summary>
/// Overrides the current thread's CurrentUICulture property for all /// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class. /// resource lookups using this strongly typed resource class.
@ -59,24 +60,24 @@ namespace EliteBGS {
resourceCulture = value; resourceCulture = value;
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>
public static System.Drawing.Bitmap logo_v5 { public static Bitmap logo_v5 {
get { get {
object obj = ResourceManager.GetObject("logo_v5", resourceCulture); object obj = ResourceManager.GetObject("logo_v5", resourceCulture);
return ((System.Drawing.Bitmap)(obj)); return ((Bitmap)(obj));
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary> /// </summary>
public static System.Drawing.Icon Salus { public static Icon Salus {
get { get {
object obj = ResourceManager.GetObject("Salus", resourceCulture); object obj = ResourceManager.GetObject("Salus", resourceCulture);
return ((System.Drawing.Icon)(obj)); return ((Icon)(obj));
} }
} }
} }