protected override void OnFinalize() { this._gauntletLayer.IsFocusLayer = false; ScreenManager.TryLoseFocus((ScreenLayer)this._gauntletLayer); this._dataSource.OnFinalize(); this._dataSource = (VartsLeaderboardCaravanVM)null; this._gauntletLayer.ReleaseMovie(this._movie); this.MenuViewContext.RemoveLayer((ScreenLayer)this._gauntletLayer); this._movie = (GauntletMovie)null; this._gauntletLayer = (GauntletLayer)null; base.OnFinalize(); }
protected override void OnInitialize() { base.OnInitialize(); this._dataSource = new VartsLeaderboardCaravanVM() { IsEnabled = true }; GauntletLayer gauntletLayer = new GauntletLayer(205, "GauntletLayer"); gauntletLayer.Name = "VartsLeaderboardCaravanMenuView"; this._gauntletLayer = gauntletLayer; this._gauntletLayer.InputRestrictions.SetInputRestrictions(true, InputUsageMask.All); this._gauntletLayer.Input.RegisterHotKeyCategory(HotKeyManager.GetCategory("GenericPanelGameKeyCategory")); this._movie = this._gauntletLayer.LoadMovie("VartsLeaderboardCaravanMenuViewMovie", (ViewModel)this._dataSource); this._gauntletLayer.IsFocusLayer = true; ScreenManager.TrySetFocus((ScreenLayer)this._gauntletLayer); this.MenuViewContext.AddLayer((ScreenLayer)this._gauntletLayer); }