This commit is contained in:
fabjuuuh
2020-10-12 16:50:02 +02:00
parent df5e276eb3
commit 301f6b447f
9 changed files with 93 additions and 11 deletions

View File

@@ -14,5 +14,6 @@
<views:LoginView />
<!-- This is a UserControl -->
</DataTemplate>
</Application.Resources>
</Application>

View File

@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
</Weavers>

74
DoctorApp/FodyWeavers.xsd Normal file
View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="TriggerDependentProperties" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the Dependent properties feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EnableIsChangedProperty" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the IsChanged property feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEquality" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SuppressWarnings" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to turn off build warnings from this weaver.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SuppressOnPropertyNameChangedWarning" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to turn off build warnings about mismatched On_PropertyName_Changed methods.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -9,9 +9,12 @@ namespace DoctorApp.ViewModels
{
public MainWindowViewModel MainWindowViewModel { get; set; }
Client client;
public MainViewModel(MainWindowViewModel mainWindowViewModel)
{
MainWindowViewModel = mainWindowViewModel;
this.MainWindowViewModel = mainWindowViewModel;
client = this.MainWindowViewModel.client;
}
}
}

View File

@@ -6,7 +6,7 @@ using System.Text;
namespace DoctorApp.ViewModels
{
class MainWindowViewModel
class MainWindowViewModel : ObservableObject
{
public Info InfoModel { get; set; }

View File

@@ -1,12 +1,13 @@
<Page x:Class="DoctorApp.Views.LoginView"
<UserControl x:Class="DoctorApp.Views.LoginView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DoctorApp.Views"
xmlns:viewModels="clr-namespace:DoctorApp.ViewModels"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="LoginView">
>
<DockPanel>
<StackPanel VerticalAlignment="Center" Width="auto">
@@ -20,4 +21,4 @@
</Popup>
</StackPanel>
</DockPanel>
</Page>
</UserControl>

View File

@@ -16,7 +16,7 @@ namespace DoctorApp.Views
/// <summary>
/// Interaction logic for LoginView.xaml
/// </summary>
public partial class LoginView : Page
public partial class LoginView : UserControl
{
public LoginView()
{

View File

@@ -1,4 +1,4 @@
<Page x:Class="DoctorApp.Views.MainView"
<UserControl x:Class="DoctorApp.Views.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -6,9 +6,9 @@
xmlns:local="clr-namespace:DoctorApp.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="MainView">
>
<Grid>
<Button Content="Button" HorizontalAlignment="Left" Margin="231,132,0,0" VerticalAlignment="Top"/>
</Grid>
</Page>
</UserControl>

View File

@@ -16,7 +16,7 @@ namespace DoctorApp.Views
/// <summary>
/// Interaction logic for MainView.xaml
/// </summary>
public partial class MainView : Page
public partial class MainView : UserControl
{
public MainView()
{