commit e11bd5a5ee990e138d2716c5d4a0c1fa0ac65e4a Author: yarou6 Date: Thu Apr 16 14:03:27 2026 +1000 Test diff --git a/.idea/.idea.AutoService/.idea/.gitignore b/.idea/.idea.AutoService/.idea/.gitignore new file mode 100644 index 0000000..eece6f3 --- /dev/null +++ b/.idea/.idea.AutoService/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/contentModel.xml +/projectSettingsUpdater.xml +/modules.xml +/.idea.AutoService.iml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.AutoService/.idea/avalonia.xml b/.idea/.idea.AutoService/.idea/avalonia.xml new file mode 100644 index 0000000..f1504d5 --- /dev/null +++ b/.idea/.idea.AutoService/.idea/avalonia.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/.idea/.idea.AutoService/.idea/encodings.xml b/.idea/.idea.AutoService/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/.idea/.idea.AutoService/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.AutoService/.idea/indexLayout.xml b/.idea/.idea.AutoService/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.AutoService/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.AutoService/.idea/vcs.xml b/.idea/.idea.AutoService/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/.idea.AutoService/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AutoService.sln b/AutoService.sln new file mode 100644 index 0000000..d98c76d --- /dev/null +++ b/AutoService.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoService", "AutoService\AutoService.csproj", "{4521FEC2-AC35-4F3B-82CE-C07700BE4FC7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4521FEC2-AC35-4F3B-82CE-C07700BE4FC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4521FEC2-AC35-4F3B-82CE-C07700BE4FC7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4521FEC2-AC35-4F3B-82CE-C07700BE4FC7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4521FEC2-AC35-4F3B-82CE-C07700BE4FC7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/AutoService.sln.DotSettings.user b/AutoService.sln.DotSettings.user new file mode 100644 index 0000000..95359ac --- /dev/null +++ b/AutoService.sln.DotSettings.user @@ -0,0 +1,2 @@ + + ForceIncluded \ No newline at end of file diff --git a/AutoService/App.axaml b/AutoService/App.axaml new file mode 100644 index 0000000..eda72a9 --- /dev/null +++ b/AutoService/App.axaml @@ -0,0 +1,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/AutoService/App.axaml.cs b/AutoService/App.axaml.cs new file mode 100644 index 0000000..d7d506a --- /dev/null +++ b/AutoService/App.axaml.cs @@ -0,0 +1,58 @@ +using System; +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Data.Core; +using Avalonia.Data.Core.Plugins; +using System.Linq; +using AutoService.ViewModels; +using AutoService.Views; +using Avalonia.Markup.Xaml; +using Microsoft.Extensions.DependencyInjection; + + +namespace AutoService; +public partial class App : Application +{ + private readonly IServiceProvider _serviceProvider; + + public App(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + } + + + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + } + + public override void OnFrameworkInitializationCompleted() + { + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + { + // Avoid duplicate validations from both Avalonia and the CommunityToolkit. + // More info: https://docs.avaloniaui.net/docs/guides/development-guides/data-validation#manage-validationplugins + DisableAvaloniaDataAnnotationValidation(); + + var vm = _serviceProvider.GetRequiredService(); + var win = _serviceProvider.GetRequiredService(); + win.DataContext = vm; + desktop.MainWindow = win; + } + + base.OnFrameworkInitializationCompleted(); + } + + private void DisableAvaloniaDataAnnotationValidation() + { + // Get an array of plugins to remove + var dataValidationPluginsToRemove = + BindingPlugins.DataValidators.OfType().ToArray(); + + // remove each entry found + foreach (var plugin in dataValidationPluginsToRemove) + { + BindingPlugins.DataValidators.Remove(plugin); + } + } +} \ No newline at end of file diff --git a/AutoService/Assets/avalonia-logo.ico b/AutoService/Assets/avalonia-logo.ico new file mode 100644 index 0000000..f7da8bb Binary files /dev/null and b/AutoService/Assets/avalonia-logo.ico differ diff --git a/AutoService/AutoService.csproj b/AutoService/AutoService.csproj new file mode 100644 index 0000000..ef15464 --- /dev/null +++ b/AutoService/AutoService.csproj @@ -0,0 +1,37 @@ + + + WinExe + net8.0 + enable + true + app.manifest + true + + + + + + + + + + + + + + + None + All + + + + + + + + + + PreserveNewest + + + diff --git a/AutoService/DB/BaseRepository.cs b/AutoService/DB/BaseRepository.cs new file mode 100644 index 0000000..27973fe --- /dev/null +++ b/AutoService/DB/BaseRepository.cs @@ -0,0 +1,50 @@ +using System; +using Microsoft.Extensions.Options; +using MySqlConnector; + +namespace AutoService.DB; + + + public abstract class BaseRepository : IDisposable + { + protected MySqlConnection connection; + + public BaseRepository(IOptions databaseConnection) + { + connection = new MySqlConnection(databaseConnection.Value.ConnectionString); + } + public bool OpenConnection() + { + try + { + connection.Open(); + return true; + } + catch (Exception e) + { + Console.WriteLine(e); + return false; + } + + } + public bool CloseConnection() + { + try + { + connection.Close(); + return true; + } + catch (Exception e) + { + Console.WriteLine(e); + return false; + } + } + + public void Dispose() + { + connection.Dispose(); + } + + + } diff --git a/AutoService/DB/DataBaseConnection.cs b/AutoService/DB/DataBaseConnection.cs new file mode 100644 index 0000000..8dadba2 --- /dev/null +++ b/AutoService/DB/DataBaseConnection.cs @@ -0,0 +1,6 @@ +namespace AutoService.DB; + +public class DataBaseConnection +{ + public string ConnectionString { get; set; } +} \ No newline at end of file diff --git a/AutoService/DB/Irepository.cs b/AutoService/DB/Irepository.cs new file mode 100644 index 0000000..bd5a236 --- /dev/null +++ b/AutoService/DB/Irepository.cs @@ -0,0 +1,8 @@ +namespace AutoService.DB; + +public interface IRepository where T : class +{ + bool OpenConnection(); + bool CloseConnection(); + +} \ No newline at end of file diff --git a/AutoService/DB/Repository/OrderRep.cs b/AutoService/DB/Repository/OrderRep.cs new file mode 100644 index 0000000..f2f4ef0 --- /dev/null +++ b/AutoService/DB/Repository/OrderRep.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using AutoService.Models; +using AutoService.Views; +using CommunityToolkit.Mvvm.ComponentModel.__Internals; +using Microsoft.Extensions.Options; +using MySqlConnector; + +namespace AutoService.DB.Repository; + +public class OrderRep : BaseRepository +{ + public OrderRep(IOptions databaseConnection) : base(databaseConnection) + { + OpenConnection(); + } + + public bool SendOrders(Order order, List worksList) + { + string sql = + "INSERT INTO `orders` values (0, @ClientName,@CarModel,@ServiceId,@TotalAmount,@DiscountPercent,@OrderDate)"; + string sql2 = "SELECT MAX(id) as id FROM `orders`"; + string sql3 = "INSERT INTO `order_items` values(0, @OrderId, @WorkId, @WorkPrice)"; + + using var transaction = connection.BeginTransaction(); + try + { + using var mc = new MySqlCommand(sql, connection, transaction); + mc.Parameters.AddWithValue("@ClientName", order.ClientName); + mc.Parameters.AddWithValue("@CarModel", order.CarModel); + mc.Parameters.AddWithValue("@ServiceId", order.ServiceID); + mc.Parameters.AddWithValue("@TotalAmount", order.TotalAmount); + mc.Parameters.AddWithValue("@DiscountPercent", order.Discount); + mc.Parameters.AddWithValue("@OrderDate", order.OrderDate); + mc.ExecuteNonQuery(); + + var id = 0; + + using (var mc2 = new MySqlCommand(sql2, connection, transaction)) + { + using (var reader = mc2.ExecuteReader()) + { + while (reader.Read()) + { + id = reader.GetInt32("id"); + } + } + } + + foreach (var work in worksList) + { + using var mc3 = new MySqlCommand(sql3, connection, transaction); + mc3.Parameters.AddWithValue("@OrderId", id); + mc3.Parameters.AddWithValue("@WorkPrice", work.Price); + mc3.Parameters.AddWithValue("@WorkId", work.Id); + mc3.ExecuteNonQuery(); + } + + transaction.Commit(); + return true; + } + catch (Exception ex) + { + Console.WriteLine(ex); + transaction.Rollback(); + return false; + } + } +} \ No newline at end of file diff --git a/AutoService/DB/Repository/ServicesRepository.cs b/AutoService/DB/Repository/ServicesRepository.cs new file mode 100644 index 0000000..f343d02 --- /dev/null +++ b/AutoService/DB/Repository/ServicesRepository.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using AutoService.Models; +using Microsoft.Extensions.Options; +using MySqlConnector; + +namespace AutoService.DB.Repository; + +public class ServicesRepository:BaseRepository +{ + public ServicesRepository(IOptions databaseConnection):base(databaseConnection) + { + OpenConnection(); + } + + public List GetServices() + { + List services = new List(); + string sql = @"SELECT `id`,`title` + FROM `services`"; + + try + { + using var cmd = new MySqlCommand(sql, connection); + using var reader = cmd.ExecuteReader(); + while (reader.Read()) + services.Add(new () + { + Id = reader.GetInt32("id"), + Title = reader.GetString("title"), + }); + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + } + + return services; + + } + + + + public void Dispose() + { + CloseConnection(); + } + + + +} \ No newline at end of file diff --git a/AutoService/DB/Repository/WorksRep.cs b/AutoService/DB/Repository/WorksRep.cs new file mode 100644 index 0000000..b535664 --- /dev/null +++ b/AutoService/DB/Repository/WorksRep.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using AutoService.Models; +using Microsoft.Extensions.Options; +using MySqlConnector; + +namespace AutoService.DB.Repository; + +public class WorksRep:BaseRepository +{ + public WorksRep(IOptions databaseConnection):base(databaseConnection) + { + OpenConnection(); + } + + public List GetWorks(int serviceID) + { + List works = new List(); + + string sql = @"SELECT * + FROM `works` + WHERE `service_id` = @serviceID"; + try + { + using var cmd = new MySqlCommand(sql, connection); + cmd.Parameters.AddWithValue("@serviceID", serviceID); + using var reader = cmd.ExecuteReader(); + while (reader.Read()) + works.Add(new () + { + Id = reader.GetInt32("id"), + ServiceID = reader.GetInt32("service_id"), + Name = reader.GetString("work_name"), + Price = reader.GetDecimal("price"), + + }); + } + catch (Exception e) + { + + Console.WriteLine(e); + } + return works; + } + public void Dispose() + { + CloseConnection(); + } + +} \ No newline at end of file diff --git a/AutoService/Models/Order.cs b/AutoService/Models/Order.cs new file mode 100644 index 0000000..0d1b18d --- /dev/null +++ b/AutoService/Models/Order.cs @@ -0,0 +1,14 @@ +using System; + +namespace AutoService.Models; + +public class Order +{ + public int Id { get; set; } + public string ClientName { get; set; } + public string CarModel { get; set; } + public int ServiceID { get; set; } + public decimal TotalAmount { get; set; } + public decimal Discount { get; set; } + public DateTime? OrderDate { get; set; } +} \ No newline at end of file diff --git a/AutoService/Models/OrdersItem.cs b/AutoService/Models/OrdersItem.cs new file mode 100644 index 0000000..9b5cace --- /dev/null +++ b/AutoService/Models/OrdersItem.cs @@ -0,0 +1,9 @@ +namespace AutoService.Models; + +public class OrdersItem +{ + public int Id { get; set; } + public int OrderId { get; set; } + public int WorkId { get; set; } + public int WorkPrice { get; set; } +} \ No newline at end of file diff --git a/AutoService/Models/SelectedWork.cs b/AutoService/Models/SelectedWork.cs new file mode 100644 index 0000000..26b99a2 --- /dev/null +++ b/AutoService/Models/SelectedWork.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; + +namespace AutoService.Models; + +public class SelectedWork +{ + public Work Work { get; set; } + public bool IsSelected { get; set; } + + public SelectedWork(Work work) + { + Work = work; + } +} \ No newline at end of file diff --git a/AutoService/Models/Services.cs b/AutoService/Models/Services.cs new file mode 100644 index 0000000..5db1356 --- /dev/null +++ b/AutoService/Models/Services.cs @@ -0,0 +1,8 @@ +namespace AutoService.Models; + +public class Services +{ + public int Id { get; set; } + public string Title { get; set; } + public string Description { get; set; } +} \ No newline at end of file diff --git a/AutoService/Models/Work.cs b/AutoService/Models/Work.cs new file mode 100644 index 0000000..5ea1e4f --- /dev/null +++ b/AutoService/Models/Work.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace AutoService.Models; + +public class Work +{ + public int Id { get; set; } + public int ServiceID { get; set; } + public string Name { get; set; } + public decimal Price { get; set; } + +} \ No newline at end of file diff --git a/AutoService/Program.cs b/AutoService/Program.cs new file mode 100644 index 0000000..593c938 --- /dev/null +++ b/AutoService/Program.cs @@ -0,0 +1,54 @@ +using Avalonia; +using System; +using AutoService.DB; +using AutoService.DB.Repository; +using AutoService.Models; +using AutoService.ViewModels; +using AutoService.Views; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace AutoService; + +sealed class Program +{ + // Initialization code. Don't use any Avalonia, third-party APIs or any + // SynchronizationContext-reliant code before AppMain is called: things aren't initialized + // yet and stuff might break. + [STAThread] + public static void Main(string[] args) + { + var host = Host.CreateDefaultBuilder() + .ConfigureAppConfiguration((context, config) => + { + config.SetBasePath(AppContext.BaseDirectory) + .AddJsonFile("appsetting.json") + .AddEnvironmentVariables(); + }) + .ConfigureServices((c, s) => + { + s.Configure(c.Configuration.GetSection("DataBaseConnection")); + s.AddTransient(); + s.AddTransient(); + s.AddTransient(); + s.AddTransient(); + s.AddTransient(); + s.AddTransient(); + s.AddTransient(); + s.AddTransient(); + s.AddTransient(); + s.AddTransient(); + s.AddTransient(); + }).Build(); + BuildAvaloniaApp(host.Services) + .StartWithClassicDesktopLifetime(args); + } + + // Avalonia configuration, don't remove; also used by visual designer. + public static AppBuilder BuildAvaloniaApp(IServiceProvider serviceProvider) + => AppBuilder.Configure(()=> new App(serviceProvider)) + .UsePlatformDetect() + .WithInterFont() + .LogToTrace(); +} \ No newline at end of file diff --git a/AutoService/ViewLocator.cs b/AutoService/ViewLocator.cs new file mode 100644 index 0000000..400d067 --- /dev/null +++ b/AutoService/ViewLocator.cs @@ -0,0 +1,30 @@ +using System; +using Avalonia.Controls; +using Avalonia.Controls.Templates; +using AutoService.ViewModels; + +namespace AutoService; + +public class ViewLocator : IDataTemplate +{ + public Control? Build(object? param) + { + if (param is null) + return null; + + var name = param.GetType().FullName!.Replace("ViewModel", "View", StringComparison.Ordinal); + var type = Type.GetType(name); + + if (type != null) + { + return (Control)Activator.CreateInstance(type)!; + } + + return new TextBlock { Text = "Not Found: " + name }; + } + + public bool Match(object? data) + { + return data is ViewModelBase; + } +} \ No newline at end of file diff --git a/AutoService/ViewModels/MainWindowViewModel.cs b/AutoService/ViewModels/MainWindowViewModel.cs new file mode 100644 index 0000000..524ec12 --- /dev/null +++ b/AutoService/ViewModels/MainWindowViewModel.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.ObjectModel; +using System.Xml; +using AutoService.DB.Repository; +using AutoService.Models; +using AutoService.Views; +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using Microsoft.Extensions.DependencyInjection; + +namespace AutoService.ViewModels; + +public partial class MainWindowViewModel : ViewModelBase +{ + private readonly IServiceProvider _serviceProvider; + [ObservableProperty] private ObservableCollection _services = new(); + private Services _service; + [ObservableProperty] private string _userName; + [ObservableProperty]private string _auto; + [ObservableProperty]private Services _selectedService; + private Order _order; + private Work _work; + private MainWindow _currentWind; + + + public MainWindowViewModel(IServiceProvider serviceProvider,Order order) + { + _serviceProvider = serviceProvider; + _order = order; + using (var rep = serviceProvider.GetService()) + { + Services = new ObservableCollection(rep.GetServices()); + }; + + SelectedService = Services[0]; + + } + + [RelayCommand] + public void SetWindow(MainWindow window) + { + _currentWind = window; + } + + + [RelayCommand] + public void StartWorkWindow() + { + _order.ClientName = UserName; + _order.CarModel = Auto; + _order.ServiceID = SelectedService.Id; + var vm = ActivatorUtilities.CreateInstance( + _serviceProvider, + SelectedService, + _order); + var win = _serviceProvider.GetRequiredService(); + win.DataContext = vm; + win.Show(); + + } + + + +} \ No newline at end of file diff --git a/AutoService/ViewModels/ReceiptWindowVM.cs b/AutoService/ViewModels/ReceiptWindowVM.cs new file mode 100644 index 0000000..5586df9 --- /dev/null +++ b/AutoService/ViewModels/ReceiptWindowVM.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using AutoService.DB.Repository; +using AutoService.Models; +using AutoService.Views; +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using Microsoft.Extensions.DependencyInjection; + +namespace AutoService.ViewModels; + +public partial class ReceiptWindowVM : ViewModelBase +{ + private readonly IServiceProvider _serviceProvider; + + [ObservableProperty] private List _worksList; + [ObservableProperty] private decimal _totalAmount; + [ObservableProperty] private int _totalSale; + [ObservableProperty] private decimal _sale; + [ObservableProperty] private decimal _totalSum; + private ReceiptWindow _currentWindow; + private Order _order; + private OrdersItem _ordersItem; + + + + public ReceiptWindowVM(IServiceProvider serviceProvider, List worksList, Order order, OrdersItem ordersItem) + { + _order = order; + _ordersItem = ordersItem; + _serviceProvider = serviceProvider; + WorksList = new List(worksList); + TotalSale = 0; + TotalAmount = 0; + Sale = 0; + TotalSum = 0; + Sum(); + + } + + void Sum() + { + foreach (var work in WorksList) + { + TotalAmount += work.Price; + } + if (TotalAmount >= 10000) + { + TotalSale = 10; + Sale = TotalAmount; + Sale *= (decimal)(10 / 100f); + } + else if (TotalAmount >= 5000) + { + TotalSale = 5; + Sale = TotalAmount; + Sale *= (decimal)(5 / 100f); + } + + TotalSum = TotalAmount - Sale; + } + + + public void SetWindow(ReceiptWindow window) + { + _currentWindow = window; + } + + [RelayCommand] + void NewOrder() + { + _currentWindow.Close(); + var win = _serviceProvider.GetRequiredService(); + win.Show(); + } + + [RelayCommand] + void Confirm() + { + _order.TotalAmount = TotalAmount; + _order.Discount = TotalSale; + _order.OrderDate = DateTime.Now; + + + using (var rep = _serviceProvider.GetRequiredService()) + { + rep.SendOrders(_order,_worksList); + } + + + } +} \ No newline at end of file diff --git a/AutoService/ViewModels/ViewModelBase.cs b/AutoService/ViewModels/ViewModelBase.cs new file mode 100644 index 0000000..964d175 --- /dev/null +++ b/AutoService/ViewModels/ViewModelBase.cs @@ -0,0 +1,7 @@ +using CommunityToolkit.Mvvm.ComponentModel; + +namespace AutoService.ViewModels; + +public class ViewModelBase : ObservableObject +{ +} \ No newline at end of file diff --git a/AutoService/ViewModels/WorksWindowVM.cs b/AutoService/ViewModels/WorksWindowVM.cs new file mode 100644 index 0000000..8d17731 --- /dev/null +++ b/AutoService/ViewModels/WorksWindowVM.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using AutoService.DB.Repository; +using AutoService.Models; +using AutoService.Views; +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using Microsoft.Extensions.DependencyInjection; + +namespace AutoService.ViewModels; + +public partial class WorksWindowVM:ViewModelBase +{ + private readonly IServiceProvider _serviceProvider; + [ObservableProperty] private ObservableCollection _worksList = new(); + [ObservableProperty] private Services _selectedService; + [ObservableProperty] private Work _selectedWork; + private Order _order; + private WorksWindow _currentWindow; + + + public WorksWindowVM(IServiceProvider serviceProvider, Services selectedService, Order order) + { + _serviceProvider = serviceProvider; + _selectedService = selectedService; + + _order = order; + + using (var rep = serviceProvider.GetService()) + { + WorksList = new ObservableCollection(rep.GetWorks(SelectedService.Id).Select(s => new SelectedWork(s))); + } + } + + [RelayCommand] + public void StartReceiptWindow() + { + List worksList = new List(); + + foreach (var selectedWork in WorksList) + { + if (selectedWork.IsSelected) + { + worksList.Add(selectedWork.Work); + } + } + + var vm = ActivatorUtilities.CreateInstance( + _serviceProvider, + _order, + worksList); + var win = _serviceProvider.GetRequiredService(); + win.DataContext = vm; + vm.SetWindow(win); + win.Show(); + + } + public void SetWindow(WorksWindow window) + { + _currentWindow = window; + } + + + [RelayCommand] + void PreviourButton() + { + var win = _serviceProvider.GetRequiredService(); + win.Show(); + } +} \ No newline at end of file diff --git a/AutoService/Views/MainWindow.axaml b/AutoService/Views/MainWindow.axaml new file mode 100644 index 0000000..25502de --- /dev/null +++ b/AutoService/Views/MainWindow.axaml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + +