示例#1
0
        private async void XAML_CurrentAPInvest_Clicked(object sender, object e)
        {
            var dialog = new InvestAPDialog();

            dialog.Mode = InvestApDialogMode.InvestOnly;
            var result = await dialog.ShowAsync();

            if (result == ContentDialogResult.Secondary)
            {
                viewModel.APInvested = dialog.Value;
            }
        }
示例#2
0
        private async void XAML_CurrentAPInvest_Clicked(object sender, object e)
        {
            var dialog = new InvestAPDialog();

            dialog.Mode = InvestApDialogMode.Invest;
            var result = await dialog.ShowAsync();

            if (result == ContentDialogResult.Secondary)
            {
                var currentValue = Game.Charakter.Other.APInvested;
                if (dialog.Add)
                {
                    currentValue = currentValue + dialog.Value;
                }
                else
                {
                    currentValue = currentValue - dialog.Value;
                }
                Game.Charakter.Other.APInvested = currentValue;
            }
        }