Implemented UI

This commit is contained in:
2021-12-04 13:01:52 +01:00
parent 3795774023
commit 0d2f2a6653
3 changed files with 59 additions and 34 deletions

View File

@@ -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<ApplicationModel> 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);
}
}
}
}