83 lines
2.2 KiB
C#
83 lines
2.2 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
|
|
namespace spplus;
|
|
|
|
public partial class MainWindow : Window
|
|
{
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void MnuExpSettings_OnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
var res = MessageBox.Show(this, "Dieses Feature ist noch nicht implementiert", "Fehlend");
|
|
}
|
|
|
|
private void MnuExit_OnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
Environment.Exit(0);
|
|
}
|
|
|
|
private void MnuHelp_OnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
try
|
|
{
|
|
Process.Start(new ProcessStartInfo
|
|
{
|
|
FileName = "https://git.mypapercloud.de/fierke/spplus/wiki",
|
|
UseShellExecute = true // Wichtig für Plattformübergreifendes Öffnen
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Console.WriteLine($"Fehler beim Öffnen des Links: {ex.Message}");
|
|
}
|
|
}
|
|
|
|
private void MnuGit_OnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
try
|
|
{
|
|
Process.Start(new ProcessStartInfo
|
|
{
|
|
FileName = "https://git.mypapercloud.de/fierke/spplus",
|
|
UseShellExecute = true // Wichtig für Plattformübergreifendes Öffnen
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Console.WriteLine($"Fehler beim Öffnen des Links: {ex.Message}");
|
|
}
|
|
}
|
|
|
|
private void MnuAbout_OnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
Window w = new();
|
|
w.WindowState = WindowState.Normal;
|
|
w.WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
|
w.Width = 300;
|
|
w.Height = 120;
|
|
Grid g = new();
|
|
TextBlock tb = new()
|
|
{
|
|
Text = "spplus v1.0.0\n(c)2026 MyPapertown, Elias Fierke"
|
|
};
|
|
g.Children.Add(tb);
|
|
w.Content = g;
|
|
w.Show();
|
|
}
|
|
|
|
private void BtnImport_OnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
// CSV Import
|
|
}
|
|
|
|
private void BtnCraftCourses_OnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
// Craft courses here / call course-crafter
|
|
}
|
|
} |