Exemplo n.º 1
0
 /// <summary>
 /// Runs when the application is started.
 /// </summary>
 public GameController(IStartMenu startMenu, IGenericViewModel viewModel, CardController cardController, PlayerController playerController)
 {
     this.startMenu        = startMenu;
     this.viewModel        = viewModel;
     this.cardController   = cardController;
     this.playerController = playerController;
 }
Exemplo n.º 2
0
 public PlayerController(IGenericViewModel viewModel)
 {
     this.viewModel = viewModel;
     foreach (Type item in Assembly.GetAssembly(typeof(BasePlayer)).GetTypes().Where(theType => theType.IsSubclassOf(typeof(BasePlayer))))
     {
         players.Add(item.Name, item);
     }
 }
Exemplo n.º 3
0
        public override void Destroy()
        {
            IGenericViewModel model = Model;
            //foreach (IGenericViewModel model in Models.Values)
            //{
            INotifyPropertyChanged npc = model as INotifyPropertyChanged;

            if (npc != null)
            {
                npc.PropertyChanged -= OnIsBusyChanged;
            }
            //}
            base.Destroy();
        }
Exemplo n.º 4
0
        public override void AfterPropertiesSet()
        {
            base.AfterPropertiesSet();
            busyCalls.Value = 0;
            ParamChecker.AssertNotNull(Model, "Model");
            IGenericViewModel model = Model;
            //foreach (IGenericViewModel model in Models.Values)
            //{
            INotifyPropertyChanged npc = model as INotifyPropertyChanged;

            if (npc != null)
            {
                npc.PropertyChanged += OnIsBusyChanged;
            }
            //}
        }
Exemplo n.º 5
0
        protected override bool CanExecuteIntern(String parameter)
        {
            bool result = base.CanExecuteIntern(parameter) && started;

            result &= busyCalls.Value == 0;
            if (!result)
            {
                return(false);
            }

            IGenericViewModel model = Model;

            //foreach (IGenericViewModel model in Models.Values)
            //{
            if (model.IsBusy)
            {
                result = false;
                //break;
            }
            //}
            return(result);
        }
Exemplo n.º 6
0
 public GenericAdapter()
 {
     this.viewModel = new GenericViewModel <T>();
 }
 public GenericDetailsView(IGenericViewModel genericViewModel, string EntityName)
     : this(genericViewModel)
 {
 }
 public GenericDetailsView(IGenericViewModel genericViewModel)
 {
     DataContext = genericViewModel;
     InitializeComponent();
 }
 public ConfigAdapter()
 {
     this.viewModel = new ConfigInterationViewModel();
 }
Exemplo n.º 10
0
 public ConsoleStartmenu(PlayerController playerController, IGenericViewModel viewModel)
 {
     this.viewModel        = viewModel;
     this.playerController = playerController;
     Players = playerController.GetPlayers();
 }
Exemplo n.º 11
0
 /// <summary>
 /// Runs when the application is started.
 /// </summary>
 public GameController(IStartMenu sm, IGenericViewModel vm)
 {
     this.sm = sm;
     this.vm = vm;
     Initialize();
 }