예제 #1
0
 public override void Activate(object sender, MouseEventArgs e)
 {
     if (ActiveStatus)
     {
         Image.Image = Extentions.GetImage($"{ Neighbors.Count(i => i is Mine)}.png");
     }
 }
예제 #2
0
 public override void Activate(object sender, MouseEventArgs e)
 {
     base.Activate(sender, e);
     if (ActiveStatus)
     {
         Image.Image = Extentions.GetImage("ActiveMine.png");
     }
 }
예제 #3
0
 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));
     }
 }
예제 #4
0
 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);
 }
예제 #5
0
 public void Show()
 {
     Image.Image = Extentions.GetImage("ShowMine.png");
 }
예제 #6
0
 public void Explosion()
 {
     Image.Image = Extentions.GetImage("ExplosiveMine.png");
 }