Пример #1
0
        private void OnMouseDown(object sender, MouseEventArgs e)
        {
            restart       = World.Running;
            World.Running = false;

            painting    = true;
            LastPainted = ViewPort.GetCellAt(e.Location);
            World.Toggle(LastPainted);
            World.Update();
        }
Пример #2
0
 private void OnMouseMove(object sender, MouseEventArgs e)
 {
     if (painting)
     {
         var lp = ViewPort.GetCellAt(e.Location);
         if (lp != LastPainted)
         {
             LastPainted = ViewPort.GetCellAt(e.Location);
             World.Toggle(LastPainted);
             World.Update();
         }
     }
 }