/// <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; }
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); } }
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(); }
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; } //} }
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); }
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(); }
public ConsoleStartmenu(PlayerController playerController, IGenericViewModel viewModel) { this.viewModel = viewModel; this.playerController = playerController; Players = playerController.GetPlayers(); }
/// <summary> /// Runs when the application is started. /// </summary> public GameController(IStartMenu sm, IGenericViewModel vm) { this.sm = sm; this.vm = vm; Initialize(); }