using System.Windows; using BetterPatchFileCreator.Code; namespace BetterPatchFileCreator.XAML.Pages { /// /// Interaction logic for Dashboard.xaml /// public partial class Dashboard { public PatchConfig Config { get; set; } public Dashboard(PatchConfig config) { this.Config = config; InitializeComponent(); } private void CreatePatchClick(object sender, RoutedEventArgs e) { DataProvider.MainWindowInstance.Navigate(new CreatingPatch(Config)); } private void DeleteClick(object sender, RoutedEventArgs e) { if(MessageBox.Show("Are you sure to delete this configuration?", "Are you sure?", MessageBoxButton.YesNo) != MessageBoxResult.Yes) return; DataProvider.PatchConfigs.Remove(this.Config); DataProvider.MainWindowInstance.SelectConfig(); } } }