Changes in core, HTML export added

This commit is contained in:
2023-05-28 17:43:48 +02:00
Unverified
parent 7fc6fc6229
commit 93cc11bd01
23 changed files with 165 additions and 103 deletions

View File

@@ -6,11 +6,11 @@ using System.Threading.Tasks;
namespace TimetableDesigner.Core
{
public abstract class BaseGroup : IUnit
[Serializable]
public abstract class BaseGroup : Unit
{
#region FIELDS
private string _name;
private string _shortName;
#endregion
@@ -19,11 +19,6 @@ namespace TimetableDesigner.Core
#region PROPERTIES
public string Name
{
get => _name;
set => _name = value;
}
public string ShortName
{
get => _shortName;
@@ -36,9 +31,8 @@ namespace TimetableDesigner.Core
#region CONSTRUCTORS
public BaseGroup()
public BaseGroup(ulong id) : base(id)
{
_name = string.Empty;
_shortName = string.Empty;
}

View File

@@ -8,11 +8,10 @@ using System.Threading.Tasks;
namespace TimetableDesigner.Core
{
[Serializable]
public class Classroom : IUnit
public class Classroom : Unit
{
#region FIELDS
private string _name;
private string _shortName;
private string _description;
private bool _isCapacityLimited;
@@ -24,11 +23,6 @@ namespace TimetableDesigner.Core
#region PROPERTIES
public string Name
{
get => _name;
set => _name = value;
}
public string ShortName
{
get => _shortName;
@@ -56,9 +50,8 @@ namespace TimetableDesigner.Core
#region CONSTRUCTORS
public Classroom()
public Classroom(ulong id) : base(id)
{
_name = string.Empty;
_shortName = string.Empty;
_description = string.Empty;
_isCapacityLimited = false;

View File

@@ -33,7 +33,7 @@ namespace TimetableDesigner.Core
#region CONSTRUCTORS
public Group() : base()
public Group(ulong id) : base(id)
{
_description = string.Empty;
_assignedSubgroups = new HashSet<Subgroup>();

View File

@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TimetableDesigner.Core
{
public interface IUnit
{
#region PROPERTIES
string Name { get; }
#endregion
}
}

View File

@@ -11,7 +11,7 @@ namespace TimetableDesigner.Core
{
#region CONSTRUCTORS
public Subgroup() : base()
public Subgroup(ulong id) : base(id)
{ }
#endregion

View File

@@ -8,11 +8,10 @@ using TimetableDesigner.Customs;
namespace TimetableDesigner.Core
{
[Serializable]
public class Teacher : IUnit
public class Teacher : Unit
{
#region FIELDS
private string _name;
private string _shortName;
private string _description;
private JsonSerializableDictionary<TimetableDay, TimetableSpanCollection> _availabilityHours;
@@ -23,11 +22,6 @@ namespace TimetableDesigner.Core
#region PROPERTIES
public string Name
{
get => _name;
set => _name = value;
}
public string ShortName
{
get => _shortName;
@@ -38,7 +32,7 @@ namespace TimetableDesigner.Core
get => _description;
set => _description = value;
}
public IDictionary<TimetableDay, TimetableSpanCollection> AvailabilityHours => _availabilityHours;
public JsonSerializableDictionary<TimetableDay, TimetableSpanCollection> AvailabilityHours => _availabilityHours;
#endregion
@@ -46,9 +40,8 @@ namespace TimetableDesigner.Core
#region CONSTRUCTORS
public Teacher()
public Teacher(ulong id) : base(id)
{
_name = string.Empty;
_shortName = string.Empty;
_description = string.Empty;
_availabilityHours = new JsonSerializableDictionary<TimetableDay, TimetableSpanCollection>();

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>