Weitere überarbeitung für Mainwindow
This commit is contained in:
@@ -89,5 +89,7 @@ namespace Casino
|
||||
return Convert.ToHexString(hash);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
<Button Content="Slots" HorizontalAlignment="Center" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" Width="79" Height="40" Click="Slots_Click" Background="Silver"/>
|
||||
<Button Content="Blackjack" HorizontalAlignment="Center" Grid.Column="3" Grid.Row="2" VerticalAlignment="Center" Height="40" Width="79" Click="Blackjack_Click" Background="Silver"/>
|
||||
<Button Content="Busfahrer" HorizontalAlignment="Center" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" Height="40" Width="79" Click="Busfahrer_Click" Background="Silver"/>
|
||||
<TextBlock Name="TxtName" VerticalAlignment="Top" Grid.Column="2" Height="30" Margin="0,10,0,0" Foreground="DarkSlateGray"/>
|
||||
<TextBlock Name="TxtKonto" VerticalAlignment="Top" Grid.Column="3" Height="30" Margin="0,10,0,0" Foreground="DarkSlateGray"/>
|
||||
<TextBlock Name="TxtName" VerticalAlignment="Top" Grid.Column="2" Height="30" Margin="0,10,0,0" Foreground="Gold"/>
|
||||
<TextBlock Name="TxtKonto" VerticalAlignment="Top" Grid.Column="3" Height="30" Margin="0,10,0,0" Foreground="Gold"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
|
||||
@@ -19,12 +19,13 @@ namespace Casino
|
||||
{
|
||||
public static int currentUser;
|
||||
ObservableCollection<User> users = new ObservableCollection<User>();
|
||||
Database db = new Database();
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
users = db.GetUser();
|
||||
setup();
|
||||
|
||||
TxtName.Text = "User: " + users[currentUser].Name.ToString();
|
||||
TxtKonto.Text = "Konto: " + users[currentUser].Geld.ToString();
|
||||
}
|
||||
private void Slots_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -45,5 +46,13 @@ namespace Casino
|
||||
Busfahrer slotsWindow = new Busfahrer();
|
||||
slotsWindow.Show();
|
||||
}
|
||||
|
||||
private void setup()
|
||||
{
|
||||
|
||||
TxtName.Text = "User: " + users[currentUser].Name.ToString();
|
||||
TxtKonto.Text = "Konto: " + users[currentUser].Geld.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user