mirror of
https://github.com/SirLecram/HospitalServerManager
synced 2024-07-17 10:25:30 +02:00
![Marcel Grześ](/assets/img/avatar_default.png)
- EditRecordDialog has been added and edited; Others pages (View) has been added and completed; - All ViewModel and Models was completed; - WebService, ApiComandProvider has full funcionality, - New interface has been created; - Application is working now :) it's time to refractoring and testing
56 lines
1.9 KiB
C#
56 lines
1.9 KiB
C#
using HospitalServerManager.InterfacesAndEnums;
|
|
using HospitalServerManager.ViewModel.Controllers;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices.WindowsRuntime;
|
|
using Windows.Foundation;
|
|
using Windows.Foundation.Collections;
|
|
using Windows.UI.Xaml;
|
|
using Windows.UI.Xaml.Controls;
|
|
using Windows.UI.Xaml.Controls.Primitives;
|
|
using Windows.UI.Xaml.Data;
|
|
using Windows.UI.Xaml.Input;
|
|
using Windows.UI.Xaml.Media;
|
|
using Windows.UI.Xaml.Navigation;
|
|
|
|
//Szablon elementu Pusta strona jest udokumentowany na stronie https://go.microsoft.com/fwlink/?LinkId=234238
|
|
|
|
namespace HospitalServerManager.View
|
|
{
|
|
/// WebService powinien byc chyba wlasciwoscia w roznych kontrolerach np. GetController/PutController itp.
|
|
public sealed partial class MainFrameView : Page
|
|
{
|
|
private INavigator Navigator { get; set; }
|
|
private IProvideType TypeProvider { get; set; }
|
|
public MainFrameView()
|
|
{
|
|
this.InitializeComponent();
|
|
InitializeProperties();
|
|
}
|
|
private void AppBarButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
string pageTypeName = (sender as AppBarButton).Tag.ToString();
|
|
Type pageType = TypeProvider.GetTypeFromString(pageTypeName);
|
|
|
|
IPageNavigateable page = Navigator.ChangeFrame(pageType, mainFrame);
|
|
}
|
|
private void InitializeProperties()
|
|
{
|
|
IValidateIfInterfaceIsImplemented validator = new ViewModel.Validators.InterfaceImplementValidator();
|
|
Navigator = new ViewNavigator(validator, new PatientsPage());
|
|
// TODO: Dodać pozostałe Page
|
|
TypeProvider = new ViewModel.DataProvider.NavigationPageTypeProvider(validator,
|
|
new List<Type>
|
|
{
|
|
typeof(PatientsPage), typeof(DoctorsPage), typeof(AdmissionsPage), typeof(DiagnosesPage),
|
|
typeof(RoomsPage),
|
|
});
|
|
Type pageType = TypeProvider.GetTypeFromString("AdmissionsPage");
|
|
|
|
Navigator.ChangeFrame(pageType, mainFrame);
|
|
}
|
|
}
|
|
}
|