public SpellTargetWindow(Spell spell) : this() { this.Spell = spell; maxLevelUpDown.Value = spell.MaximumLevel; maxLevelCheckBox.IsChecked = spell.CurrentLevel < spell.MaximumLevel; if (spell.TargetMode == SpellTargetMode.None) { targetModeComboBox.SelectedValue = "None"; targetModeComboBox.IsEnabled = false; } else { targetModeComboBox.SelectedValue = "Self"; } if (!SpellMetadataManager.Instance.ContainsSpell(spell.Name)) { WarningBorder.Visibility = Visibility.Visible; var opacityAnimation = new DoubleAnimation(1.0, 0.25, new Duration(TimeSpan.FromSeconds(0.4))); opacityAnimation.AccelerationRatio = 0.75; opacityAnimation.AutoReverse = true; opacityAnimation.RepeatBehavior = RepeatBehavior.Forever; WarningIcon.BeginAnimation(FrameworkElement.OpacityProperty, opacityAnimation); } }
public static void ReleaseAll() { InfoIcon.Dispose(); WarningIcon.Dispose(); QuestionIcon.Dispose(); }