Some checks failed
Avalonia Code Quality / Lint, Analyze & Build (push) Failing after 57s
58 lines
1.7 KiB
C#
58 lines
1.7 KiB
C#
using Avalonia;
|
|
using System;
|
|
using Invoice_App.Models;
|
|
|
|
namespace Invoice_App;
|
|
|
|
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)
|
|
{
|
|
TestVehicleClass();
|
|
|
|
BuildAvaloniaApp()
|
|
.StartWithClassicDesktopLifetime(args);
|
|
}
|
|
|
|
|
|
private static void TestVehicleClass()
|
|
{
|
|
var testCar = new Vehicle();
|
|
testCar.Make = "BMW";
|
|
testCar.Model = "320i";
|
|
testCar.VinNumber = "ABC123";
|
|
testCar.Kilometers = 50000;
|
|
testCar.RegistrationDate = DateTime.Now;
|
|
testCar.Comments = "Good condition";
|
|
|
|
// Test Company
|
|
var testCompany = new Company();
|
|
testCompany.CompanyName = "ABC Motors";
|
|
testCompany.Address = "Kongens Nytorv 1";
|
|
testCompany.ZipCode = "1050"; // Copenhagen K
|
|
testCompany.City = "Copenhagen";
|
|
testCompany.CVR = "12345678";
|
|
testCompany.PhoneNumber = "33123456";
|
|
|
|
// Test Customer
|
|
var testCustomer = new Customer();
|
|
testCustomer.Name = "Lars Nielsen";
|
|
testCustomer.Address = "Vesterbrogade 123";
|
|
testCustomer.ZipCode = "1620";
|
|
testCustomer.City = "Copenhagen V";
|
|
testCustomer.PhoneNumber = "23456789";
|
|
testCustomer.Email = "lars@example.com";
|
|
}
|
|
|
|
|
|
// Avalonia configuration, don't remove; also used by visual designer.
|
|
public static AppBuilder BuildAvaloniaApp()
|
|
=> AppBuilder.Configure<App>()
|
|
.UsePlatformDetect()
|
|
.WithInterFont()
|
|
.LogToTrace();
|
|
} |