diff --git a/works/demo/1/demka/demka.sln b/works/demo/1/demka/demka.sln new file mode 100644 index 0000000..3905225 --- /dev/null +++ b/works/demo/1/demka/demka.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "demka", "demka\demka.csproj", "{BE29E09C-CEF5-40A7-B437-DF98152650C1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BE29E09C-CEF5-40A7-B437-DF98152650C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE29E09C-CEF5-40A7-B437-DF98152650C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE29E09C-CEF5-40A7-B437-DF98152650C1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE29E09C-CEF5-40A7-B437-DF98152650C1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/works/demo/1/demo/demo/App.axaml b/works/demo/1/demka/demka/App.axaml similarity index 86% rename from works/demo/1/demo/demo/App.axaml rename to works/demo/1/demka/demka/App.axaml index 42b610b..27a6611 100644 --- a/works/demo/1/demo/demo/App.axaml +++ b/works/demo/1/demka/demka/App.axaml @@ -1,7 +1,7 @@ diff --git a/works/demo/1/demo/demo/App.axaml.cs b/works/demo/1/demka/demka/App.axaml.cs similarity index 82% rename from works/demo/1/demo/demo/App.axaml.cs rename to works/demo/1/demka/demka/App.axaml.cs index c4cb9e9..2981ad1 100644 --- a/works/demo/1/demo/demo/App.axaml.cs +++ b/works/demo/1/demka/demka/App.axaml.cs @@ -1,10 +1,10 @@ using Avalonia; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Markup.Xaml; -using demo.ViewModels; -using demo.Views; +using demka.ViewModels; +using demka.Views; -namespace demo; +namespace demka; public partial class App : Application { @@ -19,7 +19,7 @@ public partial class App : Application { desktop.MainWindow = new MainWindow { - DataContext = new MainViewModel() + DataContext = new MainViewModel(), }; } diff --git a/works/demo/1/demo/demo/Assets/avalonia-logo.ico b/works/demo/1/demka/demka/Assets/avalonia-logo.ico similarity index 100% rename from works/demo/1/demo/demo/Assets/avalonia-logo.ico rename to works/demo/1/demka/demka/Assets/avalonia-logo.ico diff --git a/works/demo/1/demka/demka/Models/IdCategory.cs b/works/demo/1/demka/demka/Models/IdCategory.cs new file mode 100644 index 0000000..fd8c5a5 --- /dev/null +++ b/works/demo/1/demka/demka/Models/IdCategory.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; + +namespace demka.Models; + +public partial class IdCategory +{ + public int? IdCategory1 { get; set; } + + public string? NameCategory { get; set; } +} diff --git a/works/demo/1/demka/demka/Models/IdManufacturer.cs b/works/demo/1/demka/demka/Models/IdManufacturer.cs new file mode 100644 index 0000000..2683c79 --- /dev/null +++ b/works/demo/1/demka/demka/Models/IdManufacturer.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; + +namespace demka.Models; + +public partial class IdManufacturer +{ + public int? IdManufacturer1 { get; set; } + + public string? NameManufacturer { get; set; } +} diff --git a/works/demo/1/demka/demka/Models/IdOrder.cs b/works/demo/1/demka/demka/Models/IdOrder.cs new file mode 100644 index 0000000..46ad0b8 --- /dev/null +++ b/works/demo/1/demka/demka/Models/IdOrder.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +namespace demka.Models; + +public partial class IdOrder +{ + public int? IdOrder1 { get; set; } + + public int? IdProduct { get; set; } + + public int? Quantity { get; set; } +} diff --git a/works/demo/1/demka/demka/Models/IdProduct.cs b/works/demo/1/demka/demka/Models/IdProduct.cs new file mode 100644 index 0000000..c404ba3 --- /dev/null +++ b/works/demo/1/demka/demka/Models/IdProduct.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; + +namespace demka.Models; + +public partial class IdProduct +{ + public int? IdProduct1 { get; set; } + + public string? Article { get; set; } + + public string? Name { get; set; } + + public int? IdUnit { get; set; } + + public int? Price { get; set; } + + public int? IdSupplier { get; set; } + + public int? IdManufacturer { get; set; } + + public int? IdCategory { get; set; } + + public int? Discount { get; set; } + + public int? StockQty { get; set; } + + public string? Description { get; set; } + + public string? Photo { get; set; } +} diff --git a/works/demo/1/demka/demka/Models/IdStatus.cs b/works/demo/1/demka/demka/Models/IdStatus.cs new file mode 100644 index 0000000..3acd30f --- /dev/null +++ b/works/demo/1/demka/demka/Models/IdStatus.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; + +namespace demka.Models; + +public partial class IdStatus +{ + public int? IdStatus1 { get; set; } + + public string? NameStatus { get; set; } +} diff --git a/works/demo/1/demka/demka/Models/IdSupplier.cs b/works/demo/1/demka/demka/Models/IdSupplier.cs new file mode 100644 index 0000000..4b84728 --- /dev/null +++ b/works/demo/1/demka/demka/Models/IdSupplier.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; + +namespace demka.Models; + +public partial class IdSupplier +{ + public int? IdSupplier1 { get; set; } + + public string? NameSupplier { get; set; } +} diff --git a/works/demo/1/demka/demka/Models/IdUnit.cs b/works/demo/1/demka/demka/Models/IdUnit.cs new file mode 100644 index 0000000..9787dab --- /dev/null +++ b/works/demo/1/demka/demka/Models/IdUnit.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; + +namespace demka.Models; + +public partial class IdUnit +{ + public int? IdUnit1 { get; set; } + + public string? NameUnit { get; set; } +} diff --git a/works/demo/1/demka/demka/Models/PostgresContext.cs b/works/demo/1/demka/demka/Models/PostgresContext.cs new file mode 100644 index 0000000..8223ff4 --- /dev/null +++ b/works/demo/1/demka/demka/Models/PostgresContext.cs @@ -0,0 +1,222 @@ +using System; +using System.Collections.Generic; +using Microsoft.EntityFrameworkCore; + +namespace demka.Models; + +public partial class PostgresContext : DbContext +{ + public PostgresContext() + { + } + + public PostgresContext(DbContextOptions options) + : base(options) + { + } + + public virtual DbSet IdCategories { get; set; } + + public virtual DbSet IdManufacturers { get; set; } + + public virtual DbSet IdOrders { get; set; } + + public virtual DbSet IdProducts { get; set; } + + public virtual DbSet IdStatuses { get; set; } + + public virtual DbSet IdSuppliers { get; set; } + + public virtual DbSet IdUnits { get; set; } + + public virtual DbSet RoleIds { get; set; } + + public virtual DbSet Tovars { get; set; } + + public virtual DbSet UserIds { get; set; } + + public virtual DbSet<ЗаказImport> ЗаказImports { get; set; } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) +#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263. + => optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=postgres;Username=postgres;Password=mysecretpassword"); + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity + .HasNoKey() + .ToTable("id_category"); + + entity.Property(e => e.IdCategory1).HasColumnName("id_category"); + entity.Property(e => e.NameCategory) + .HasMaxLength(50) + .HasColumnName("name_category"); + }); + + modelBuilder.Entity(entity => + { + entity + .HasNoKey() + .ToTable("id_manufacturer"); + + entity.Property(e => e.IdManufacturer1).HasColumnName("id_manufacturer"); + entity.Property(e => e.NameManufacturer) + .HasMaxLength(50) + .HasColumnName("name_manufacturer"); + }); + + modelBuilder.Entity(entity => + { + entity + .HasNoKey() + .ToTable("id_order"); + + entity.Property(e => e.IdOrder1).HasColumnName("id_order"); + entity.Property(e => e.IdProduct).HasColumnName("id_product"); + entity.Property(e => e.Quantity).HasColumnName("quantity"); + }); + + modelBuilder.Entity(entity => + { + entity + .HasNoKey() + .ToTable("id_product"); + + entity.Property(e => e.Article) + .HasMaxLength(50) + .HasColumnName("article"); + entity.Property(e => e.Description) + .HasMaxLength(128) + .HasColumnName("description"); + entity.Property(e => e.Discount).HasColumnName("discount"); + entity.Property(e => e.IdCategory).HasColumnName("id_category"); + entity.Property(e => e.IdManufacturer).HasColumnName("id_manufacturer"); + entity.Property(e => e.IdProduct1).HasColumnName("id_product"); + entity.Property(e => e.IdSupplier).HasColumnName("id_supplier"); + entity.Property(e => e.IdUnit).HasColumnName("id_unit"); + entity.Property(e => e.Name) + .HasMaxLength(50) + .HasColumnName("name"); + entity.Property(e => e.Photo) + .HasMaxLength(50) + .HasColumnName("photo"); + entity.Property(e => e.Price).HasColumnName("price"); + entity.Property(e => e.StockQty).HasColumnName("stock_qty"); + }); + + modelBuilder.Entity(entity => + { + entity + .HasNoKey() + .ToTable("id_status"); + + entity.Property(e => e.IdStatus1).HasColumnName("id_status"); + entity.Property(e => e.NameStatus) + .HasMaxLength(50) + .HasColumnName("name_status"); + }); + + modelBuilder.Entity(entity => + { + entity + .HasNoKey() + .ToTable("id_supplier"); + + entity.Property(e => e.IdSupplier1).HasColumnName("id_supplier"); + entity.Property(e => e.NameSupplier) + .HasMaxLength(50) + .HasColumnName("name_supplier"); + }); + + modelBuilder.Entity(entity => + { + entity + .HasNoKey() + .ToTable("id_unit"); + + entity.Property(e => e.IdUnit1).HasColumnName("id_unit"); + entity.Property(e => e.NameUnit) + .HasMaxLength(50) + .HasColumnName("name_unit"); + }); + + modelBuilder.Entity(entity => + { + entity + .HasNoKey() + .ToTable("role_id"); + + entity.Property(e => e.IdRole).HasColumnName("id_role"); + entity.Property(e => e.NameRole) + .HasMaxLength(50) + .HasColumnName("name_role"); + }); + + modelBuilder.Entity(entity => + { + entity + .HasNoKey() + .ToTable("tovar"); + + entity.Property(e => e.City) + .HasMaxLength(50) + .HasColumnName("city"); + entity.Property(e => e.Column10).HasMaxLength(50); + entity.Property(e => e.Column11).HasMaxLength(50); + entity.Property(e => e.Column6).HasMaxLength(50); + entity.Property(e => e.Column7).HasMaxLength(50); + entity.Property(e => e.Column8).HasMaxLength(50); + entity.Property(e => e.Column9).HasMaxLength(50); + entity.Property(e => e.House).HasColumnName("house"); + entity.Property(e => e.IdPoint).HasColumnName("id_point"); + entity.Property(e => e.Index).HasColumnName("index"); + entity.Property(e => e.Street) + .HasMaxLength(50) + .HasColumnName("street"); + }); + + modelBuilder.Entity(entity => + { + entity + .HasNoKey() + .ToTable("user_id"); + + entity.Property(e => e.FullName) + .HasMaxLength(50) + .HasColumnName("full_name"); + entity.Property(e => e.IdRole).HasColumnName("id_role"); + entity.Property(e => e.IdUser).HasColumnName("id_user"); + entity.Property(e => e.Login) + .HasMaxLength(50) + .HasColumnName("login"); + entity.Property(e => e.Password) + .HasMaxLength(50) + .HasColumnName("password"); + }); + + modelBuilder.Entity<ЗаказImport>(entity => + { + entity + .HasNoKey() + .ToTable("заказ_import"); + + entity.Property(e => e.DeliveryDate) + .HasMaxLength(50) + .HasColumnName("delivery_date"); + entity.Property(e => e.IdOrder).HasColumnName("id_order"); + entity.Property(e => e.IdPoint).HasColumnName("id_point"); + entity.Property(e => e.IdStatus).HasColumnName("id_status"); + entity.Property(e => e.IdUser).HasColumnName("id_user"); + entity.Property(e => e.OrderDate) + .HasMaxLength(50) + .HasColumnName("order_date"); + entity.Property(e => e.ReceiveCode).HasColumnName("receive_code"); + }); + + OnModelCreatingPartial(modelBuilder); + } + + partial void OnModelCreatingPartial(ModelBuilder modelBuilder); +} diff --git a/works/demo/1/demka/demka/Models/RoleId.cs b/works/demo/1/demka/demka/Models/RoleId.cs new file mode 100644 index 0000000..8a92f21 --- /dev/null +++ b/works/demo/1/demka/demka/Models/RoleId.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; + +namespace demka.Models; + +public partial class RoleId +{ + public int? IdRole { get; set; } + + public string? NameRole { get; set; } +} diff --git a/works/demo/1/demka/demka/Models/Tovar.cs b/works/demo/1/demka/demka/Models/Tovar.cs new file mode 100644 index 0000000..92a0f49 --- /dev/null +++ b/works/demo/1/demka/demka/Models/Tovar.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; + +namespace demka.Models; + +public partial class Tovar +{ + public int? IdPoint { get; set; } + + public int? Index { get; set; } + + public string? City { get; set; } + + public string? Street { get; set; } + + public int? House { get; set; } + + public string? Column6 { get; set; } + + public string? Column7 { get; set; } + + public string? Column8 { get; set; } + + public string? Column9 { get; set; } + + public string? Column10 { get; set; } + + public string? Column11 { get; set; } +} diff --git a/works/demo/1/demka/demka/Models/UserId.cs b/works/demo/1/demka/demka/Models/UserId.cs new file mode 100644 index 0000000..cc9fe84 --- /dev/null +++ b/works/demo/1/demka/demka/Models/UserId.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace demka.Models; + +public partial class UserId +{ + public int? IdUser { get; set; } + + public string? FullName { get; set; } + + public string? Login { get; set; } + + public string? Password { get; set; } + + public int? IdRole { get; set; } +} diff --git a/works/demo/1/demka/demka/Models/ЗаказImport.cs b/works/demo/1/demka/demka/Models/ЗаказImport.cs new file mode 100644 index 0000000..a60b650 --- /dev/null +++ b/works/demo/1/demka/demka/Models/ЗаказImport.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace demka.Models; + +public partial class ЗаказImport +{ + public int? IdOrder { get; set; } + + public string? OrderDate { get; set; } + + public string? DeliveryDate { get; set; } + + public int? IdPoint { get; set; } + + public int? IdUser { get; set; } + + public int? ReceiveCode { get; set; } + + public int? IdStatus { get; set; } +} diff --git a/works/demo/1/demo/demo.Desktop/Program.cs b/works/demo/1/demka/demka/Program.cs similarity index 85% rename from works/demo/1/demo/demo.Desktop/Program.cs rename to works/demo/1/demka/demka/Program.cs index ad5f26e..43a8ff4 100644 --- a/works/demo/1/demo/demo.Desktop/Program.cs +++ b/works/demo/1/demka/demka/Program.cs @@ -1,7 +1,7 @@ -using System; -using Avalonia; +using Avalonia; +using System; -namespace demo.Desktop; +namespace demka; sealed class Program { @@ -16,6 +16,9 @@ sealed class Program public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure() .UsePlatformDetect() +#if DEBUG + .WithDeveloperTools() +#endif .WithInterFont() .LogToTrace(); } \ No newline at end of file diff --git a/works/demo/1/demo/demo/ViewLocator.cs b/works/demo/1/demka/demka/ViewLocator.cs similarity index 95% rename from works/demo/1/demo/demo/ViewLocator.cs rename to works/demo/1/demka/demka/ViewLocator.cs index 41a03ea..76b60a5 100644 --- a/works/demo/1/demo/demo/ViewLocator.cs +++ b/works/demo/1/demka/demka/ViewLocator.cs @@ -2,9 +2,9 @@ using System; using System.Diagnostics.CodeAnalysis; using Avalonia.Controls; using Avalonia.Controls.Templates; -using demo.ViewModels; +using demka.ViewModels; -namespace demo; +namespace demka; /// /// Given a view model, returns the corresponding view if possible. diff --git a/works/demo/1/demka/demka/ViewModels/MainViewModel.cs b/works/demo/1/demka/demka/ViewModels/MainViewModel.cs new file mode 100644 index 0000000..0854b78 --- /dev/null +++ b/works/demo/1/demka/demka/ViewModels/MainViewModel.cs @@ -0,0 +1,8 @@ +using CommunityToolkit.Mvvm.ComponentModel; + +namespace demka.ViewModels; + +public partial class MainViewModel : ViewModelBase +{ + [ObservableProperty] public partial string Greeting { get; set; } = "Welcome to Avalonia!"; +} \ No newline at end of file diff --git a/works/demo/1/demo/demo/ViewModels/ViewModelBase.cs b/works/demo/1/demka/demka/ViewModels/ViewModelBase.cs similarity index 79% rename from works/demo/1/demo/demo/ViewModels/ViewModelBase.cs rename to works/demo/1/demka/demka/ViewModels/ViewModelBase.cs index 647cca7..ebb2ef5 100644 --- a/works/demo/1/demo/demo/ViewModels/ViewModelBase.cs +++ b/works/demo/1/demka/demka/ViewModels/ViewModelBase.cs @@ -1,6 +1,6 @@ using CommunityToolkit.Mvvm.ComponentModel; -namespace demo.ViewModels; +namespace demka.ViewModels; public abstract class ViewModelBase : ObservableObject { diff --git a/works/demo/1/demka/demka/Views/MainWindow.axaml b/works/demo/1/demka/demka/Views/MainWindow.axaml new file mode 100644 index 0000000..e0f8fe8 --- /dev/null +++ b/works/demo/1/demka/demka/Views/MainWindow.axaml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/works/demo/1/demka/demka/Views/MainWindow.axaml.cs b/works/demo/1/demka/demka/Views/MainWindow.axaml.cs new file mode 100644 index 0000000..76da3fa --- /dev/null +++ b/works/demo/1/demka/demka/Views/MainWindow.axaml.cs @@ -0,0 +1,24 @@ +using Avalonia.Controls; +using Microsoft.EntityFrameworkCore; +using demka.Models; +using System.Linq; + +namespace demka.Views +{ + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + + // создание контекста базы данных + using var context = new PostgresContext(); + + + var items = context.Tovars.ToList(); + + // установка источника данных в code-behind + ProductList.ItemsSource = items; + } + } +} \ No newline at end of file diff --git a/works/demo/1/demo/demo.Desktop/app.manifest b/works/demo/1/demka/demka/app.manifest similarity index 93% rename from works/demo/1/demo/demo.Desktop/app.manifest rename to works/demo/1/demka/demka/app.manifest index 53fabcb..8efffbb 100644 --- a/works/demo/1/demo/demo.Desktop/app.manifest +++ b/works/demo/1/demka/demka/app.manifest @@ -3,7 +3,7 @@ - + diff --git a/works/demo/1/demo/demo/demo.csproj b/works/demo/1/demka/demka/demka.csproj similarity index 59% rename from works/demo/1/demo/demo/demo.csproj rename to works/demo/1/demka/demka/demka.csproj index 8440b33..626eb9a 100644 --- a/works/demo/1/demo/demo/demo.csproj +++ b/works/demo/1/demka/demka/demka.csproj @@ -1,27 +1,30 @@  + WinExe net10.0 enable - latest + app.manifest + - - - - + + + + + None All - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/works/demo/1/demo/.gitignore b/works/demo/1/demo/.gitignore deleted file mode 100644 index 8afdcb6..0000000 --- a/works/demo/1/demo/.gitignore +++ /dev/null @@ -1,454 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# Tye -.tye/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -## -## Visual studio for Mac -## - - -# globs -Makefile.in -*.userprefs -*.usertasks -config.make -config.status -aclocal.m4 -install-sh -autom4te.cache/ -*.tar.gz -tarballs/ -test-results/ - -# Mac bundle stuff -*.dmg -*.app - -# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# JetBrains Rider -.idea/ -*.sln.iml - -## -## Visual Studio Code -## -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json diff --git a/works/demo/1/demo/Directory.Packages.props b/works/demo/1/demo/Directory.Packages.props deleted file mode 100644 index 6eb31ad..0000000 --- a/works/demo/1/demo/Directory.Packages.props +++ /dev/null @@ -1,25 +0,0 @@ - - - - true - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - \ No newline at end of file diff --git a/works/demo/1/demo/demo.Android/Application.cs b/works/demo/1/demo/demo.Android/Application.cs deleted file mode 100644 index 5f1af95..0000000 --- a/works/demo/1/demo/demo.Android/Application.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Android.App; -using Android.Runtime; -using Avalonia; -using Avalonia.Android; - -namespace demo.Android -{ - [Application] - public class Application : AvaloniaAndroidApplication - { - protected Application(nint javaReference, JniHandleOwnership transfer) : base(javaReference, transfer) - { - } - - protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) - { - return base.CustomizeAppBuilder(builder) - .WithInterFont(); - } - } -} \ No newline at end of file diff --git a/works/demo/1/demo/demo.Android/Icon.png b/works/demo/1/demo/demo.Android/Icon.png deleted file mode 100644 index 3c39845..0000000 Binary files a/works/demo/1/demo/demo.Android/Icon.png and /dev/null differ diff --git a/works/demo/1/demo/demo.Android/MainActivity.cs b/works/demo/1/demo/demo.Android/MainActivity.cs deleted file mode 100644 index fae68e2..0000000 --- a/works/demo/1/demo/demo.Android/MainActivity.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Android.App; -using Android.Content.PM; -using Avalonia; -using Avalonia.Android; - -namespace demo.Android; - -[Activity( - Label = "demo.Android", - Theme = "@style/MyTheme.NoActionBar", - Icon = "@drawable/icon", - MainLauncher = true, - ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)] -public class MainActivity : AvaloniaMainActivity -{ -} \ No newline at end of file diff --git a/works/demo/1/demo/demo.Android/Properties/AndroidManifest.xml b/works/demo/1/demo/demo.Android/Properties/AndroidManifest.xml deleted file mode 100644 index c321da6..0000000 --- a/works/demo/1/demo/demo.Android/Properties/AndroidManifest.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/works/demo/1/demo/demo.Android/Resources/AboutResources.txt b/works/demo/1/demo/demo.Android/Resources/AboutResources.txt deleted file mode 100644 index c2bca97..0000000 --- a/works/demo/1/demo/demo.Android/Resources/AboutResources.txt +++ /dev/null @@ -1,44 +0,0 @@ -Images, layout descriptions, binary blobs and string dictionaries can be included -in your application as resource files. Various Android APIs are designed to -operate on the resource IDs instead of dealing with images, strings or binary blobs -directly. - -For example, a sample Android app that contains a user interface layout (main.axml), -an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) -would keep its resources in the "Resources" directory of the application: - -Resources/ - drawable/ - icon.png - - layout/ - main.axml - - values/ - strings.xml - -In order to get the build system to recognize Android resources, set the build action to -"AndroidResource". The native Android APIs do not operate directly with filenames, but -instead operate on resource IDs. When you compile an Android application that uses resources, -the build system will package the resources for distribution and generate a class called "R" -(this is an Android convention) that contains the tokens for each one of the resources -included. For example, for the above Resources layout, this is what the R class would expose: - -public class R { - public class drawable { - public const int icon = 0x123; - } - - public class layout { - public const int main = 0x456; - } - - public class strings { - public const int first_string = 0xabc; - public const int second_string = 0xbcd; - } -} - -You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main -to reference the layout/main.axml file, or R.strings.first_string to reference the first -string in the dictionary file values/strings.xml. \ No newline at end of file diff --git a/works/demo/1/demo/demo.Android/Resources/drawable-night-v31/avalonia_anim.xml b/works/demo/1/demo/demo.Android/Resources/drawable-night-v31/avalonia_anim.xml deleted file mode 100644 index dde4b5a..0000000 --- a/works/demo/1/demo/demo.Android/Resources/drawable-night-v31/avalonia_anim.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/works/demo/1/demo/demo.Android/Resources/drawable-v31/avalonia_anim.xml b/works/demo/1/demo/demo.Android/Resources/drawable-v31/avalonia_anim.xml deleted file mode 100644 index 94f27d9..0000000 --- a/works/demo/1/demo/demo.Android/Resources/drawable-v31/avalonia_anim.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/works/demo/1/demo/demo.Android/Resources/drawable/splash_screen.xml b/works/demo/1/demo/demo.Android/Resources/drawable/splash_screen.xml deleted file mode 100644 index 2e920b4..0000000 --- a/works/demo/1/demo/demo.Android/Resources/drawable/splash_screen.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/works/demo/1/demo/demo.Android/Resources/values-night/colors.xml b/works/demo/1/demo/demo.Android/Resources/values-night/colors.xml deleted file mode 100644 index 3d47b6f..0000000 --- a/works/demo/1/demo/demo.Android/Resources/values-night/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #212121 - diff --git a/works/demo/1/demo/demo.Android/Resources/values-v31/styles.xml b/works/demo/1/demo/demo.Android/Resources/values-v31/styles.xml deleted file mode 100644 index d5ecec4..0000000 --- a/works/demo/1/demo/demo.Android/Resources/values-v31/styles.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/works/demo/1/demo/demo.Android/Resources/values/colors.xml b/works/demo/1/demo/demo.Android/Resources/values/colors.xml deleted file mode 100644 index 59279d5..0000000 --- a/works/demo/1/demo/demo.Android/Resources/values/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #FFFFFF - diff --git a/works/demo/1/demo/demo.Android/Resources/values/styles.xml b/works/demo/1/demo/demo.Android/Resources/values/styles.xml deleted file mode 100644 index 6e534de..0000000 --- a/works/demo/1/demo/demo.Android/Resources/values/styles.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/works/demo/1/demo/demo.Android/demo.Android.csproj b/works/demo/1/demo/demo.Android/demo.Android.csproj deleted file mode 100644 index dbda00e..0000000 --- a/works/demo/1/demo/demo.Android/demo.Android.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - Exe - net10.0-android - 23 - enable - com.CompanyName.demo - 1 - 1.0 - apk - false - - - - - Resources\drawable\Icon.png - - - - - - - - - - - - diff --git a/works/demo/1/demo/demo.Browser/Program.cs b/works/demo/1/demo/demo.Browser/Program.cs deleted file mode 100644 index 320c1e4..0000000 --- a/works/demo/1/demo/demo.Browser/Program.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Runtime.Versioning; -using System.Threading.Tasks; -using Avalonia; -using Avalonia.Browser; -using demo; - -internal sealed partial class Program -{ - private static Task Main(string[] args) => BuildAvaloniaApp() - .WithInterFont() - .StartBrowserAppAsync("out"); - - public static AppBuilder BuildAvaloniaApp() - => AppBuilder.Configure(); -} \ No newline at end of file diff --git a/works/demo/1/demo/demo.Browser/Properties/AssemblyInfo.cs b/works/demo/1/demo/demo.Browser/Properties/AssemblyInfo.cs deleted file mode 100644 index f31aed8..0000000 --- a/works/demo/1/demo/demo.Browser/Properties/AssemblyInfo.cs +++ /dev/null @@ -1 +0,0 @@ -[assembly: System.Runtime.Versioning.SupportedOSPlatform("browser")] \ No newline at end of file diff --git a/works/demo/1/demo/demo.Browser/Properties/launchSettings.json b/works/demo/1/demo/demo.Browser/Properties/launchSettings.json deleted file mode 100644 index 989fc1a..0000000 --- a/works/demo/1/demo/demo.Browser/Properties/launchSettings.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "profiles": { - "demo.Browser": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:7169;http://localhost:5235", - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" - } - } -} diff --git a/works/demo/1/demo/demo.Browser/demo.Browser.csproj b/works/demo/1/demo/demo.Browser/demo.Browser.csproj deleted file mode 100644 index 04e7571..0000000 --- a/works/demo/1/demo/demo.Browser/demo.Browser.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - net10.0-browser - true - enable - true - - - - - - - - - - - - - - diff --git a/works/demo/1/demo/demo.Browser/wwwroot/app.css b/works/demo/1/demo/demo.Browser/wwwroot/app.css deleted file mode 100644 index 1d6f754..0000000 --- a/works/demo/1/demo/demo.Browser/wwwroot/app.css +++ /dev/null @@ -1,58 +0,0 @@ -/* HTML styles for the splash screen */ -.avalonia-splash { - position: absolute; - height: 100%; - width: 100%; - background: white; - font-family: 'Outfit', sans-serif; - justify-content: center; - align-items: center; - display: flex; - pointer-events: none; -} - -/* Light theme styles */ -@media (prefers-color-scheme: light) { - .avalonia-splash { - background: white; - } - - .avalonia-splash h2 { - color: #1b2a4e; - } - - .avalonia-splash a { - color: #0D6EFD; - } -} - -@media (prefers-color-scheme: dark) { - .avalonia-splash { - background: #1b2a4e; - } - - .avalonia-splash h2 { - color: white; - } - - .avalonia-splash a { - color: white; - } -} - -.avalonia-splash h2 { - font-weight: 400; - font-size: 1.5rem; -} - -.avalonia-splash a { - text-decoration: none; - font-size: 2.5rem; - display: block; -} - -.avalonia-splash.splash-close { - transition: opacity 200ms, display 200ms; - display: none; - opacity: 0; -} diff --git a/works/demo/1/demo/demo.Browser/wwwroot/favicon.ico b/works/demo/1/demo/demo.Browser/wwwroot/favicon.ico deleted file mode 100644 index f7da8bb..0000000 Binary files a/works/demo/1/demo/demo.Browser/wwwroot/favicon.ico and /dev/null differ diff --git a/works/demo/1/demo/demo.Browser/wwwroot/index.html b/works/demo/1/demo/demo.Browser/wwwroot/index.html deleted file mode 100644 index e94dd4d..0000000 --- a/works/demo/1/demo/demo.Browser/wwwroot/index.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - demo.Browser - - - - - - - - - -
-
-

- Powered by - - - - - - - - - - - - - - -

-
-
- - - - diff --git a/works/demo/1/demo/demo.Browser/wwwroot/main.js b/works/demo/1/demo/demo.Browser/wwwroot/main.js deleted file mode 100644 index bf1555e..0000000 --- a/works/demo/1/demo/demo.Browser/wwwroot/main.js +++ /dev/null @@ -1,13 +0,0 @@ -import { dotnet } from './_framework/dotnet.js' - -const is_browser = typeof window != "undefined"; -if (!is_browser) throw new Error(`Expected to be running in a browser`); - -const dotnetRuntime = await dotnet - .withDiagnosticTracing(false) - .withApplicationArgumentsFromQuery() - .create(); - -const config = dotnetRuntime.getConfig(); - -await dotnetRuntime.runMain(config.mainAssemblyName, [globalThis.location.href]); diff --git a/works/demo/1/demo/demo.Desktop/demo.Desktop.csproj b/works/demo/1/demo/demo.Desktop/demo.Desktop.csproj deleted file mode 100644 index d8d19cb..0000000 --- a/works/demo/1/demo/demo.Desktop/demo.Desktop.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - WinExe - - net10.0 - enable - - - - app.manifest - - - - - - - - - - diff --git a/works/demo/1/demo/demo.iOS/AppDelegate.cs b/works/demo/1/demo/demo.iOS/AppDelegate.cs deleted file mode 100644 index ce3cd3a..0000000 --- a/works/demo/1/demo/demo.iOS/AppDelegate.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Foundation; -using UIKit; -using Avalonia; -using Avalonia.Controls; -using Avalonia.iOS; -using Avalonia.Media; - -namespace demo.iOS; - -// The UIApplicationDelegate for the application. This class is responsible for launching the -// User Interface of the application, as well as listening (and optionally responding) to -// application events from iOS. -[Register("AppDelegate")] -#pragma warning disable CA1711 // Identifiers should not have incorrect suffix -public partial class AppDelegate : AvaloniaAppDelegate -#pragma warning restore CA1711 // Identifiers should not have incorrect suffix -{ - protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) - { - return base.CustomizeAppBuilder(builder) - .WithInterFont(); - } -} \ No newline at end of file diff --git a/works/demo/1/demo/demo.iOS/Entitlements.plist b/works/demo/1/demo/demo.iOS/Entitlements.plist deleted file mode 100644 index 0c67376..0000000 --- a/works/demo/1/demo/demo.iOS/Entitlements.plist +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/works/demo/1/demo/demo.iOS/Info.plist b/works/demo/1/demo/demo.iOS/Info.plist deleted file mode 100644 index a3d6913..0000000 --- a/works/demo/1/demo/demo.iOS/Info.plist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - CFBundleDisplayName - demo - CFBundleIdentifier - companyName.demo - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - MinimumOSVersion - 13.0 - UIDeviceFamily - - 1 - 2 - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/works/demo/1/demo/demo.iOS/Main.cs b/works/demo/1/demo/demo.iOS/Main.cs deleted file mode 100644 index 6720b4c..0000000 --- a/works/demo/1/demo/demo.iOS/Main.cs +++ /dev/null @@ -1,14 +0,0 @@ -using UIKit; - -namespace demo.iOS; - -public class Application -{ - // This is the main entry point of the application. - static void Main(string[] args) - { - // if you want to use a different Application Delegate class from "AppDelegate" - // you can specify it here. - UIApplication.Main(args, null, typeof(AppDelegate)); - } -} \ No newline at end of file diff --git a/works/demo/1/demo/demo.iOS/Resources/LaunchScreen.xib b/works/demo/1/demo/demo.iOS/Resources/LaunchScreen.xib deleted file mode 100644 index 927b1b3..0000000 --- a/works/demo/1/demo/demo.iOS/Resources/LaunchScreen.xib +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/works/demo/1/demo/demo.iOS/demo.iOS.csproj b/works/demo/1/demo/demo.iOS/demo.iOS.csproj deleted file mode 100644 index ef1bc64..0000000 --- a/works/demo/1/demo/demo.iOS/demo.iOS.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - Exe - net10.0-ios - 13.0 - enable - - - - - - - - - - diff --git a/works/demo/1/demo/demo.slnx b/works/demo/1/demo/demo.slnx deleted file mode 100644 index 2d3dc86..0000000 --- a/works/demo/1/demo/demo.slnx +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/works/demo/1/demo/demo/Assets/Icon.png b/works/demo/1/demo/demo/Assets/Icon.png deleted file mode 100644 index 3c39845..0000000 Binary files a/works/demo/1/demo/demo/Assets/Icon.png and /dev/null differ diff --git a/works/demo/1/demo/demo/Models/IdCategory.cs b/works/demo/1/demo/demo/Models/IdCategory.cs deleted file mode 100644 index 04a1474..0000000 --- a/works/demo/1/demo/demo/Models/IdCategory.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace demo.Models; - -public partial class IdCategory -{ - public string? IdCategoryNameCategory { get; set; } -} diff --git a/works/demo/1/demo/demo/Models/IdManufacturer.cs b/works/demo/1/demo/demo/Models/IdManufacturer.cs deleted file mode 100644 index 38ac100..0000000 --- a/works/demo/1/demo/demo/Models/IdManufacturer.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace demo.Models; - -public partial class IdManufacturer -{ - public string? IdManufacturerNameManufacturer { get; set; } -} diff --git a/works/demo/1/demo/demo/Models/IdOrder.cs b/works/demo/1/demo/demo/Models/IdOrder.cs deleted file mode 100644 index c5b879f..0000000 --- a/works/demo/1/demo/demo/Models/IdOrder.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace demo.Models; - -public partial class IdOrder -{ - public string? IdOrderIdProductQuantity { get; set; } -} diff --git a/works/demo/1/demo/demo/Models/IdProduct.cs b/works/demo/1/demo/demo/Models/IdProduct.cs deleted file mode 100644 index 97b2279..0000000 --- a/works/demo/1/demo/demo/Models/IdProduct.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace demo.Models; - -public partial class IdProduct -{ - public string? IdProductArticleNameIdUnitPriceIdSupplierIdManufactur { get; set; } -} diff --git a/works/demo/1/demo/demo/Models/IdStatus.cs b/works/demo/1/demo/demo/Models/IdStatus.cs deleted file mode 100644 index 6f86488..0000000 --- a/works/demo/1/demo/demo/Models/IdStatus.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace demo.Models; - -public partial class IdStatus -{ - public string? IdStatusNameStatus { get; set; } -} diff --git a/works/demo/1/demo/demo/Models/IdSupplier.cs b/works/demo/1/demo/demo/Models/IdSupplier.cs deleted file mode 100644 index 1133261..0000000 --- a/works/demo/1/demo/demo/Models/IdSupplier.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace demo.Models; - -public partial class IdSupplier -{ - public string? IdSupplierNameSupplier { get; set; } -} diff --git a/works/demo/1/demo/demo/Models/IdUnit.cs b/works/demo/1/demo/demo/Models/IdUnit.cs deleted file mode 100644 index 3e8323a..0000000 --- a/works/demo/1/demo/demo/Models/IdUnit.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace demo.Models; - -public partial class IdUnit -{ - public string? IdUnitNameUnit { get; set; } -} diff --git a/works/demo/1/demo/demo/Models/PostgresContext.cs b/works/demo/1/demo/demo/Models/PostgresContext.cs deleted file mode 100644 index 39243d0..0000000 --- a/works/demo/1/demo/demo/Models/PostgresContext.cs +++ /dev/null @@ -1,171 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore; - -namespace demo.Models; - -public partial class PostgresContext : DbContext -{ - public PostgresContext() - { - } - - public PostgresContext(DbContextOptions options) - : base(options) - { - } - - public virtual DbSet IdCategories { get; set; } - - public virtual DbSet IdManufacturers { get; set; } - - public virtual DbSet IdOrders { get; set; } - - public virtual DbSet IdProducts { get; set; } - - public virtual DbSet IdStatuses { get; set; } - - public virtual DbSet IdSuppliers { get; set; } - - public virtual DbSet IdUnits { get; set; } - - public virtual DbSet RoleIds { get; set; } - - public virtual DbSet Tovars { get; set; } - - public virtual DbSet UserIds { get; set; } - - public virtual DbSet<ЗаказImport> ЗаказImports { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) -#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263. - => optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=postgres;Username=postgres;Password=mysecretpassword"); - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity - .HasNoKey() - .ToTable("id_category"); - - entity.Property(e => e.IdCategoryNameCategory) - .HasMaxLength(50) - .HasColumnName("id_category;name_category"); - }); - - modelBuilder.Entity(entity => - { - entity - .HasNoKey() - .ToTable("id_manufacturer"); - - entity.Property(e => e.IdManufacturerNameManufacturer) - .HasMaxLength(50) - .HasColumnName("id_manufacturer;name_manufacturer"); - }); - - modelBuilder.Entity(entity => - { - entity - .HasNoKey() - .ToTable("id_order"); - - entity.Property(e => e.IdOrderIdProductQuantity) - .HasMaxLength(50) - .HasColumnName("id_order;id_product;quantity"); - }); - - modelBuilder.Entity(entity => - { - entity - .HasNoKey() - .ToTable("id_product"); - - entity.Property(e => e.IdProductArticleNameIdUnitPriceIdSupplierIdManufactur) - .HasMaxLength(128) - .HasColumnName("id_product;article;name;id_unit;price;id_supplier;id_manufactur"); - }); - - modelBuilder.Entity(entity => - { - entity - .HasNoKey() - .ToTable("id_status"); - - entity.Property(e => e.IdStatusNameStatus) - .HasMaxLength(50) - .HasColumnName("id_status;name_status"); - }); - - modelBuilder.Entity(entity => - { - entity - .HasNoKey() - .ToTable("id_supplier"); - - entity.Property(e => e.IdSupplierNameSupplier) - .HasMaxLength(50) - .HasColumnName("id_supplier;name_supplier"); - }); - - modelBuilder.Entity(entity => - { - entity - .HasNoKey() - .ToTable("id_unit"); - - entity.Property(e => e.IdUnitNameUnit) - .HasMaxLength(50) - .HasColumnName("id_unit;name_unit"); - }); - - modelBuilder.Entity(entity => - { - entity - .HasNoKey() - .ToTable("role_id"); - - entity.Property(e => e.IdRoleNameRole) - .HasMaxLength(50) - .HasColumnName("id_role;name_role"); - }); - - modelBuilder.Entity(entity => - { - entity - .HasNoKey() - .ToTable("tovar"); - - entity.Property(e => e.IdPointIndexCityStreetHouse) - .HasMaxLength(50) - .HasColumnName("id_point;index;city;street;house;;;;;;"); - }); - - modelBuilder.Entity(entity => - { - entity - .HasNoKey() - .ToTable("user_id"); - - entity.Property(e => e.IdUserFullNameLoginPasswordIdRole) - .HasMaxLength(64) - .HasColumnName("id_user;full_name;login;password;id_role"); - }); - - modelBuilder.Entity<ЗаказImport>(entity => - { - entity - .HasNoKey() - .ToTable("заказ_import"); - - entity.Property(e => e.IdOrderOrderDateDeliveryDateIdPointIdUserReceiveCode) - .HasMaxLength(50) - .HasColumnName("id_order;order_date;delivery_date;id_point;id_user;receive_code"); - }); - - OnModelCreatingPartial(modelBuilder); - } - - partial void OnModelCreatingPartial(ModelBuilder modelBuilder); -} diff --git a/works/demo/1/demo/demo/Models/RoleId.cs b/works/demo/1/demo/demo/Models/RoleId.cs deleted file mode 100644 index 3a163c0..0000000 --- a/works/demo/1/demo/demo/Models/RoleId.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace demo.Models; - -public partial class RoleId -{ - public string? IdRoleNameRole { get; set; } -} diff --git a/works/demo/1/demo/demo/Models/Tovar.cs b/works/demo/1/demo/demo/Models/Tovar.cs deleted file mode 100644 index 027a835..0000000 --- a/works/demo/1/demo/demo/Models/Tovar.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace demo.Models; - -public partial class Tovar -{ - public string? IdPointIndexCityStreetHouse { get; set; } -} diff --git a/works/demo/1/demo/demo/Models/UserId.cs b/works/demo/1/demo/demo/Models/UserId.cs deleted file mode 100644 index 67706df..0000000 --- a/works/demo/1/demo/demo/Models/UserId.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace demo.Models; - -public partial class UserId -{ - public string? IdUserFullNameLoginPasswordIdRole { get; set; } -} diff --git a/works/demo/1/demo/demo/Models/ЗаказImport.cs b/works/demo/1/demo/demo/Models/ЗаказImport.cs deleted file mode 100644 index 4fdfc20..0000000 --- a/works/demo/1/demo/demo/Models/ЗаказImport.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace demo.Models; - -public partial class ЗаказImport -{ - public string? IdOrderOrderDateDeliveryDateIdPointIdUserReceiveCode { get; set; } -} diff --git a/works/demo/1/demo/demo/ViewModels/MainViewModel.cs b/works/demo/1/demo/demo/ViewModels/MainViewModel.cs deleted file mode 100644 index 4215149..0000000 --- a/works/demo/1/demo/demo/ViewModels/MainViewModel.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace demo.ViewModels -{ - public class MainViewModel : ViewModelBase - { - } -} \ No newline at end of file diff --git a/works/demo/1/demo/demo/Views/MainWindow.axaml b/works/demo/1/demo/demo/Views/MainWindow.axaml deleted file mode 100644 index 8cd7fca..0000000 --- a/works/demo/1/demo/demo/Views/MainWindow.axaml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/works/demo/1/demo/demo/Views/MainWindow.axaml.cs b/works/demo/1/demo/demo/Views/MainWindow.axaml.cs deleted file mode 100644 index 012be40..0000000 --- a/works/demo/1/demo/demo/Views/MainWindow.axaml.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Avalonia.Controls; -using System.Linq; -using demo.Models; - -namespace demo.Views -{ - public partial class MainWindow : Window - { - public MainWindow() - { - InitializeComponent(); - LoadProducts(); - } - - private void LoadProducts() - { - using var context = new PostgresContext(); - - // Загружаем список товаров из базы данных - var products = context.IdProducts.ToList(); - - // Передаем данные в ListBox - ProductList.ItemsSource = products; - } - } -} \ No newline at end of file