private void RefreshSlotsFor(MenuLevel level, SaveManagementLevel.SMOperation operation, Func <SaveSlotInfo, bool> condition) { level.Items.Clear(); foreach (SaveSlotInfo saveSlotInfo in this.Slots) { SaveSlotInfo s = saveSlotInfo; MenuItem menuItem; if (saveSlotInfo.Empty) { (menuItem = level.AddItem((string)null, (Action)(() => this.ChooseSaveSlot(s, operation)), -1)).SuffixText = (Func <string>)(() => StaticText.GetString("NewSlot")); } else { (menuItem = level.AddItem("SaveSlotPrefix", (Action)(() => this.ChooseSaveSlot(s, operation)), -1)).SuffixText = (Func <string>)(() => string.Format((IFormatProvider)CultureInfo.InvariantCulture, " {0} ({1:P1} - {2:dd\\.hh\\:mm})", (object)(s.Index + 1), (object)s.Percentage, (object)s.PlayTime)); } menuItem.Disabled = !condition(saveSlotInfo); menuItem.Selectable = condition(saveSlotInfo); } for (int index = 0; index < this.Items.Count; ++index) { if (level.Items[index].Selectable) { level.SelectedIndex = index; break; } } }
public override void Initialize() { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type SaveManagementLevel.\u003C\u003Ec__DisplayClassd cDisplayClassd = new SaveManagementLevel.\u003C\u003Ec__DisplayClassd(); // ISSUE: reference to a compiler-generated field cDisplayClassd.\u003C\u003E4__this = this; base.Initialize(); this.FontManager = ServiceHelper.Get <IFontManager>(); this.GameState = ServiceHelper.Get <IGameStateManager>(); this.ReloadSlots(); this.Title = "SaveManagementTitle"; // ISSUE: reference to a compiler-generated field cDisplayClassd.sf = this.FontManager.Small; // ISSUE: reference to a compiler-generated field cDisplayClassd.changeLevel = new MenuLevel() { Title = "SaveChangeSlot", AButtonString = "ChangeWithGlyph" }; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated method cDisplayClassd.changeLevel.OnPostDraw = new Action <SpriteBatch, SpriteFont, GlyphTextRenderer, float>(cDisplayClassd.\u003CInitialize\u003Eb__4); // ISSUE: reference to a compiler-generated field cDisplayClassd.changeLevel.Parent = (MenuLevel)this; // ISSUE: reference to a compiler-generated field cDisplayClassd.changeLevel.Initialize(); // ISSUE: reference to a compiler-generated field cDisplayClassd.copySrcLevel = new MenuLevel() { Title = "SaveCopySourceTitle", AButtonString = "ChooseWithGlyph" }; // ISSUE: reference to a compiler-generated field cDisplayClassd.copySrcLevel.Parent = (MenuLevel)this; // ISSUE: reference to a compiler-generated field cDisplayClassd.copySrcLevel.Initialize(); this.CopyDestLevel = new MenuLevel() { Title = "SaveCopyDestTitle", AButtonString = "ChooseWithGlyph" }; // ISSUE: reference to a compiler-generated method this.CopyDestLevel.OnPostDraw = new Action <SpriteBatch, SpriteFont, GlyphTextRenderer, float>(cDisplayClassd.\u003CInitialize\u003Eb__5); // ISSUE: reference to a compiler-generated field this.CopyDestLevel.Parent = cDisplayClassd.copySrcLevel; this.CopyDestLevel.Initialize(); // ISSUE: reference to a compiler-generated field cDisplayClassd.clearLevel = new MenuLevel() { Title = "SaveClearTitle", AButtonString = "ChooseWithGlyph" }; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated method cDisplayClassd.clearLevel.OnPostDraw = new Action <SpriteBatch, SpriteFont, GlyphTextRenderer, float>(cDisplayClassd.\u003CInitialize\u003Eb__6); // ISSUE: reference to a compiler-generated field cDisplayClassd.clearLevel.Parent = (MenuLevel)this; // ISSUE: reference to a compiler-generated field cDisplayClassd.clearLevel.Initialize(); // ISSUE: reference to a compiler-generated method this.AddItem("SaveChangeSlot", new Action(cDisplayClassd.\u003CInitialize\u003Eb__7), -1); // ISSUE: reference to a compiler-generated method this.AddItem("SaveCopyTitle", new Action(cDisplayClassd.\u003CInitialize\u003Eb__9), -1); // ISSUE: reference to a compiler-generated method this.AddItem("SaveClearTitle", new Action(cDisplayClassd.\u003CInitialize\u003Eb__b), -1); }