diff --git a/UP01Task2App/UP01Task2App.slnx b/UP01Task2App/UP01Task2App.slnx new file mode 100644 index 0000000..8b95579 --- /dev/null +++ b/UP01Task2App/UP01Task2App.slnx @@ -0,0 +1,3 @@ + + + diff --git a/UP01Task2App/UP01Task2App/App.xaml b/UP01Task2App/UP01Task2App/App.xaml new file mode 100644 index 0000000..89f329d --- /dev/null +++ b/UP01Task2App/UP01Task2App/App.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff --git a/UP01Task2App/UP01Task2App/App.xaml.cs b/UP01Task2App/UP01Task2App/App.xaml.cs new file mode 100644 index 0000000..24692d2 --- /dev/null +++ b/UP01Task2App/UP01Task2App/App.xaml.cs @@ -0,0 +1,14 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace UP01Task2App +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } + +} diff --git a/UP01Task2App/UP01Task2App/AssemblyInfo.cs b/UP01Task2App/UP01Task2App/AssemblyInfo.cs new file mode 100644 index 0000000..b0ec827 --- /dev/null +++ b/UP01Task2App/UP01Task2App/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/UP01Task2App/UP01Task2App/Styles/ButtonStyle.xaml b/UP01Task2App/UP01Task2App/Styles/ButtonStyle.xaml new file mode 100644 index 0000000..dc9f04c --- /dev/null +++ b/UP01Task2App/UP01Task2App/Styles/ButtonStyle.xaml @@ -0,0 +1,58 @@ + + + \ No newline at end of file diff --git a/UP01Task2App/UP01Task2App/Styles/ComboBoxStyle.xaml b/UP01Task2App/UP01Task2App/Styles/ComboBoxStyle.xaml new file mode 100644 index 0000000..b9a93ab --- /dev/null +++ b/UP01Task2App/UP01Task2App/Styles/ComboBoxStyle.xaml @@ -0,0 +1,30 @@ + + + + + \ No newline at end of file diff --git a/UP01Task2App/UP01Task2App/Styles/DatePickerStyle.xaml b/UP01Task2App/UP01Task2App/Styles/DatePickerStyle.xaml new file mode 100644 index 0000000..626c74b --- /dev/null +++ b/UP01Task2App/UP01Task2App/Styles/DatePickerStyle.xaml @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff --git a/UP01Task2App/UP01Task2App/Styles/TextBoxStyle.xaml b/UP01Task2App/UP01Task2App/Styles/TextBoxStyle.xaml new file mode 100644 index 0000000..b679aa0 --- /dev/null +++ b/UP01Task2App/UP01Task2App/Styles/TextBoxStyle.xaml @@ -0,0 +1,21 @@ + + + \ No newline at end of file diff --git a/UP01Task2App/UP01Task2App/UP01Task2App.csproj b/UP01Task2App/UP01Task2App/UP01Task2App.csproj new file mode 100644 index 0000000..6e6420e --- /dev/null +++ b/UP01Task2App/UP01Task2App/UP01Task2App.csproj @@ -0,0 +1,11 @@ + + + + WinExe + net10.0-windows + enable + enable + true + + + diff --git a/UP01Task2App/UP01Task2App/ViewModels/BaseViewModel.cs b/UP01Task2App/UP01Task2App/ViewModels/BaseViewModel.cs new file mode 100644 index 0000000..9901540 --- /dev/null +++ b/UP01Task2App/UP01Task2App/ViewModels/BaseViewModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace UP01Task2App.ViewModels +{ + using System.ComponentModel; + using System.Runtime.CompilerServices; + + public class BaseViewModel : INotifyPropertyChanged + { + public event PropertyChangedEventHandler PropertyChanged; + + protected void OnPropertyChanged([CallerMemberName] string name = null) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); + } + } +} diff --git a/UP01Task2App/UP01Task2App/ViewModels/RelayCommand.cs b/UP01Task2App/UP01Task2App/ViewModels/RelayCommand.cs new file mode 100644 index 0000000..a8b28e2 --- /dev/null +++ b/UP01Task2App/UP01Task2App/ViewModels/RelayCommand.cs @@ -0,0 +1,20 @@ +using System; +using System.Windows.Input; + +public class RelayCommand : ICommand +{ + private readonly Action _execute; + private readonly Func _canExecute; + + public RelayCommand(Action execute, Func canExecute = null) + { + _execute = execute; + _canExecute = canExecute; + } + + public bool CanExecute(object parameter) => _canExecute?.Invoke() ?? true; + + public void Execute(object parameter) => _execute(); + + public event EventHandler CanExecuteChanged; +} \ No newline at end of file diff --git a/UP01Task2App/UP01Task2App/Windows/AppointmentWindow.xaml b/UP01Task2App/UP01Task2App/Windows/AppointmentWindow.xaml new file mode 100644 index 0000000..ffd3a19 --- /dev/null +++ b/UP01Task2App/UP01Task2App/Windows/AppointmentWindow.xaml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + +