public ActionResult Update(SectionInput input) { if (!ModelState.IsValid) { return(View("Edit", input)); } var section = Session.Load <Section>(input.Id) ?? new Section(); input.MapPropertiesToInstance(section); Session.Store(section); return(RedirectToAction("List")); }
public File() { RomOption = new SectionRomOption(); Render = new SectionRender(); Sound = new SectionSound(); Input = new SectionInput(); RSPG = new SectionRSPG(); Cmp = new SectionCmp(); TempConfig = new SectionTempConfig(); Others = new SectionOthers(); Idle = new SectionIdle(); InsertIdleInst = new SectionInsertIdleInst(); SpecialInst = new SectionSpecialInst(); BreakBlockInst = new SectionBreakBlockInst(); RomHack = new SectionRomHack(); VertexHack = new SectionVertexHack(); FilterHack = new SectionFilterHack(); Cheat = new SectionCheat(); RomOption.AIIntPerFrame = CheckState.Indeterminate; RomOption.AISetControl = CheckState.Indeterminate; RomOption.AISetDAC = CheckState.Indeterminate; RomOption.AISetRateBit = CheckState.Indeterminate; RomOption.AIUseTimer = CheckState.Indeterminate; RomOption.BackupSize = -1; RomOption.BackupType = -1; RomOption.BootEnd = CheckState.Indeterminate; RomOption.BootPCChange = CheckState.Indeterminate; RomOption.CmpBlockAdvFlag = CheckState.Indeterminate; RomOption.EEROMInitValue = -1; RomOption.g_nN64CpuCmpBlockAdvFlag = CheckState.Indeterminate; RomOption.MemPak = CheckState.Indeterminate; RomOption.NoCntPak = CheckState.Indeterminate; RomOption.PDFURL = ""; RomOption.PlayerNum = -1; RomOption.RamSize = -1; RomOption.RetraceByVsync = CheckState.Indeterminate; RomOption.RomType = CheckState.Indeterminate; RomOption.RSPAMultiCoreWait = CheckState.Indeterminate; RomOption.RSPMultiCore = CheckState.Indeterminate; RomOption.RSPMultiCoreInt = -1; RomOption.RSPMultiCoreWait = CheckState.Indeterminate; RomOption.Rumble = CheckState.Indeterminate; RomOption.ScreenCaptureNG = CheckState.Indeterminate; RomOption.TicksPerFrame = -1; RomOption.TimeIntDelay = CheckState.Indeterminate; RomOption.TLBMissEnable = CheckState.Indeterminate; RomOption.TPak = CheckState.Indeterminate; RomOption.TrueBoot = CheckState.Indeterminate; RomOption.UseTimer = CheckState.Indeterminate; Render.bCutClip = CheckState.Indeterminate; Render.bForce720P = CheckState.Indeterminate; Render.CalculateLOD = CheckState.Indeterminate; Render.CanvasWidth = -1; Render.CanvasHeight = -1; Render.CheckTlutValid = CheckState.Indeterminate; Render.ClearVertexBuf = CheckState.Indeterminate; Render.ClipBottom = 0; Render.ClipLeft = 0; Render.ClipRight = 0; Render.ClipTop = 0; Render.ConstValue = new List <int>(); Render.CopyAlphaForceOne = CheckState.Indeterminate; Render.CopyColorAfterTask = CheckState.Indeterminate; Render.CopyColorBuffer = CheckState.Indeterminate; Render.CopyDepthBuffer = CheckState.Indeterminate; Render.CopyMiddleBuffer = CheckState.Indeterminate; Render.DepthCompare = CheckState.Indeterminate; Render.DepthCompareLess = CheckState.Indeterminate; Render.DepthCompareMore = CheckState.Indeterminate; Render.DoubleFillCheck = CheckState.Indeterminate; Render.FirstFrameAt = -1; Render.FlushMemEachTask = CheckState.Indeterminate; Render.FogVertexAlpha = CheckState.Indeterminate; Render.ForceFilterPoint = CheckState.Indeterminate; Render.ForceRectFilterPoint = CheckState.Indeterminate; Render.FrameClearCacheInit = CheckState.Indeterminate; Render.InitPerspectiveMode = CheckState.Indeterminate; Render.NeedPreParse = CheckState.Indeterminate; Render.NeedTileSizeCheck = CheckState.Indeterminate; Render.PolygonOffset = CheckState.Indeterminate; Render.PreparseTMEMBlock = CheckState.Indeterminate; Render.RendererReset = CheckState.Indeterminate; Render.TexEdgeAlpha = CheckState.Indeterminate; Render.TileSizeCheckSpecial = CheckState.Indeterminate; Render.TLUTCheck = CheckState.Indeterminate; Render.UseColorDither = CheckState.Indeterminate; Render.useViewportXScale = CheckState.Indeterminate; Render.useViewportYScale = CheckState.Indeterminate; Render.useViewportZScale = CheckState.Indeterminate; Render.XClip = CheckState.Indeterminate; Render.YClip = CheckState.Indeterminate; Render.ZClip = CheckState.Indeterminate; Sound.BufFull = -1; Sound.BufHalf = -1; Sound.BufHave = -1; Sound.FillAfterVCM = -1; Sound.Resample = -1; Input.AlwaysHave = CheckState.Indeterminate; Input.STICK_CLAMP = CheckState.Indeterminate; Input.StickLimit = -1; Input.StickModify = -1; Input.VPAD_STICK_CLAMP = CheckState.Indeterminate; RSPG.GTaskDelay = -1; RSPG.RDPDelay = -1; RSPG.RDPInt = CheckState.Indeterminate; RSPG.RIntAfterGTask = CheckState.Indeterminate; RSPG.RSPGWaitOnlyFirstGTaskDelay = CheckState.Indeterminate; RSPG.Skip = CheckState.Indeterminate; RSPG.WaitDelay = CheckState.Indeterminate; RSPG.WaitOnlyFirst = CheckState.Indeterminate; Cmp.BlockSize = -1; Cmp.CmpLimit = CheckState.Indeterminate; Cmp.FrameBlockLimit = -1; Cmp.OptEnable = CheckState.Indeterminate; Cmp.W32OverlayCheck = CheckState.Indeterminate; TempConfig.g_nN64CpuPC = CheckState.Indeterminate; TempConfig.n64MemAcquireForground = CheckState.Indeterminate; TempConfig.n64MemDefaultRead32MemTest = CheckState.Indeterminate; TempConfig.n64MemReleaseForground = CheckState.Indeterminate; TempConfig.RSPGDCFlush = CheckState.Indeterminate; Others.SIDelay = -1; Others.ScanReadTime = CheckState.Indeterminate; Others.FrameTickHack = new List <int>(); }