Exemplo n.º 1
0
        private void AddExecutableButton_Click(object sender, RoutedEventArgs e)
        {
            if (!(this.DataContext is SettingsManager context))
            {
                return;
            }

            var addDialog = new ExecutableDetailDialog
            {
                Owner       = this,
                DataContext = context.Executables
            };

            addDialog.ShowAsync(ContentDialogPlacement.Popup);
        }
Exemplo n.º 2
0
        private void EditExecutableButton_Click(object sender, RoutedEventArgs e)
        {
            if (!(this.DataContext is SettingsManager context))
            {
                return;
            }
            if (!(ExecutablesListBox.SelectedItem is LeagueExecutable selectedExecutable))
            {
                return;
            }
            ;

            var editDialog = new ExecutableDetailDialog(selectedExecutable)
            {
                Owner       = this,
                DataContext = context.Executables
            };

            editDialog.ShowAsync(ContentDialogPlacement.Popup);
        }