/// <summary> /// Called when [casino view model changed]. /// </summary> /// <param name="o">The o.</param> /// <param name="args">The <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> instance containing the event data.</param> private static void OnCasinoViewModelChanged(DependencyObject o, DependencyPropertyChangedEventArgs args) { CasinoView me = o as CasinoView; // Listen for events. me.CasinoViewModel.GoToCasinoCommand.Executed += new Apex.MVVM.CommandEventHandler(me.GoToCasinoCommand_Executed); me.CasinoViewModel.GoToSpiderSolitaireCommand.Executed += new Apex.MVVM.CommandEventHandler(me.GoToSpiderSolitaireCommsand_Executed); me.CasinoViewModel.GoToKlondikeSolitaireCommand.Executed += new Apex.MVVM.CommandEventHandler(me.GoToKlondikeSolitaireCommand_Executed); me.CasinoViewModel.SettingsCommand.Executed += new Apex.MVVM.CommandEventHandler(me.SettingsCommand_Executed); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.casinoView = ((SolitaireGames.Casino.CasinoView)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.casinoViewModel = ((SolitaireGames.Casino.CasinoView)(target)); return; case 2: this.mainPivot = ((Apex.Controls.PivotControl)(target)); return; case 3: this.klondikeSolitaireView = ((SolitaireGames.KlondikeSolitaire.KlondikeSolitaireView)(target)); return; case 4: this.spiderSolitaireView = ((SolitaireGames.SpiderSolitaire.SpiderSolitaireView)(target)); return; } this._contentLoaded = true; }