changed names

This commit is contained in:
shinichi
2020-10-07 21:21:12 +02:00
parent a23b268dc9
commit e09f4f1325
4 changed files with 8 additions and 8 deletions

View File

@@ -28,7 +28,7 @@ namespace ClientApp.ViewModels
internal void setLoginStatus(bool status) internal void setLoginStatus(bool status)
{ {
this.mainWindowViewModel.infoModel.ConnectedToServer = true; this.mainWindowViewModel.InfoModel.ConnectedToServer = true;
if (status) if (status)
{ {
this.mainWindowViewModel.SelectedViewModel = new MainViewModel(mainWindowViewModel); this.mainWindowViewModel.SelectedViewModel = new MainViewModel(mainWindowViewModel);

View File

@@ -18,12 +18,12 @@ namespace ClientApp.ViewModels
this.RetryServerCommand = new RelayCommand(() => this.RetryServerCommand = new RelayCommand(() =>
{ {
//try connect server //try connect server
this.MainWindowViewModel.infoModel.ConnectedToServer = true; this.MainWindowViewModel.InfoModel.ConnectedToServer = true;
}); });
this.RetryVREngineCommand = new RelayCommand(() => this.RetryVREngineCommand = new RelayCommand(() =>
{ {
//try connect vr-engine //try connect vr-engine
this.MainWindowViewModel.infoModel.ConnectedToVREngine = true; this.MainWindowViewModel.InfoModel.ConnectedToVREngine = true;
}); });
} }
} }

View File

@@ -8,14 +8,14 @@ namespace ClientApp.ViewModels
{ {
class MainWindowViewModel : ObservableObject class MainWindowViewModel : ObservableObject
{ {
public Info infoModel { get; set; } public Info InfoModel { get; set; }
public ObservableObject SelectedViewModel { get; set; } public ObservableObject SelectedViewModel { get; set; }
public Client client { get; } public Client client { get; }
public MainWindowViewModel(Client client) public MainWindowViewModel(Client client)
{ {
this.infoModel = new Info(); this.InfoModel = new Info();
this.client = client; this.client = client;
LoginViewModel loginViewModel = new LoginViewModel(this); LoginViewModel loginViewModel = new LoginViewModel(this);
SelectedViewModel = loginViewModel; SelectedViewModel = loginViewModel;

View File

@@ -21,17 +21,17 @@
<StackPanel Grid.Column="0" Grid.Row="0" Orientation="Horizontal" Margin="10"> <StackPanel Grid.Column="0" Grid.Row="0" Orientation="Horizontal" Margin="10">
<Label Content="Connected to server:"/> <Label Content="Connected to server:"/>
<Label Content="{Binding Path=MainWindowViewModel.infoModel.ConnectToServer}"/> <Label Content="{Binding Path=MainWindowViewModel.InfoModel.ConnectedToServer}"/>
</StackPanel> </StackPanel>
<StackPanel Grid.Column="1" Grid.Row="0" Orientation="Horizontal" Margin="10"> <StackPanel Grid.Column="1" Grid.Row="0" Orientation="Horizontal" Margin="10">
<Label Content="Connected to VR-Engine:"/> <Label Content="Connected to VR-Engine:"/>
<Label Content="{Binding Path=MainWindowViewModel.infoModel.ConnectedToVREngine}"/> <Label Content="{Binding Path=MainWindowViewModel.InfoModel.ConnectedToVREngine}"/>
</StackPanel> </StackPanel>
<StackPanel Grid.Column="2" Grid.Row="0" Orientation="Horizontal" Margin="10"> <StackPanel Grid.Column="2" Grid.Row="0" Orientation="Horizontal" Margin="10">
<Label Content="Doctor connected:"/> <Label Content="Doctor connected:"/>
<Label Content="{Binding Path=MainWindowViewModel.infoModel.DoctorConnected}"/> <Label Content="{Binding Path=MainWindowViewModel.InfoModel.DoctorConnected}"/>
</StackPanel> </StackPanel>
<Button Grid.Column="0" Grid.Row="1" Command="{Binding RetryServerCommand}" Width="50" Height="20"> <Button Grid.Column="0" Grid.Row="1" Command="{Binding RetryServerCommand}" Width="50" Height="20">