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