/// <summary>Provides the observer with new data.</summary> /// <param name="value">The current notification information.</param> public void OnNext(IMana value) { if (!this.Skill.SourceAbility.IsValid) { return; } if (this.Skill.Level.Current == 0) { this.BorderColor = this.NotLearnedColor; return; } if (value.Current < this.Skill.SourceAbility.ManaCost) { this.manaNumber.Value = Math.Min(Math.Floor(this.Skill.SourceAbility.ManaCost - value.Current), 99); this.manaNumber.CenterOnRectangle(this.blackOverlay); // this.manaText.Text = // Math.Min(Math.Floor(this.Skill.SourceAbility.ManaCost - value.Current), 99) // .ToString(CultureInfo.CurrentCulture); // this.manaText.CenterOnRectangle(this.blackOverlay); this.BorderColor = this.NotEnoughManaColor; } else { if (!this.Skill.CastData.IsOnCooldown) { this.BorderColor = this.ReadyColor; } } }
public FormPrincipal(IMana mana) { Mana = mana; InitializeComponent(); TibiaClient.FindTibiaClientProcess(); InitializeTimers(); StartTimers(); LoadConfiguration(); }
/// <summary>Provides the observer with new data.</summary> /// <param name="value">The current notification information.</param> public void OnNext(IMana value) { this.FillPercentage = value.Percentage; }