diff --git a/ExeLauncher.GUI/ApplicationModel.cs b/ExeLauncher.GUI/ApplicationModel.cs
index f4be7ee..e6c4740 100644
--- a/ExeLauncher.GUI/ApplicationModel.cs
+++ b/ExeLauncher.GUI/ApplicationModel.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace ExeLauncher.GUI
{
- internal record ApplicationModel
+ public record ApplicationModel
{
public int Number { get; set; } = 1;
public string Path { get; set; } = "";
diff --git a/ExeLauncher.GUI/MainWindow.xaml b/ExeLauncher.GUI/MainWindow.xaml
index 050bf9c..0a488f4 100644
--- a/ExeLauncher.GUI/MainWindow.xaml
+++ b/ExeLauncher.GUI/MainWindow.xaml
@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:ExeLauncher.GUI"
mc:Ignorable="d"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
- Title="MainWindow" Height="450" Width="800">
+ Title="ExeLauncher" MinHeight="335" Height="480" Width="800">
@@ -16,36 +16,50 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ExeLauncher.GUI/MainWindow.xaml.cs b/ExeLauncher.GUI/MainWindow.xaml.cs
index 3feae5a..d0a9aa8 100644
--- a/ExeLauncher.GUI/MainWindow.xaml.cs
+++ b/ExeLauncher.GUI/MainWindow.xaml.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -23,8 +24,15 @@ namespace ExeLauncher.GUI
public string ApplicationName { get; set; } = "";
public string ApplicationIconPath { get; set; } = "";
+ public ObservableCollection Applications { get; set; }
+
public MainWindow()
{
+ Applications = new()
+ {
+ new ApplicationModel()
+ };
+
InitializeComponent();
}
@@ -35,12 +43,15 @@ namespace ExeLauncher.GUI
private void Button_Add(object sender, RoutedEventArgs e)
{
-
+ Applications.Add(new ApplicationModel() { Number = Applications.Count + 1 });
}
private void Button_Remove(object sender, RoutedEventArgs e)
{
-
+ if (Applications.Count > 1)
+ {
+ Applications.RemoveAt(Applications.Count - 1);
+ }
}
}
}