Visual fixes

This commit is contained in:
retr0volkov
2025-07-05 20:50:36 +03:00 Unverified
parent de8c487f92
commit bd8b780a39
11 changed files with 52 additions and 7 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

+38
View File
@@ -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
};
}
}
+4
View File
@@ -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
+2 -1
View File
@@ -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">
+2 -1
View File
@@ -9,7 +9,8 @@
x:Class="GazpromApp.Views.ImageView"
x:DataType="vm:ImageViewModel"
Title="Просмотр изображения"
WindowStartupLocation="CenterOwner">
WindowStartupLocation="CenterOwner"
CanResize="False">
<Design.DataContext>
<vm:ImageViewModel/>
</Design.DataContext>
+1 -1
View File
@@ -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"
>
+2 -1
View File
@@ -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">
<Design.DataContext>
<vm:NewEquipmentDialogViewModel/>
</Design.DataContext>
<Grid x:Name="Root">
<Grid Margin="12" x:Name="Root">
<Grid.ColumnDefinitions>
<ColumnDefinition MaxWidth="120"/>
<ColumnDefinition MinWidth="300"/>
@@ -1 +1 @@
c7763810c7c9fe86f032a444db49dfe85bfa277e9aa1a02ca59b8891c1bb6265
004891c51b7c26ff54260c1cbfcff302500ddbafa20549c101da76cc7da60e8a
Binary file not shown.
+1 -1
View File
@@ -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")]
@@ -1 +1 @@
fca2f4a4c1933f8850b7151879ad727af085b4f7d1499d3a22126a355fadba2d
22f6a7bf36b71d326c8840f0501afa961a7d4f13e9163340a4acf3e167738c72