コード例 #1
0
ファイル: App.xaml.cs プロジェクト: GregoBalu/Leviathan
        private void Stats_Skills(object sender, Model.CharacterRelated.Character e)
        {
            Views.SkillsWindow        swnd = new Views.SkillsWindow();
            ViewModel.SkillsViewModel svm  = new ViewModel.SkillsViewModel(e.Skills, e.BaseStats.Experience.Level);
            swnd.DataContext = svm;

            swnd.ShowDialog();

            _tempPlayer.Skills = svm.Skills;
        }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: GregoBalu/Leviathan
        private void Battle_SelectSkill(object sender, EventArgs e)
        {
            ViewModel.GameViewModel   gameVM = (ViewModel.GameViewModel)sender;
            Views.SkillsWindow        swnd   = new Views.SkillsWindow();
            ViewModel.SkillsViewModel svm    = new ViewModel.SkillsViewModel(gameVM.Player.Skills, gameVM.Player.BaseStats.Experience.Level);
            svm.SelectedSkillEvent += new EventHandler(Battle_SelectedSkill);
            swnd.DataContext        = svm;

            _dialogWindow = swnd;
            swnd.ShowDialog();
            _dialogWindow = null;

            if (svm != null)
            {
                gameVM.SelectSkill(svm.Selected);
            }
            gameVM.Player.Skills = svm.Skills;
        }