protected override void UpdateImpl() { if (!loading) { if (!waitSprite.Hidden) { Generate(); waitSprite.Hidden = true; } } if (!rectangle.Hidden) { UpdateScroll(); rectangle.Position = AnimationUtility.GetAnimationPosition(rectangle.Position, mainSprite.Position + new Vector2(0, ItemHeight * selection)); } if (dialogState != DialogState.None) { switch (dialogState) { case DialogState.WaitIncludeFine: var dialog = new GeneralDialog(device, resourceManager, sound, Utility.Language["IncludeFineConfirm"], GeneralDialog.ButtonTypes.YesNo); FocusManager.Focus(dialog); this.InsertChild(dialog, 0); dialog.LostFocused += (sender, e) => { if (dialog.OK) { UseItem["IncludeFine"] = true; } this.RemoveChild(dialog); dialog.Dispose(); if (UseItem.ItemType == ItemType.Auto4 || (UseItem.ContainsParameter("SubItemType") && (ItemType)UseItem["SubItemType"] == ItemType.Auto4)) { dialogState = DialogState.WaitUseNotIncludeButton; } }; break; case DialogState.WaitUseNotIncludeButton: dialog = new GeneralDialog(device, resourceManager, sound, Utility.Language["DumpNotesConfirm"], GeneralDialog.ButtonTypes.YesNo); FocusManager.Focus(dialog); this.InsertChild(dialog, 0); dialog.LostFocused += (sender, e) => { if (dialog.OK) { UseItem["AllowAllButton"] = true; } this.RemoveChild(dialog); dialog.Dispose(); if (UseItem.ItemType == ItemType.Auto4 || (UseItem.ContainsParameter("SubItemType") && (ItemType)UseItem["SubItemType"] == ItemType.Auto4)) { dialogState = DialogState.WaitAllowWarnScript; } }; break; case DialogState.WaitAllowWarnScript: dialog = new GeneralDialog(device, resourceManager, sound, Utility.Language["AllowWarnScriptConfirm"], GeneralDialog.ButtonTypes.YesNo); FocusManager.Focus(dialog); this.InsertChild(dialog, 0); dialog.LostFocused += (sender, e) => { if (dialog.OK) { UseItem["AllowWarnScript"] = true; } this.RemoveChild(dialog); dialog.Dispose(); }; break; } dialogState = DialogState.None; } }