Implemented UI
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user