Пример #1
0
 private void NoblesButton_Click(object sender, EventArgs e)
 {
     using (var noblesView = new NoblesView(NoblesButton.Tag as IEnumerable <Noble>, selectionAvaliable: false, "Nobles"))
     {
         noblesView.ShowDialog();
     }
 }
Пример #2
0
        public Noble Receive()
        {
            var nobilityService = new NobilityService(nobilityBox, player);
            var potencialNobles = nobilityService.CanReceiveVisitFrom();

            if (potencialNobles.Any())
            {
                using (var noblesView = new NoblesView(potencialNobles))
                {
                    noblesView.ShowDialog();
                    var chosenNoble = noblesView.SelectedNoble;
                    nobilityService.ReceiveVisit(chosenNoble);
                    return(chosenNoble);
                }
            }
            return(null);
        }