Exemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            _time = TimeSpan.FromSeconds(90);

            _timer = new DispatcherTimer(new TimeSpan(0, 0, 1), DispatcherPriority.Normal, delegate
            {
                tbTime.Text = _time.ToString(@"mm\:ss");
                if (_time == TimeSpan.Zero)
                {
                    _timer.Stop();
                }
                _time = _time.Add(TimeSpan.FromSeconds(-1));
            }, Application.Current.Dispatcher);

            this.DataContext = this;
            players          = new ObservableCollection <player>();
            LoadDraftBoard();
            players = new ObservableCollection <player>(players.OrderBy(p => p.firstName));

            DraftPool.GetBindingExpression(ListBox.ItemsSourceProperty).UpdateTarget();
        }
Exemplo n.º 2
0
 public AddToPoolDialog(DraftPool draftPool, QueryService queryService)
 {
     InitializeComponent();
     this.draftPool    = draftPool;
     this.queryService = queryService;
 }