diff --git a/Magazyn_Client/Magazyn/App.xaml.cs b/Magazyn_Client/Magazyn/App.xaml.cs
index 78c801a..64ce2f8 100644
--- a/Magazyn_Client/Magazyn/App.xaml.cs
+++ b/Magazyn_Client/Magazyn/App.xaml.cs
@@ -13,12 +13,6 @@ namespace Magazyn
///
public partial class App : Application
{
- protected override void OnStartup(StartupEventArgs e)
- {
- ChangeTheme(2);
- base.OnStartup(e);
- }
-
public void ChangeTheme(int index)
{
Resources.MergedDictionaries.Clear();
diff --git a/Magazyn_Client/Magazyn/MainWindow.xaml b/Magazyn_Client/Magazyn/MainWindow.xaml
index d123409..9849de2 100644
--- a/Magazyn_Client/Magazyn/MainWindow.xaml
+++ b/Magazyn_Client/Magazyn/MainWindow.xaml
@@ -23,7 +23,7 @@
-
+
diff --git a/Magazyn_Client/Magazyn/MainWindow.xaml.cs b/Magazyn_Client/Magazyn/MainWindow.xaml.cs
index 2a10ec6..5cc8b41 100644
--- a/Magazyn_Client/Magazyn/MainWindow.xaml.cs
+++ b/Magazyn_Client/Magazyn/MainWindow.xaml.cs
@@ -25,7 +25,6 @@ namespace Magazyn
{
public partial class MainWindow : Window
{
- int i = 0;
public int size = 4;
public int page = 0;
@@ -38,8 +37,12 @@ namespace Magazyn
public MainWindow()
{
InitializeComponent();
- this.Initialized += MainWindow_Initialized; ;
-
+ this.Initialized += MainWindow_Initialized;
+ themeCombo.Items.Add("Jasno/Niebieski");
+ themeCombo.Items.Add("Jasno/Zielony");
+ themeCombo.Items.Add("Ciemno/Pomarańczowy");
+ themeCombo.SelectedIndex = 0;
+
client = new HttpClient();
}
@@ -155,10 +158,10 @@ namespace Magazyn
RefreshListOfFruits();
}
- private void themeButton_Click(object sender, RoutedEventArgs e)
+ private void themeCombo_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var app = App.Current as App;
- app.ChangeTheme(i++);
+ app.ChangeTheme(themeCombo.SelectedIndex);
}
}
}