Добавьте файлы проекта.
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
<Solution>
|
||||||
|
<Project Path="zooManagerPro/zooManagerPro.csproj" />
|
||||||
|
</Solution>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<Application xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:Class="zooManagerPro.App"
|
||||||
|
RequestedThemeVariant="Light">
|
||||||
|
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||||
|
|
||||||
|
<Application.Styles>
|
||||||
|
<FluentTheme />
|
||||||
|
</Application.Styles>
|
||||||
|
</Application>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
|
using Avalonia.Data.Core;
|
||||||
|
using Avalonia.Data.Core.Plugins;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using System.Linq;
|
||||||
|
using zooManagerPro.ViewModels;
|
||||||
|
using zooManagerPro.Views;
|
||||||
|
|
||||||
|
namespace zooManagerPro
|
||||||
|
{
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnFrameworkInitializationCompleted()
|
||||||
|
{
|
||||||
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
|
{
|
||||||
|
desktop.MainWindow = new MainWindow
|
||||||
|
{
|
||||||
|
DataContext = new MainWindowViewModel(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
base.OnFrameworkInitializationCompleted();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 172 KiB |
@@ -0,0 +1,214 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using zooManagerPro.Models;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Context;
|
||||||
|
|
||||||
|
public partial class ZooManagerProContext : DbContext
|
||||||
|
{
|
||||||
|
public ZooManagerProContext()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public ZooManagerProContext(DbContextOptions<ZooManagerProContext> options)
|
||||||
|
: base(options)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual DbSet<Animal> Animals { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<AnimalsFeeding> AnimalsFeedings { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<ClimateZone> ClimateZones { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<DietaryRegiman> DietaryRegimen { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<Employee> Employees { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<Enclosure> Enclosures { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<EnclosureStatus> EnclosureStatuses { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<Feature> Features { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<Gender> Genders { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<HealthStatus> HealthStatuses { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<Species> Species { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<TypeOfEnclosure> TypeOfEnclosures { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<TypeOfFeeding> TypeOfFeedings { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<UnitOfMass> UnitOfMasses { 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; Database=zooManagerPro; Username=postgres; Password=123");
|
||||||
|
|
||||||
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
modelBuilder.Entity<Animal>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_animal__pk");
|
||||||
|
|
||||||
|
entity.ToTable("Animal");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.DietaryRegimen).WithMany(p => p.Animals)
|
||||||
|
.HasForeignKey(d => d.DietaryRegimenId)
|
||||||
|
.HasConstraintName("animal_dietaryregimen_fk");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.Enclosure).WithMany(p => p.Animals)
|
||||||
|
.HasForeignKey(d => d.EnclosureId)
|
||||||
|
.HasConstraintName("animal_enclosure_fk");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.Gender).WithMany(p => p.Animals)
|
||||||
|
.HasForeignKey(d => d.GenderId)
|
||||||
|
.HasConstraintName("animal_gender_fk");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.HealthStatus).WithMany(p => p.Animals)
|
||||||
|
.HasForeignKey(d => d.HealthStatusId)
|
||||||
|
.HasConstraintName("animal_healthstatus_fk");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.Species).WithMany(p => p.Animals)
|
||||||
|
.HasForeignKey(d => d.SpeciesId)
|
||||||
|
.HasConstraintName("animal_species_fk");
|
||||||
|
|
||||||
|
entity.HasMany(d => d.Features).WithMany(p => p.Animals)
|
||||||
|
.UsingEntity<Dictionary<string, object>>(
|
||||||
|
"AnimalFeature",
|
||||||
|
r => r.HasOne<Feature>().WithMany()
|
||||||
|
.HasForeignKey("FeatureId")
|
||||||
|
.HasConstraintName("animalfeature_features_fk"),
|
||||||
|
l => l.HasOne<Animal>().WithMany()
|
||||||
|
.HasForeignKey("AnimalId")
|
||||||
|
.HasConstraintName("animalfeature_animal_fk"),
|
||||||
|
j =>
|
||||||
|
{
|
||||||
|
j.HasKey("AnimalId", "FeatureId").HasName("animalfeature_pk");
|
||||||
|
j.ToTable("AnimalFeature");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<AnimalsFeeding>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_animalsfeeding__pk");
|
||||||
|
|
||||||
|
entity.ToTable("AnimalsFeeding");
|
||||||
|
|
||||||
|
entity.Property(e => e.FeedingDateTime).HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.Animal).WithMany(p => p.AnimalsFeedings)
|
||||||
|
.HasForeignKey(d => d.AnimalId)
|
||||||
|
.HasConstraintName("animalsfeeding_animal_fk");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.Employee).WithMany(p => p.AnimalsFeedings)
|
||||||
|
.HasForeignKey(d => d.EmployeeId)
|
||||||
|
.HasConstraintName("animalsfeeding_employee_fk");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.TypeOfFeeding).WithMany(p => p.AnimalsFeedings)
|
||||||
|
.HasForeignKey(d => d.TypeOfFeedingId)
|
||||||
|
.HasConstraintName("animalsfeeding_typeoffeeding_fk");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.UnitOfMass).WithMany(p => p.AnimalsFeedings)
|
||||||
|
.HasForeignKey(d => d.UnitOfMassId)
|
||||||
|
.HasConstraintName("animalsfeeding_unitofmass_fk");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<ClimateZone>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_climatezone__pk");
|
||||||
|
|
||||||
|
entity.ToTable("ClimateZone");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<DietaryRegiman>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_dietaryregimen__pk");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<Employee>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_employee__pk");
|
||||||
|
|
||||||
|
entity.ToTable("Employee");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<Enclosure>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_enclosure__pk");
|
||||||
|
|
||||||
|
entity.ToTable("Enclosure");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.ClimateZone).WithMany(p => p.Enclosures)
|
||||||
|
.HasForeignKey(d => d.ClimateZoneId)
|
||||||
|
.HasConstraintName("enclosure_climatezone_fk");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.EnclosureStatus).WithMany(p => p.Enclosures)
|
||||||
|
.HasForeignKey(d => d.EnclosureStatusId)
|
||||||
|
.HasConstraintName("enclosure_enclosurestatus_fk");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.TypeOfEnclosure).WithMany(p => p.Enclosures)
|
||||||
|
.HasForeignKey(d => d.TypeOfEnclosureId)
|
||||||
|
.HasConstraintName("enclosure_typeofenclosure_fk");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<EnclosureStatus>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_enclosurestatus__pk");
|
||||||
|
|
||||||
|
entity.ToTable("EnclosureStatus");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<Feature>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_features__pk");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<Gender>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_gender__pk");
|
||||||
|
|
||||||
|
entity.ToTable("Gender");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<HealthStatus>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_healthstatus__pk");
|
||||||
|
|
||||||
|
entity.ToTable("HealthStatus");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<Species>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_species__pk");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<TypeOfEnclosure>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_typeofenclosure__pk");
|
||||||
|
|
||||||
|
entity.ToTable("TypeOfEnclosure");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<TypeOfFeeding>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_typeoffeeding__pk");
|
||||||
|
|
||||||
|
entity.ToTable("TypeOfFeeding");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<UnitOfMass>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.Id).HasName("_unitofmass__pk");
|
||||||
|
|
||||||
|
entity.ToTable("UnitOfMass");
|
||||||
|
});
|
||||||
|
|
||||||
|
OnModelCreatingPartial(modelBuilder);
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class Animal
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string AnimalName { get; set; } = null!;
|
||||||
|
|
||||||
|
public int SpeciesId { get; set; }
|
||||||
|
|
||||||
|
public int GenderId { get; set; }
|
||||||
|
|
||||||
|
public DateOnly DateOfBirth { get; set; }
|
||||||
|
|
||||||
|
public int DietaryRegimenId { get; set; }
|
||||||
|
|
||||||
|
public int HealthStatusId { get; set; }
|
||||||
|
|
||||||
|
public DateOnly LastDayOfVeterinaryExamination { get; set; }
|
||||||
|
|
||||||
|
public int EnclosureId { get; set; }
|
||||||
|
|
||||||
|
public virtual ICollection<AnimalsFeeding> AnimalsFeedings { get; set; } = new List<AnimalsFeeding>();
|
||||||
|
|
||||||
|
public virtual DietaryRegiman DietaryRegimen { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual Enclosure Enclosure { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual Gender Gender { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual HealthStatus HealthStatus { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual Species Species { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<Feature> Features { get; set; } = new List<Feature>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class AnimalsFeeding
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public int AnimalId { get; set; }
|
||||||
|
|
||||||
|
public DateTime FeedingDateTime { get; set; }
|
||||||
|
|
||||||
|
public int TypeOfFeedingId { get; set; }
|
||||||
|
|
||||||
|
public decimal FeedAmount { get; set; }
|
||||||
|
|
||||||
|
public int UnitOfMassId { get; set; }
|
||||||
|
|
||||||
|
public int EmployeeId { get; set; }
|
||||||
|
|
||||||
|
public string? FeedingDescription { get; set; }
|
||||||
|
|
||||||
|
public virtual Animal Animal { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual Employee Employee { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual TypeOfFeeding TypeOfFeeding { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual UnitOfMass UnitOfMass { get; set; } = null!;
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class ClimateZone
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string ClimateZoneName { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<Enclosure> Enclosures { get; set; } = new List<Enclosure>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class DietaryRegiman
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string DietName { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<Animal> Animals { get; set; } = new List<Animal>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class Employee
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string Login { get; set; } = null!;
|
||||||
|
|
||||||
|
public string Password { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<AnimalsFeeding> AnimalsFeedings { get; set; } = new List<AnimalsFeeding>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class Enclosure
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public int TypeOfEnclosureId { get; set; }
|
||||||
|
|
||||||
|
public int Capacity { get; set; }
|
||||||
|
|
||||||
|
public int MaxCapacity { get; set; }
|
||||||
|
|
||||||
|
public int EnclosureStatusId { get; set; }
|
||||||
|
|
||||||
|
public decimal Square { get; set; }
|
||||||
|
|
||||||
|
public int ClimateZoneId { get; set; }
|
||||||
|
|
||||||
|
public DateOnly LastDateOfTechnicalInsperation { get; set; }
|
||||||
|
|
||||||
|
public virtual ICollection<Animal> Animals { get; set; } = new List<Animal>();
|
||||||
|
|
||||||
|
public virtual ClimateZone ClimateZone { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual EnclosureStatus EnclosureStatus { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual TypeOfEnclosure TypeOfEnclosure { get; set; } = null!;
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class EnclosureStatus
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string EnclosureStatusName { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<Enclosure> Enclosures { get; set; } = new List<Enclosure>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class Feature
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string FeaturesName { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<Animal> Animals { get; set; } = new List<Animal>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class Gender
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string GenderName { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<Animal> Animals { get; set; } = new List<Animal>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class HealthStatus
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string HealthStatusName { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<Animal> Animals { get; set; } = new List<Animal>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class Species
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string SpeciesName { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<Animal> Animals { get; set; } = new List<Animal>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class TypeOfEnclosure
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string TypeOfEnclosureName { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<Enclosure> Enclosures { get; set; } = new List<Enclosure>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class TypeOfFeeding
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string TypeOfFeedingName { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<AnimalsFeeding> AnimalsFeedings { get; set; } = new List<AnimalsFeeding>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Models;
|
||||||
|
|
||||||
|
public partial class UnitOfMass
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string UnitOfMassName { get; set; } = null!;
|
||||||
|
|
||||||
|
public virtual ICollection<AnimalsFeeding> AnimalsFeedings { get; set; } = new List<AnimalsFeeding>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace zooManagerPro
|
||||||
|
{
|
||||||
|
internal 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) => BuildAvaloniaApp()
|
||||||
|
.StartWithClassicDesktopLifetime(args);
|
||||||
|
|
||||||
|
// Avalonia configuration, don't remove; also used by visual designer.
|
||||||
|
public static AppBuilder BuildAvaloniaApp()
|
||||||
|
=> AppBuilder.Configure<App>()
|
||||||
|
.UsePlatformDetect()
|
||||||
|
#if DEBUG
|
||||||
|
.WithDeveloperTools()
|
||||||
|
#endif
|
||||||
|
.WithInterFont()
|
||||||
|
.LogToTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using zooManagerPro.Context;
|
||||||
|
using zooManagerPro.Models;
|
||||||
|
|
||||||
|
namespace zooManagerPro.ViewModels
|
||||||
|
{
|
||||||
|
public partial class LoginViewModel : ObservableObject
|
||||||
|
{
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial string Login { get; set; }
|
||||||
|
[ObservableProperty]
|
||||||
|
public partial string Password { get; set; }
|
||||||
|
|
||||||
|
[RelayCommand]
|
||||||
|
public async Task EntranceAsync()
|
||||||
|
{
|
||||||
|
|
||||||
|
await using ZooManagerProContext context = new();
|
||||||
|
|
||||||
|
if (context.Employees.FirstOrDefault(x => x.Login == Login && x.Password == Password) is Employee employee)
|
||||||
|
{
|
||||||
|
await MainView.Current.ReplaceAsync(new LoginView() // поменять
|
||||||
|
{
|
||||||
|
DataContext = new LoginViewModel()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace zooManagerPro.ViewModels
|
||||||
|
{
|
||||||
|
internal class MainWindowViewModel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
|
||||||
|
namespace zooManagerPro.ViewModels
|
||||||
|
{
|
||||||
|
public abstract class ViewModelBase : ObservableObject
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<NavigationPage xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="zooManagerPro.HomeView">
|
||||||
|
<Grid RowDefinitions="*,*,*,*">
|
||||||
|
|
||||||
|
<Grid Background="#32a852" ColumnDefinitions="*,*">
|
||||||
|
<TextBlock Text="ZooManagerPro" VerticalAlignment="Center" FontSize="20" FontWeight="Bold" Foreground="White" Margin="10,0,0,0"/>
|
||||||
|
<Button Grid.Column="1" HorizontalAlignment="Right" Content="Обновить" Margin="0,0,10,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Grid.Row="1" ColumnDefinitions="*,*,*,*" Margin="16,14,16,4">
|
||||||
|
<Border>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="Зарегистрировано животных"/>
|
||||||
|
<TextBlock Text="0" Foreground="#2980B9"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Grid.Column="1">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="Количество видов"/>
|
||||||
|
<TextBlock Text="0" Foreground="#27AE60"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Grid.Column="2">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="Свободные вольеры"/>
|
||||||
|
<TextBlock Text="0" Foreground="#E67E22"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Grid.Column="3">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="Осмотр у ветеринара (7 дней)"/>
|
||||||
|
<TextBlock Text="0" Foreground="#E74C3C"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</NavigationPage>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace zooManagerPro;
|
||||||
|
|
||||||
|
public partial class HomeView : UserControl
|
||||||
|
{
|
||||||
|
public HomeView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<ContentPage xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:viewmodels="using:zooManagerPro.ViewModels"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="zooManagerPro.LoginView"
|
||||||
|
x:DataType="viewmodels:LoginViewModel"
|
||||||
|
Header="Вход">
|
||||||
|
<Grid ColumnDefinitions="*,*,*" RowDefinitions="*,*,*">
|
||||||
|
<StackPanel Grid.Column="1" Grid.Row="1">
|
||||||
|
<StackPanel Margin="5">
|
||||||
|
<TextBlock Text="Login"/>
|
||||||
|
<TextBox Name="LoginTextBox" PlaceholderText="ivan" Text="{Binding Login}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Margin="5">
|
||||||
|
<TextBlock Text="Password"/>
|
||||||
|
<TextBox Name="PasswordTextBox" PlaceholderText="1234" Text="{Binding Password}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<Button Name="ButtonTextBox" Margin="5" HorizontalAlignment="Center" Content="Войти" Command="{Binding EntranceCommand}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</ContentPage>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace zooManagerPro;
|
||||||
|
|
||||||
|
public partial class LoginView : ContentPage
|
||||||
|
{
|
||||||
|
public LoginView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<NavigationPage xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="zooManagerPro.MainView">
|
||||||
|
</NavigationPage>
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
using zooManagerPro.ViewModels;
|
||||||
|
|
||||||
|
namespace zooManagerPro;
|
||||||
|
|
||||||
|
public partial class MainView : NavigationPage
|
||||||
|
{
|
||||||
|
public static MainView Current { get; private set; } = null!;
|
||||||
|
|
||||||
|
public MainView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
Current = this;
|
||||||
|
|
||||||
|
Loaded += async (_, _) =>
|
||||||
|
{
|
||||||
|
await PushAsync(new LoginView()
|
||||||
|
{
|
||||||
|
DataContext = new LoginViewModel()
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<Window xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:vm="using:zooManagerPro.ViewModels"
|
||||||
|
xmlns:zoomanagerpro="using:zooManagerPro"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="zooManagerPro.Views.MainWindow"
|
||||||
|
x:DataType="vm:MainWindowViewModel"
|
||||||
|
Icon="/Assets/avalonia-logo.ico"
|
||||||
|
Title="zooManagerPro">
|
||||||
|
|
||||||
|
<Design.DataContext>
|
||||||
|
<!-- This only sets the DataContext for the previewer in an IDE,
|
||||||
|
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
|
||||||
|
<vm:MainWindowViewModel/>
|
||||||
|
</Design.DataContext>
|
||||||
|
|
||||||
|
<zoomanagerpro:MainView/>
|
||||||
|
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
|
||||||
|
namespace zooManagerPro.Views
|
||||||
|
{
|
||||||
|
public partial class MainWindow : Window
|
||||||
|
{
|
||||||
|
public MainWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
<Window xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="zooManagerPro.Window1"
|
||||||
|
Title="ZooManager Pro"
|
||||||
|
Width="1200" Height="720" MinWidth="1000" MinHeight="620"
|
||||||
|
WindowStartupLocation="CenterScreen"
|
||||||
|
FontSize="13" Background="#F4F6F8">
|
||||||
|
|
||||||
|
<Window.Styles>
|
||||||
|
|
||||||
|
<!-- карточки аналитики -->
|
||||||
|
<Style Selector="Border.card">
|
||||||
|
<Setter Property="Background" Value="White"/>
|
||||||
|
<Setter Property="CornerRadius" Value="10"/>
|
||||||
|
<Setter Property="Padding" Value="16,12"/>
|
||||||
|
<Setter Property="Margin" Value="6,0"/>
|
||||||
|
<Setter Property="BoxShadow" Value="0 2 12 0 #22000000"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="TextBlock.cardTitle">
|
||||||
|
<Setter Property="FontSize" Value="12"/>
|
||||||
|
<Setter Property="Foreground" Value="#7A8794"/>
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="TextBlock.cardValue">
|
||||||
|
<Setter Property="FontSize" Value="28"/>
|
||||||
|
<Setter Property="FontWeight" Value="Bold"/>
|
||||||
|
<Setter Property="Margin" Value="0,2,0,0"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- кнопки -->
|
||||||
|
<Style Selector="Button.tool">
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||||
|
<Setter Property="Padding" Value="14,8"/>
|
||||||
|
<Setter Property="CornerRadius" Value="6"/>
|
||||||
|
<Setter Property="Cursor" Value="Hand"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- DataGrid -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- пилюля статуса здоровья: цвет через классы -->
|
||||||
|
<Style Selector="Border.pill">
|
||||||
|
<Setter Property="CornerRadius" Value="4"/>
|
||||||
|
<Setter Property="Padding" Value="8,3"/>
|
||||||
|
<Setter Property="Margin" Value="4,0"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Background" Value="#95A5A6"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Border.pill > TextBlock">
|
||||||
|
<Setter Property="FontSize" Value="11"/>
|
||||||
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Border.pill.healthy"><Setter Property="Background" Value="#27AE60"/></Style>
|
||||||
|
<Style Selector="Border.pill.sick">
|
||||||
|
<Setter Property="Background" Value="#F4D03F"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Border.pill.sick > TextBlock"><Setter Property="Foreground" Value="#5C4A00"/></Style>
|
||||||
|
<Style Selector="Border.pill.quarantine"><Setter Property="Background" Value="#E74C3C"/></Style>
|
||||||
|
|
||||||
|
<!-- иконка рациона: текст через классы -->
|
||||||
|
<Style Selector="TextBlock.diet">
|
||||||
|
<Setter Property="Text" Value="🥗 всеядное"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Margin" Value="6,0"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="TextBlock.diet.meat"><Setter Property="Text" Value="🥩 хищник"/></Style>
|
||||||
|
<Style Selector="TextBlock.diet.grass"><Setter Property="Text" Value="🌿 травоядное"/></Style>
|
||||||
|
|
||||||
|
</Window.Styles>
|
||||||
|
|
||||||
|
<DockPanel>
|
||||||
|
|
||||||
|
<!-- ===== Шапка: название системы + кнопка обновления ===== -->
|
||||||
|
<Border DockPanel.Dock="Top" Background="#2C3E50" Padding="20,14">
|
||||||
|
<Grid ColumnDefinitions="*,Auto">
|
||||||
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||||
|
<TextBlock Text="🦁" FontSize="26" Margin="0,0,12,0"/>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="ZooManager Pro" FontSize="20" FontWeight="Bold" Foreground="White"/>
|
||||||
|
<TextBlock Text="Система учёта животных зоопарка" FontSize="11" Foreground="#AEB6BF"/>
|
||||||
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
<Button x:Name="BtnRefresh" Grid.Column="1"
|
||||||
|
Classes="tool" Background="#34495E"
|
||||||
|
Content="🔄 Обновить данные"
|
||||||
|
ToolTip.Tip="Перезагрузить все списки из базы данных без перезапуска"
|
||||||
|
VerticalAlignment="Center"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- ===== Четыре карточки сводной аналитики ===== -->
|
||||||
|
<UniformGrid DockPanel.Dock="Top" Columns="4" Margin="16,14,16,4">
|
||||||
|
|
||||||
|
<Border Classes="card">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Classes="cardTitle" Text="🐾 Зарегистрировано животных"/>
|
||||||
|
<TextBlock Classes="cardValue" x:Name="TxtTotalAnimals" Text="0" Foreground="#2980B9"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Classes="card">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Classes="cardTitle" Text="🔬 Количество видов"/>
|
||||||
|
<TextBlock Classes="cardValue" x:Name="TxtSpeciesCount" Text="0" Foreground="#27AE60"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Classes="card">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Classes="cardTitle" Text="🏠 Свободные вольеры"/>
|
||||||
|
<TextBlock Classes="cardValue" x:Name="TxtFreeEnclosures" Text="0" Foreground="#E67E22"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Classes="card">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Classes="cardTitle" Text="💉 Осмотр у ветеринара (7 дней)"/>
|
||||||
|
<TextBlock Classes="cardValue" x:Name="TxtVetSoon" Text="0" Foreground="#E74C3C"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
<!-- ===== Панель инструментов над таблицей ===== -->
|
||||||
|
<Border DockPanel.Dock="Top" Background="White" CornerRadius="8" Padding="12"
|
||||||
|
Margin="16,12,16,0" BorderBrush="#E3E7EB" BorderThickness="1">
|
||||||
|
<Grid ColumnDefinitions="*,Auto">
|
||||||
|
|
||||||
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Spacing="10">
|
||||||
|
<TextBox x:Name="TxtSearch" Width="280"
|
||||||
|
Watermark="🔍 Поиск: кличка, вид, вольер, статус…"/>
|
||||||
|
<TextBlock Text="Вид:" VerticalAlignment="Center" Foreground="#566573"/>
|
||||||
|
<ComboBox x:Name="CmbSpecies" Width="170"
|
||||||
|
ToolTip.Tip="Фильтр по виду животного"/>
|
||||||
|
<TextBlock Text="Статус:" VerticalAlignment="Center" Foreground="#566573"/>
|
||||||
|
<ComboBox x:Name="CmbHealth" Width="150"
|
||||||
|
ToolTip.Tip="Фильтр по статусу здоровья"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="8">
|
||||||
|
<Button x:Name="BtnAdd" Classes="tool" Background="#27AE60"
|
||||||
|
Content="➕ Добавить" />
|
||||||
|
<Button x:Name="BtnEdit" Classes="tool" Background="#2980B9"
|
||||||
|
Content="✏️ Редактировать" IsEnabled="False" />
|
||||||
|
<Button x:Name="BtnDelete" Classes="tool" Background="#C0392B"
|
||||||
|
Content="🗑 Удалить" IsEnabled="False" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- ===== Таблица животных ===== -->
|
||||||
|
<Border Background="White" CornerRadius="8" Margin="16,12,16,16"
|
||||||
|
BorderBrush="#E3E7EB" BorderThickness="1">
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</DockPanel>
|
||||||
|
</Window>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace zooManagerPro;
|
||||||
|
|
||||||
|
public partial class Window1 : Window
|
||||||
|
{
|
||||||
|
public Window1()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<!-- This manifest is used on Windows only.
|
||||||
|
Don't remove it as it might cause problems with window transparency and embedded controls.
|
||||||
|
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="zooManagerPro.Desktop"/>
|
||||||
|
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- A list of the Windows versions that this application has been tested on
|
||||||
|
and is designed to work with. Uncomment the appropriate elements
|
||||||
|
and Windows will automatically select the most compatible environment. -->
|
||||||
|
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
</assembly>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Models\" />
|
||||||
|
<AvaloniaResource Include="Assets\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Avalonia" Version="12.0.2" />
|
||||||
|
<PackageReference Include="Avalonia.Desktop" Version="12.0.2" />
|
||||||
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="12.0.2" />
|
||||||
|
<PackageReference Include="Avalonia.Fonts.Inter" Version="12.0.2" />
|
||||||
|
<PackageReference Include="AvaloniaUI.DiagnosticsSupport" Version="2.2.1">
|
||||||
|
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||||
|
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.1" />
|
||||||
|
<PackageReference Include="Material.Icons.Avalonia" Version="3.0.2" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.11">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.3" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user