Skip to content

Commit 77ee1a8

Browse files
author
STI-PC
committed
chore: quick update
1 parent 3e864ec commit 77ee1a8

File tree

7 files changed

+26
-7
lines changed

7 files changed

+26
-7
lines changed

CineWave.sln.DotSettings.user

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939

4040

41+
4142

4243

4344
</wpf:ResourceDictionary>

CineWave/Components/SeatBookingRegistrationForm.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
</StackPanel>
7070

7171
<StackPanel Margin="5" Visibility="{Binding IsMovieFree}">
72-
<Label Content="_payment"
72+
<Label Content="Payment"
7373
FontWeight="Medium"
7474
Foreground="{StaticResource QuinaryBrush}" />
7575
<moderncontrols:ModernTextBox

CineWave/MVVM/View/Login/LoginWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
</StackPanel>
135135
<StackPanel Grid.Row="2" Orientation="Horizontal" FlowDirection="RightToLeft">
136136
<TextBlock Margin="5 0 0 0"
137-
Text="version 0.0.10-beta© 2023 CineWave"
137+
Text="version 0.0.11-beta© 2023 CineWave"
138138
Foreground="{StaticResource QuinaryBrush}" />
139139
</StackPanel>
140140
</Grid>

CineWave/MVVM/View/Reservations/SeatBooking/SeatBookingReservationForm.xaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
xmlns:moderncontrols="clr-namespace:org.russkyc.moderncontrols;assembly=Russkyc.ModernControls.WPF"
77
xmlns:helpers="clr-namespace:CineWave.Helpers"
88
mc:Ignorable="d"
9-
Height="350"
9+
Height="450"
1010
WindowStyle="None"
1111
WindowStartupLocation="CenterScreen"
1212
Background="Transparent"
@@ -27,7 +27,7 @@
2727
<StackPanel>
2828
<StackPanel MouseEnter="OnEnterControlBar"
2929
MouseLeftButtonDown="OnMoveWindow">
30-
<Label Content="Seat Booking Registration"
30+
<Label Content="Seat Booking Reservation"
3131
HorizontalAlignment="Center"
3232
FontSize="16"
3333
Margin="0 10"
@@ -68,8 +68,19 @@
6868
Foreground="{StaticResource QuinaryBrush}" />
6969
</StackPanel>
7070

71+
<StackPanel Margin="5">
72+
<Label Content="Customer Name"
73+
FontWeight="Medium"
74+
Foreground="{StaticResource QuinaryBrush}" />
75+
<moderncontrols:ModernTextBox
76+
HelperText="Required"
77+
Text="{Binding CustomerName}"
78+
DefaultBackground="{StaticResource PrimaryBrush}"
79+
Foreground="{StaticResource QuinaryBrush}" />
80+
</StackPanel>
81+
7182
<StackPanel Margin="5" Visibility="{Binding IsMovieFree}">
72-
<Label Content="_payment"
83+
<Label Content="Payment"
7384
FontWeight="Medium"
7485
Foreground="{StaticResource QuinaryBrush}" />
7586
<moderncontrols:ModernTextBox

CineWave/MVVM/ViewModel/Reservations/SeatBooking/RSeatCardViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using CineWave.Messages.ManageMovies;
66
using CineWave.Messages.SeatsBooking;
77
using CineWave.MVVM.Model.SeatsBooking;
8+
using CineWave.MVVM.View.Reservations.SeatBooking;
89
using CommunityToolkit.Mvvm.ComponentModel;
910
using CommunityToolkit.Mvvm.Input;
1011
using CommunityToolkit.Mvvm.Messaging;
@@ -35,7 +36,7 @@ public void OpenForm()
3536
MessageBox.Show("This seat is already taken or no movie is currently showing!");
3637
return;
3738
}
38-
WindowHelper.ShowOrCloseWindow((App.ServiceProvider ?? throw new InvalidOperationException()).GetRequiredService<SeatBookingRegistrationForm>());
39+
WindowHelper.ShowOrCloseWindow((App.ServiceProvider ?? throw new InvalidOperationException()).GetRequiredService<SeatBookingReservationForm>());
3940
WeakReferenceMessenger.Default.Send(new GetSeatInfoMessage(new BookMovieInfo(MovieName, MoviePrice, SeatNumber ?? "")));
4041
}
4142

CineWave/MVVM/ViewModel/Reservations/SeatBooking/SeatBookingReservationFormViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public void OnBuy()
9797
[RelayCommand]
9898
// ReSharper disable once MemberCanBePrivate.Global
9999
#pragma warning disable CA1822
100+
// ReSharper disable once MemberCanBeMadeStatic.Global
100101
public void OnCancel()
101102
{
102103
Debug.Assert(App.ServiceProvider != null, "App.ServiceProvider != null");

CineWave/MVVM/ViewModel/SeatsBooking/SeatBookingRegistrationFormViewModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Linq;
55
using System.Threading.Tasks;
66
using System.Windows;
7-
using CineWave.Components;
87
using CineWave.DB.Core;
98
using CineWave.Helpers;
109
using CineWave.Messages.SeatsBooking;
@@ -24,6 +23,7 @@ public partial class SeatBookingRegistrationFormViewModel : BaseViewModel, IReci
2423
[ObservableProperty] private string _isMovieFree = "Visible";
2524
[ObservableProperty] private string? _movieName;
2625
[ObservableProperty] private string? _moviePrice;
26+
[ObservableProperty] private string? _customerName;
2727
[ObservableProperty] private string? _payment;
2828
[ObservableProperty] private string? _seatNumber;
2929

@@ -37,6 +37,11 @@ public SeatBookingRegistrationFormViewModel(IUnitOfWork unitOfWork)
3737
// ReSharper disable once MemberCanBePrivate.Global
3838
public void OnBuy()
3939
{
40+
if (CustomerName is null)
41+
{
42+
MessageBox.Show("Please enter customer name");
43+
return;
44+
}
4045
if (MoviePrice != "0" && CheckInputs())
4146
{
4247
MessageBox.Show("Please enter a valid payment");

0 commit comments

Comments
 (0)