diff --git a/Casino/Blackjack.xaml b/Casino/Blackjack.xaml
new file mode 100644
index 0000000..aa61493
--- /dev/null
+++ b/Casino/Blackjack.xaml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Casino/Blackjack.xaml.cs b/Casino/Blackjack.xaml.cs
new file mode 100644
index 0000000..86a6d46
--- /dev/null
+++ b/Casino/Blackjack.xaml.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Casino
+{
+ ///
+ /// Interaktionslogik für Blackjack.xaml
+ ///
+ public partial class Blackjack : Window
+ {
+ public Blackjack()
+ {
+ InitializeComponent();
+ LoadCard(28);
+ }
+
+ private void LoadCard(int Bild)
+ {
+ Database db = new Database();
+ byte[] img = db.GetCardImage(Bild);//2-10
+
+ Bild_1.Source = ByteArrayToImage(img);
+ }
+
+ private BitmapImage ByteArrayToImage(byte[] bytes)
+ {
+ BitmapImage image = new BitmapImage();
+ using (MemoryStream ms = new MemoryStream(bytes))
+ {
+ image.BeginInit();
+ image.CacheOption = BitmapCacheOption.OnLoad;
+ image.StreamSource = ms;
+ image.EndInit();
+ }
+ return image;
+ }
+ }
+}
diff --git a/Casino/MainWindow.xaml b/Casino/MainWindow.xaml
index 013ee40..b398770 100644
--- a/Casino/MainWindow.xaml
+++ b/Casino/MainWindow.xaml
@@ -9,6 +9,7 @@
+
diff --git a/Casino/MainWindow.xaml.cs b/Casino/MainWindow.xaml.cs
index 934c557..c889a07 100644
--- a/Casino/MainWindow.xaml.cs
+++ b/Casino/MainWindow.xaml.cs
@@ -30,9 +30,15 @@ namespace Casino
private void Sound_Click(object sender, RoutedEventArgs e)
{
Database data = new Database();
- byte[] blobData = data.GetSound(2);
+ byte[] blobData = data.GetSound(3);
var audioService = new Audioplayer();
audioService.PlayMusic(blobData);
}
+
+ private void Blackjack_Click(object sender, RoutedEventArgs e)
+ {
+ Blackjack slotsWindow = new Blackjack();
+ slotsWindow.Show();
+ }
}
}
\ No newline at end of file