private static Action Insert(Window win, BoardView game, Entity stillLife) { return(() => { var dlg = new AddEntityDialog(stillLife); Application.Refresh(); Application.Run(dlg); if (dlg.Success) { game.BeginAddEntityMode(win, dlg.Cells.ToList()); } Application.Refresh(); }); }