diff --git a/Assets/avalonia-logo.ico b/Assets/avalonia-logo.ico
deleted file mode 100644
index f7da8bb..0000000
Binary files a/Assets/avalonia-logo.ico and /dev/null differ
diff --git a/Enums/PeriodType.cs b/Enums/PeriodType.cs
new file mode 100644
index 0000000..13b1a8b
--- /dev/null
+++ b/Enums/PeriodType.cs
@@ -0,0 +1,38 @@
+namespace GazpromApp.Enums;
+
+public enum PeriodType
+{
+ Unknown = -1,
+ Day = 0,
+ Week = 1,
+ Month = 2,
+ Year = 3
+}
+
+public static class PeriodTypeExtensions
+{
+ public static string ToDescription(this PeriodType periodType)
+ {
+ return periodType switch
+ {
+ PeriodType.Day => "День",
+ PeriodType.Week => "Неделя",
+ PeriodType.Month => "Месяц",
+ PeriodType.Year => "Год",
+ PeriodType.Unknown => "Неизв.",
+ _ => string.Empty
+ };
+ }
+
+ public static PeriodType ToPeriodType(this string periodType)
+ {
+ return periodType switch
+ {
+ "День" => PeriodType.Day,
+ "Неделя" => PeriodType.Week,
+ "Месяц" => PeriodType.Month,
+ "Год" => PeriodType.Year,
+ _ => PeriodType.Unknown
+ };
+ }
+}
\ No newline at end of file
diff --git a/Models/Inspection.cs b/Models/Inspection.cs
index 2a82503..8d3996c 100644
--- a/Models/Inspection.cs
+++ b/Models/Inspection.cs
@@ -13,6 +13,10 @@ public class Inspection
public string Name { get; set; } = string.Empty;
[Required]
public DateTime InspectionDate { get; set; }
+ [Required]
+ public string PeriodType { get; set; } = string.Empty;
+ [Required]
+ public float PeriodValue { get; set; }
public int EquipmentId { get; set; }
// EF stuff
diff --git a/Views/EditEquipmentDialog.axaml b/Views/EditEquipmentDialog.axaml
index e103004..6a295a5 100644
--- a/Views/EditEquipmentDialog.axaml
+++ b/Views/EditEquipmentDialog.axaml
@@ -8,7 +8,8 @@
Width="1000" Height="600"
x:Class="GazpromApp.Views.EditEquipmentDialog"
x:DataType="vm:EditEquipmentDialogViewModel"
- Title="EditEquipmentDialog"
+ Title="Редактирование/просмотр оборудования"
+ Icon="/Assets/ic_fluent_table_edit_24_filled (Custom).png"
WindowStartupLocation="CenterOwner"
Closing="Window_OnClosing"
Closed="Window_OnClosed">
diff --git a/Views/ImageView.axaml b/Views/ImageView.axaml
index c45bc3c..b95aa97 100644
--- a/Views/ImageView.axaml
+++ b/Views/ImageView.axaml
@@ -9,7 +9,8 @@
x:Class="GazpromApp.Views.ImageView"
x:DataType="vm:ImageViewModel"
Title="Просмотр изображения"
- WindowStartupLocation="CenterOwner">
+ WindowStartupLocation="CenterOwner"
+ CanResize="False">
diff --git a/Views/MainWindow.axaml b/Views/MainWindow.axaml
index 003e6e8..0b89eab 100644
--- a/Views/MainWindow.axaml
+++ b/Views/MainWindow.axaml
@@ -7,7 +7,7 @@
Width="1424" Height="714"
x:Class="GazpromApp.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
- Icon="/Assets/avalonia-logo.ico"
+ Icon="/Assets/gazpromapp.ico"
Title="GazpromApp"
WindowStartupLocation="CenterScreen"
>
diff --git a/Views/NewEquipmentDialog.axaml b/Views/NewEquipmentDialog.axaml
index 49d4685..81f5503 100644
--- a/Views/NewEquipmentDialog.axaml
+++ b/Views/NewEquipmentDialog.axaml
@@ -9,12 +9,13 @@
x:Class="GazpromApp.Views.NewEquipmentDialog"
x:DataType="vm:NewEquipmentDialogViewModel"
Title="Создание нового оборудования"
+ Icon="/Assets/ic_fluent_table_add_24_filled (Custom).png"
WindowStartupLocation="CenterOwner"
Closed="Window_OnClosed">
-
+
diff --git a/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache b/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache
index ef9c195..efe4197 100644
--- a/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache
+++ b/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache
@@ -1 +1 @@
-c7763810c7c9fe86f032a444db49dfe85bfa277e9aa1a02ca59b8891c1bb6265
+004891c51b7c26ff54260c1cbfcff302500ddbafa20549c101da76cc7da60e8a
diff --git a/obj/Debug/net8.0/Avalonia/resources b/obj/Debug/net8.0/Avalonia/resources
index 1574e1b..6744473 100644
Binary files a/obj/Debug/net8.0/Avalonia/resources and b/obj/Debug/net8.0/Avalonia/resources differ
diff --git a/obj/Debug/net8.0/GazpromApp.AssemblyInfo.cs b/obj/Debug/net8.0/GazpromApp.AssemblyInfo.cs
index fddd7b9..caa76f9 100644
--- a/obj/Debug/net8.0/GazpromApp.AssemblyInfo.cs
+++ b/obj/Debug/net8.0/GazpromApp.AssemblyInfo.cs
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("GazpromApp")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8806d287870ff52e89394ebf3740eb9130b2fa6c")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5816f21e6cc989b7059d5a18a1f56939b27bf40d")]
[assembly: System.Reflection.AssemblyProductAttribute("GazpromApp")]
[assembly: System.Reflection.AssemblyTitleAttribute("GazpromApp")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/obj/Debug/net8.0/GazpromApp.AssemblyInfoInputs.cache b/obj/Debug/net8.0/GazpromApp.AssemblyInfoInputs.cache
index e669ef4..8e37052 100644
--- a/obj/Debug/net8.0/GazpromApp.AssemblyInfoInputs.cache
+++ b/obj/Debug/net8.0/GazpromApp.AssemblyInfoInputs.cache
@@ -1 +1 @@
-fca2f4a4c1933f8850b7151879ad727af085b4f7d1499d3a22126a355fadba2d
+22f6a7bf36b71d326c8840f0501afa961a7d4f13e9163340a4acf3e167738c72