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