private void ContentControl_MouseEnter(object sender, MouseEventArgs e) { UserSkill.UserSkillInfo skill = ((sender as ContentControl).Content as StackPanel).DataContext as UserSkill.UserSkillInfo; SetSkillTextBlock(skill); skillPopup.PlacementTarget = ((sender as ContentControl).Content as StackPanel).Children[0]; skillPopup.IsOpen = true; }
void ChangeSkillLevel(UserSkill.UserSkillInfo skill, int i) { skill.Level += i; if (skill.Detail.OPTION.Count != 0) { MainWindow._user_data_manager.CalcUserData(); } }
void SetSkillTextBlock(UserSkill.UserSkillInfo skill) { TextBlock PopupText = new TextBlock { Text = skill.Name_Kor, Background = Brushes.Silver }; skillPopup.Child = PopupText; }
private void ContentControl_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { UserSkill.UserSkillInfo skill = ((sender as ContentControl).Content as StackPanel).DataContext as UserSkill.UserSkillInfo; ChangeSkillLevel(skill, 1); }
private void skill_lv_Wheel(object sender, MouseWheelEventArgs e) { UserSkill.UserSkillInfo skill = ((sender as ContentControl).Content as StackPanel).DataContext as UserSkill.UserSkillInfo; ChangeSkillLevel(skill, e.Delta > 0 ? 1 : -1); }