58 lines
1.4 KiB
C#
58 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
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.Navigation;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace ExeLauncher.GUI
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for MainWindow.xaml
|
|
/// </summary>
|
|
public partial class MainWindow : Window
|
|
{
|
|
public string ApplicationName { get; set; } = "";
|
|
public string ApplicationIconPath { get; set; } = "";
|
|
|
|
public ObservableCollection<ApplicationModel> Applications { get; set; }
|
|
|
|
public MainWindow()
|
|
{
|
|
Applications = new()
|
|
{
|
|
new ApplicationModel()
|
|
};
|
|
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Button_Icon(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
}
|