Пример #1
0
        private async void Profiles_ComboBox_ItemClicked(object sender, ComboBoxItemContainer item)
        {
            if (await ConfirmLeave((FrameworkElement)sender) == false)
            {
                return;
            }

            var ctx          = new SaveData.SaveData();
            var profile      = (SaveData.Models.Profile)item.DataContext;
            var panelButtons = ctx.PanelButtons.Where(p => p.Profile.Id == profile.Id);
            var formData     = new EditorFormData {
                Profile      = profile,
                PanelButtons = panelButtons
            };

            LoadProfile(formData);
            _hasUnsavedChanges = false;

            Profiles_ComboBox.Close();
            BlockNavigator.NavigateBack((FrameworkElement)sender);
        }
Пример #2
0
 private void OnButtonB(object sender, GamePadEventArgs args)
 {
     Disable();
     BlockNavigator.NavigateBack(ButtonsCanvas);
 }