public override void Activate(object sender, MouseEventArgs e) { if (ActiveStatus) { Image.Image = Extentions.GetImage($"{ Neighbors.Count(i => i is Mine)}.png"); } }
public override void Activate(object sender, MouseEventArgs e) { base.Activate(sender, e); if (ActiveStatus) { Image.Image = Extentions.GetImage("ActiveMine.png"); } }
public override void Activate(object sender, MouseEventArgs e) { if (ActiveStatus) { Image.Image = Extentions.GetImage("ActiveEmptyCell.png"); Neighbors .Where(i => !i.ActiveStatus && i.IsFlag) .ToList() .ForEach(i => i.Activate(sender, e)); } }
public virtual void Activate(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left && IsFlag) { ActiveStatus = true; } else if (e.Button == MouseButtons.Right) { if (!ActiveStatus) { Image.Image = IsFlag ? Extentions.GetImage("Flag.png") : Extentions.GetImage("DeactiveCell.png"); OnFlagChange(this, new FlagEventArgs(IsFlag)); IsFlag = !IsFlag; } } OnActive(this, null); }
public void Show() { Image.Image = Extentions.GetImage("ShowMine.png"); }
public void Explosion() { Image.Image = Extentions.GetImage("ExplosiveMine.png"); }