From 9adf3719944fd5c7210b53fe2a3043538e58299e Mon Sep 17 00:00:00 2001 From: 1eG0ist Date: Sat, 1 Mar 2025 02:37:30 +0300 Subject: [PATCH] Did 3/6 from more info, full sponsorARunner, Registration, Menus of all roles, contactsWindow --- IposiGospodDemo/App.axaml | 9 +- IposiGospodDemo/Convertors/ImageConverter.cs | 24 ++++ IposiGospodDemo/Convertors/RunnerConverter.cs | 22 +++ IposiGospodDemo/Helpers/DbHelper.cs | 8 ++ IposiGospodDemo/IposiGospodDemo.csproj | 6 +- IposiGospodDemo/Program.cs | 4 +- IposiGospodDemo/Session.cs | 23 ++++ .../ViewModels/CharityInfoViewModel.cs | 17 +++ .../ListOfCharitiesWindowViewModel.cs | 27 ++++ .../ViewModels/MainWindowViewModel.cs | 6 +- .../MySponsorshipWindowViewModel.cs | 22 +++ .../SponsorARunnerWindowViewModel.cs | 128 ++++++++++++++++++ .../SponsorshipConfirmationWindowViewModel.cs | 17 +++ IposiGospodDemo/ViewModels/ViewModelBase.cs | 4 +- .../Views/AdministratorMenuWindow.axaml | 33 +++++ .../Views/AdministratorMenuWindow.axaml.cs | 27 ++++ .../Views/BMICalculatorWindow.axaml | 125 +++++++++++++++++ .../Views/BMICalculatorWindow.axaml.cs | 80 +++++++++++ .../Views/BMRCalculatorWindow.axaml | 96 +++++++++++++ .../Views/BMRCalculatorWindow.axaml.cs | 72 ++++++++++ IposiGospodDemo/Views/BMRInfoWindow.axaml | 38 ++++++ IposiGospodDemo/Views/BMRInfoWindow.axaml.cs | 13 ++ IposiGospodDemo/Views/CharityInfoWindow.axaml | 21 +++ .../Views/CharityInfoWindow.axaml.cs | 20 +++ IposiGospodDemo/Views/ContactsWindow.axaml | 34 +++++ IposiGospodDemo/Views/ContactsWindow.axaml.cs | 19 +++ .../Views/CoordinatorMenuWindow.axaml | 33 +++++ .../Views/CoordinatorMenuWindow.axaml.cs | 27 ++++ .../Views/EditRunnerProfileWindow.axaml | 33 +++++ .../Views/EditRunnerProfileWindow.axaml.cs | 27 ++++ .../Views/ListOfCharitiesWindow.axaml | 56 ++++++++ .../Views/ListOfCharitiesWindow.axaml.cs | 22 +++ IposiGospodDemo/Views/LoginWindow.axaml | 44 ++++++ IposiGospodDemo/Views/LoginWindow.axaml.cs | 85 ++++++++++++ IposiGospodDemo/Views/MainWindow.axaml | 41 +++++- IposiGospodDemo/Views/MainWindow.axaml.cs | 35 +++++ .../Views/MoreInformationWindow.axaml | 66 +++++++++ .../Views/MoreInformationWindow.axaml.cs | 38 ++++++ IposiGospodDemo/Views/MyResultsWindow.axaml | 33 +++++ .../Views/MyResultsWindow.axaml.cs | 27 ++++ .../Views/MySponsorshipWindow.axaml | 39 ++++++ .../Views/MySponsorshipWindow.axaml.cs | 27 ++++ .../Views/RegistrationForAnEventWindow.axaml | 33 +++++ .../RegistrationForAnEventWindow.axaml.cs | 27 ++++ IposiGospodDemo/Views/RunnerMenuWindow.axaml | 66 +++++++++ .../Views/RunnerMenuWindow.axaml.cs | 56 ++++++++ .../Views/RunnerRegistrationWindow.axaml | 9 ++ .../Views/RunnerRegistrationWindow.axaml.cs | 13 ++ .../Views/SponsorARunnerWindow.axaml | 95 +++++++++++++ .../Views/SponsorARunnerWindow.axaml.cs | 95 +++++++++++++ .../Views/SponsorRegistrationWindow.axaml | 9 ++ .../Views/SponsorRegistrationWindow.axaml.cs | 13 ++ .../Views/SponsorshipConfirmationWindow.axaml | 43 ++++++ .../SponsorshipConfirmationWindow.axaml.cs | 27 ++++ 54 files changed, 2002 insertions(+), 12 deletions(-) create mode 100644 IposiGospodDemo/Convertors/ImageConverter.cs create mode 100644 IposiGospodDemo/Convertors/RunnerConverter.cs create mode 100644 IposiGospodDemo/Helpers/DbHelper.cs create mode 100644 IposiGospodDemo/Session.cs create mode 100644 IposiGospodDemo/ViewModels/CharityInfoViewModel.cs create mode 100644 IposiGospodDemo/ViewModels/ListOfCharitiesWindowViewModel.cs create mode 100644 IposiGospodDemo/ViewModels/MySponsorshipWindowViewModel.cs create mode 100644 IposiGospodDemo/ViewModels/SponsorARunnerWindowViewModel.cs create mode 100644 IposiGospodDemo/ViewModels/SponsorshipConfirmationWindowViewModel.cs create mode 100644 IposiGospodDemo/Views/AdministratorMenuWindow.axaml create mode 100644 IposiGospodDemo/Views/AdministratorMenuWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/BMICalculatorWindow.axaml create mode 100644 IposiGospodDemo/Views/BMICalculatorWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/BMRCalculatorWindow.axaml create mode 100644 IposiGospodDemo/Views/BMRCalculatorWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/BMRInfoWindow.axaml create mode 100644 IposiGospodDemo/Views/BMRInfoWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/CharityInfoWindow.axaml create mode 100644 IposiGospodDemo/Views/CharityInfoWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/ContactsWindow.axaml create mode 100644 IposiGospodDemo/Views/ContactsWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/CoordinatorMenuWindow.axaml create mode 100644 IposiGospodDemo/Views/CoordinatorMenuWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/EditRunnerProfileWindow.axaml create mode 100644 IposiGospodDemo/Views/EditRunnerProfileWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/ListOfCharitiesWindow.axaml create mode 100644 IposiGospodDemo/Views/ListOfCharitiesWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/LoginWindow.axaml create mode 100644 IposiGospodDemo/Views/LoginWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/MoreInformationWindow.axaml create mode 100644 IposiGospodDemo/Views/MoreInformationWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/MyResultsWindow.axaml create mode 100644 IposiGospodDemo/Views/MyResultsWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/MySponsorshipWindow.axaml create mode 100644 IposiGospodDemo/Views/MySponsorshipWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/RegistrationForAnEventWindow.axaml create mode 100644 IposiGospodDemo/Views/RegistrationForAnEventWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/RunnerMenuWindow.axaml create mode 100644 IposiGospodDemo/Views/RunnerMenuWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/RunnerRegistrationWindow.axaml create mode 100644 IposiGospodDemo/Views/RunnerRegistrationWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/SponsorARunnerWindow.axaml create mode 100644 IposiGospodDemo/Views/SponsorARunnerWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/SponsorRegistrationWindow.axaml create mode 100644 IposiGospodDemo/Views/SponsorRegistrationWindow.axaml.cs create mode 100644 IposiGospodDemo/Views/SponsorshipConfirmationWindow.axaml create mode 100644 IposiGospodDemo/Views/SponsorshipConfirmationWindow.axaml.cs diff --git a/IposiGospodDemo/App.axaml b/IposiGospodDemo/App.axaml index 592dc45..c088de3 100644 --- a/IposiGospodDemo/App.axaml +++ b/IposiGospodDemo/App.axaml @@ -2,9 +2,14 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="IposiGospodDemo.App" xmlns:local="using:IposiGospodDemo" - RequestedThemeVariant="Default"> - + xmlns:global="clr-namespace:" + xmlns:convertors="clr-namespace:IposiGospodDemo.Convertors" + RequestedThemeVariant="Light"> + + + + diff --git a/IposiGospodDemo/Convertors/ImageConverter.cs b/IposiGospodDemo/Convertors/ImageConverter.cs new file mode 100644 index 0000000..eb2856c --- /dev/null +++ b/IposiGospodDemo/Convertors/ImageConverter.cs @@ -0,0 +1,24 @@ +using System; +using System.Globalization; +using System.IO; +using Avalonia.Data.Converters; +using Avalonia.Media.Imaging; + +namespace IposiGospodDemo.Convertors; + +public class ImageConverter : IValueConverter +{ + public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) + { + if (value is string path) + { + return new Bitmap(Path.Combine(Session.AssetsPath, path.Trim())); + } + return null; + } + + public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/IposiGospodDemo/Convertors/RunnerConverter.cs b/IposiGospodDemo/Convertors/RunnerConverter.cs new file mode 100644 index 0000000..303b040 --- /dev/null +++ b/IposiGospodDemo/Convertors/RunnerConverter.cs @@ -0,0 +1,22 @@ +using System; +using System.Globalization; +using System.Linq; +using Avalonia.Data.Converters; +using IposiGospodDemo.Context; + +public class RunnerConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is User user) + { + return $"{user.FirstName} {user.LastName} - {user.Runners.FirstOrDefault()?.RunnerId} ({user.Runners.FirstOrDefault()?.CountryCode})"; + } + return "Неизвестный бегун"; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/IposiGospodDemo/Helpers/DbHelper.cs b/IposiGospodDemo/Helpers/DbHelper.cs new file mode 100644 index 0000000..fde352c --- /dev/null +++ b/IposiGospodDemo/Helpers/DbHelper.cs @@ -0,0 +1,8 @@ +using IposiGospodDemo.Context; + +namespace IposiGospodDemo.Helpers; + +public static class DbHelper +{ + public static readonly User3Context Database = new(); +} \ No newline at end of file diff --git a/IposiGospodDemo/IposiGospodDemo.csproj b/IposiGospodDemo/IposiGospodDemo.csproj index 4a78317..64e6422 100644 --- a/IposiGospodDemo/IposiGospodDemo.csproj +++ b/IposiGospodDemo/IposiGospodDemo.csproj @@ -9,13 +9,13 @@ - + @@ -31,4 +31,8 @@ + + + + diff --git a/IposiGospodDemo/Program.cs b/IposiGospodDemo/Program.cs index 63c9367..e6ee683 100644 --- a/IposiGospodDemo/Program.cs +++ b/IposiGospodDemo/Program.cs @@ -1,5 +1,6 @@ using Avalonia; using System; +using Avalonia.ReactiveUI; namespace IposiGospodDemo; @@ -17,5 +18,6 @@ sealed class Program => AppBuilder.Configure() .UsePlatformDetect() .WithInterFont() - .LogToTrace(); + .LogToTrace() + .UseReactiveUI(); } \ No newline at end of file diff --git a/IposiGospodDemo/Session.cs b/IposiGospodDemo/Session.cs new file mode 100644 index 0000000..668bb9d --- /dev/null +++ b/IposiGospodDemo/Session.cs @@ -0,0 +1,23 @@ +using System; +using IposiGospodDemo.Context; + +namespace IposiGospodDemo; + +public static class Session +{ + public static readonly String Title = "MARATHON SKILLS 2016"; + public static readonly DateTime MarathonData = new DateTime(2025, 4, 1, 12, 0, 0); + public static readonly String Location = "Москва, Россия"; + public static readonly String Data = "Вторник 1 апреля 2025"; + public static String RemainingTime = CalculateRemaningTime(); + public static string AssetsPath = null!; + public static User User = null; + + public static String CalculateRemaningTime() + { + TimeSpan timeLeft = MarathonData - DateTime.Now; + return RemainingTime = timeLeft.TotalSeconds > 0 + ? $"{timeLeft.Days} д. {timeLeft.Hours} ч. {timeLeft.Minutes} мин. до старта марафона" + : "Марафон уже начался!"; + } +} \ No newline at end of file diff --git a/IposiGospodDemo/ViewModels/CharityInfoViewModel.cs b/IposiGospodDemo/ViewModels/CharityInfoViewModel.cs new file mode 100644 index 0000000..318c9c2 --- /dev/null +++ b/IposiGospodDemo/ViewModels/CharityInfoViewModel.cs @@ -0,0 +1,17 @@ +using IposiGospodDemo.Context; + +namespace IposiGospodDemo.ViewModels; + +public class CharityInfoViewModel +{ + public string Name { get; } + public string ImagePath { get; } + public string Description { get; } + + public CharityInfoViewModel(Charity charity) + { + Name = charity.CharityName; + ImagePath = charity.CharityLogo; + Description = charity.CharityDescription; + } +} \ No newline at end of file diff --git a/IposiGospodDemo/ViewModels/ListOfCharitiesWindowViewModel.cs b/IposiGospodDemo/ViewModels/ListOfCharitiesWindowViewModel.cs new file mode 100644 index 0000000..0d8cfdc --- /dev/null +++ b/IposiGospodDemo/ViewModels/ListOfCharitiesWindowViewModel.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using IposiGospodDemo.Context; +using IposiGospodDemo.Helpers; +using ReactiveUI; + +namespace IposiGospodDemo.ViewModels; + +public class ListOfCharitiesWindowViewModel : ViewModelBase +{ + private ObservableCollection _charities; + + public ObservableCollection Charities + { + get => _charities; + set => this.RaiseAndSetIfChanged(ref _charities, value); + } + + public ListOfCharitiesWindowViewModel() + { + Charities = new(DbHelper.Database.Charities.ToList()); + Console.WriteLine(Charities); + Console.WriteLine(Charities.Count); + } +} \ No newline at end of file diff --git a/IposiGospodDemo/ViewModels/MainWindowViewModel.cs b/IposiGospodDemo/ViewModels/MainWindowViewModel.cs index b302748..cdf2196 100644 --- a/IposiGospodDemo/ViewModels/MainWindowViewModel.cs +++ b/IposiGospodDemo/ViewModels/MainWindowViewModel.cs @@ -1,6 +1,8 @@ -namespace IposiGospodDemo.ViewModels; +using System; +using System.Timers; + +namespace IposiGospodDemo.ViewModels; public partial class MainWindowViewModel : ViewModelBase { - public string Greeting { get; } = "Welcome to Avalonia!"; } \ No newline at end of file diff --git a/IposiGospodDemo/ViewModels/MySponsorshipWindowViewModel.cs b/IposiGospodDemo/ViewModels/MySponsorshipWindowViewModel.cs new file mode 100644 index 0000000..a87b290 --- /dev/null +++ b/IposiGospodDemo/ViewModels/MySponsorshipWindowViewModel.cs @@ -0,0 +1,22 @@ +using System.Collections.ObjectModel; +using IposiGospodDemo.Context; +using ReactiveUI; + +namespace IposiGospodDemo.ViewModels; + +public class MySponsorshipWindowViewModel : ViewModelBase +{ + + private ObservableCollection _registrations; + + public ObservableCollection Registrations + { + get => _registrations; + set => this.RaiseAndSetIfChanged(ref _registrations, value); + } + + public MySponsorshipWindowViewModel() + { + + } +} \ No newline at end of file diff --git a/IposiGospodDemo/ViewModels/SponsorARunnerWindowViewModel.cs b/IposiGospodDemo/ViewModels/SponsorARunnerWindowViewModel.cs new file mode 100644 index 0000000..253965a --- /dev/null +++ b/IposiGospodDemo/ViewModels/SponsorARunnerWindowViewModel.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reactive; +using IposiGospodDemo.Context; +using IposiGospodDemo.Helpers; +using IposiGospodDemo.Views; +using Microsoft.EntityFrameworkCore; +using ReactiveUI; + +namespace IposiGospodDemo.ViewModels; + +public class SponsorARunnerWindowViewModel : ViewModelBase +{ + public List Runners { get; set; } + + private Runner _selectedRunner; + + public Runner SelectedRunner + { + get => _selectedRunner; + set + { + if (_selectedRunner != value) + { + _selectedRunner = value; + this.RaisePropertyChanged(); + } + SelectedCharity = value?.Registrations?.FirstOrDefault()?.Charity; + } + } + + private Charity _selectedCharity; + + public Charity SelectedCharity + { + get => _selectedCharity; + set => this.RaiseAndSetIfChanged(ref _selectedCharity, value); + } + + private decimal _sum = 50; + + public decimal Sum + { + get => _sum; + set => this.RaiseAndSetIfChanged(ref _sum, value); + } + + private string _sponsorName; + public string SponsorName + { + get => _sponsorName; + set => this.RaiseAndSetIfChanged(ref _sponsorName, value); + } + + private string _cardOwner; + public string CardOwner + { + get => _cardOwner; + set => this.RaiseAndSetIfChanged(ref _cardOwner, value); + } + + private string _cardNumber; + public string CardNumber + { + get => _cardNumber; + set => this.RaiseAndSetIfChanged(ref _cardNumber, value); + } + + private string _month; + public string Month + { + get => _month; + set => this.RaiseAndSetIfChanged(ref _month, value); + } + + private string _year; + public string Year + { + get => _year; + set => this.RaiseAndSetIfChanged(ref _year, value); + } + + private string _cvc; + public string Cvc + { + get => _cvc; + set => this.RaiseAndSetIfChanged(ref _cvc, value); + } + + + public ReactiveCommand IncreaseSumCommand { get; } + public ReactiveCommand DecreaseSumCommand { get; } + + public ReactiveCommand OpenCharityInfoWindow { get; } + + public SponsorARunnerWindowViewModel() + { + Runners = DbHelper.Database.Runners + .Include(r => r.CountryCodeNavigation) + .Include(r => r.EmailNavigation) + .Include(r => r.Registrations) + .ThenInclude(reg => reg.Charity) + .ToList(); + SelectedRunner = Runners[0]; + + IncreaseSumCommand = ReactiveCommand.Create(IncreaseSum); + DecreaseSumCommand = ReactiveCommand.Create(DecreaseSum); + OpenCharityInfoWindow = ReactiveCommand.Create(OpenCharityInfoWindowFunc); + } + + void DecreaseSum() + { + if (Sum < 11) + Sum = 1; + else Sum -= 10; + } + + void IncreaseSum() + { + Sum += 10; + } + + void OpenCharityInfoWindowFunc() + { + new CharityInfoWindow(SelectedCharity).Show(); + } +} \ No newline at end of file diff --git a/IposiGospodDemo/ViewModels/SponsorshipConfirmationWindowViewModel.cs b/IposiGospodDemo/ViewModels/SponsorshipConfirmationWindowViewModel.cs new file mode 100644 index 0000000..f2ecf1b --- /dev/null +++ b/IposiGospodDemo/ViewModels/SponsorshipConfirmationWindowViewModel.cs @@ -0,0 +1,17 @@ +using System; +using IposiGospodDemo.Context; + +namespace IposiGospodDemo.ViewModels; + +public class SponsorshipConfirmationWindowViewModel : ViewModelBase +{ + public User SupportedRunner { get; set; } + public decimal Amount { get; set; } + public String CharityName { get; set; } + public SponsorshipConfirmationWindowViewModel(User user, decimal amount, String charityName) + { + SupportedRunner = user; + Amount = amount; + CharityName = charityName; + } +} \ No newline at end of file diff --git a/IposiGospodDemo/ViewModels/ViewModelBase.cs b/IposiGospodDemo/ViewModels/ViewModelBase.cs index e34965f..73af7b4 100644 --- a/IposiGospodDemo/ViewModels/ViewModelBase.cs +++ b/IposiGospodDemo/ViewModels/ViewModelBase.cs @@ -1,7 +1,7 @@ -using CommunityToolkit.Mvvm.ComponentModel; +using ReactiveUI; namespace IposiGospodDemo.ViewModels; -public class ViewModelBase : ObservableObject +public class ViewModelBase : ReactiveObject { } \ No newline at end of file diff --git a/IposiGospodDemo/Views/AdministratorMenuWindow.axaml b/IposiGospodDemo/Views/AdministratorMenuWindow.axaml new file mode 100644 index 0000000..a2be77c --- /dev/null +++ b/IposiGospodDemo/Views/AdministratorMenuWindow.axaml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IposiGospodDemo/Views/MoreInformationWindow.axaml.cs b/IposiGospodDemo/Views/MoreInformationWindow.axaml.cs new file mode 100644 index 0000000..7d43683 --- /dev/null +++ b/IposiGospodDemo/Views/MoreInformationWindow.axaml.cs @@ -0,0 +1,38 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; + +namespace IposiGospodDemo.Views; + +public partial class MoreInformationWindow : Window +{ + public MoreInformationWindow() + { + InitializeComponent(); + } + + private void GoBack_OnClick(object? sender, RoutedEventArgs e) + { + new MainWindow().Show(); + Close(); + } + + private void SwapToBMICalculatorWindow_OnClick(object? sender, RoutedEventArgs e) + { + new BMICalculatorWindow().Show(); + Close(); + } + + private void SwapToBMRCalculatorWindow_OnClick(object? sender, RoutedEventArgs e) + { + new BMRCalculatorWindow().Show(); + Close(); + } + + private void SwapToListOfCharitiesWindow_OnClick(object? sender, RoutedEventArgs e) + { + new ListOfCharitiesWindow().Show(); + Close(); + } +} \ No newline at end of file diff --git a/IposiGospodDemo/Views/MyResultsWindow.axaml b/IposiGospodDemo/Views/MyResultsWindow.axaml new file mode 100644 index 0000000..3b308b2 --- /dev/null +++ b/IposiGospodDemo/Views/MyResultsWindow.axaml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + diff --git a/IposiGospodDemo/Views/RunnerMenuWindow.axaml.cs b/IposiGospodDemo/Views/RunnerMenuWindow.axaml.cs new file mode 100644 index 0000000..7d30982 --- /dev/null +++ b/IposiGospodDemo/Views/RunnerMenuWindow.axaml.cs @@ -0,0 +1,56 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; + +namespace IposiGospodDemo.Views; + +public partial class RunnerMenuWindow : Window +{ + public RunnerMenuWindow() + { + InitializeComponent(); + } + + private void GoBack_OnClick(object? sender, RoutedEventArgs e) + { + new MainWindow().Show(); + Close(); + } + + private void Logout_OnClick(object? sender, RoutedEventArgs e) + { + Session.User = null; + new MainWindow().Show(); + Close(); + } + + private void RegistrationOnMarathon_OnClick(object? sender, RoutedEventArgs e) + { + new RegistrationForAnEventWindow().Show(); + Close(); + } + + private void EditProfile_OnClick(object? sender, RoutedEventArgs e) + { + new EditRunnerProfileWindow().Show(); + Close(); + } + + private void Contacts_OnClick(object? sender, RoutedEventArgs e) + { + new ContactsWindow().Show(); + } + + private void MyResults_OnClick(object? sender, RoutedEventArgs e) + { + new MyResultsWindow().Show(); + Close(); + } + + private void MySponsor_OnClick(object? sender, RoutedEventArgs e) + { + new MySponsorshipWindow().Show(); + Close(); + } +} \ No newline at end of file diff --git a/IposiGospodDemo/Views/RunnerRegistrationWindow.axaml b/IposiGospodDemo/Views/RunnerRegistrationWindow.axaml new file mode 100644 index 0000000..0af5cce --- /dev/null +++ b/IposiGospodDemo/Views/RunnerRegistrationWindow.axaml @@ -0,0 +1,9 @@ + + Welcome to Avalonia! + diff --git a/IposiGospodDemo/Views/RunnerRegistrationWindow.axaml.cs b/IposiGospodDemo/Views/RunnerRegistrationWindow.axaml.cs new file mode 100644 index 0000000..57c4914 --- /dev/null +++ b/IposiGospodDemo/Views/RunnerRegistrationWindow.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace IposiGospodDemo.Views; + +public partial class RunnerRegistrationWindow : Window +{ + public RunnerRegistrationWindow() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/IposiGospodDemo/Views/SponsorARunnerWindow.axaml b/IposiGospodDemo/Views/SponsorARunnerWindow.axaml new file mode 100644 index 0000000..96393f0 --- /dev/null +++ b/IposiGospodDemo/Views/SponsorARunnerWindow.axaml @@ -0,0 +1,95 @@ + + + + +