void Start() { GetComponent <Button>().onClick.AddListener(() => { if (RecordManager.tempRecord.showedInstrument != null && RecordManager.tempRecord.showedInstrument.instrumentType != null) { Main.m_Entity.HideEntity(GameManager.Instance.CurrentInstrument); } CreateObject.HideCurrent(); CreateInstrument.HideCurrent(); RecordManager.ClearTempRecord(); GameManager.Instance.SwitchProcedure <AddValueProcedure>(); }); }
public async Task <IActionResult> Create(CreateInstrumentViewModel createInstrumentViewModel) { if (!ModelState.IsValid) { return(View(createInstrumentViewModel)); } var instrument = new Instrument(createInstrumentViewModel); var instrumentId = await _mediator.Send(CreateInstrument.With(instrument)); if (instrumentId == 0) { return(View("~/Shared/Views/Shared/Error.cshtml")); } return(RedirectToAction("Index", "Home")); }
public void GenerateHistory(HistorysPanel panel) { CreateInstrument.HideCurrent(); CreateInstrument.Create(panel.model); (Main.m_UI.GetUI <BagControl>() as BagControl).Hide(); }
public void GenerateInstrument(InstrumentPanel panel) { CreateInstrument.HideCurrent(); CreateInstrument.Create(panel.instrumentType); (Main.m_UI.GetUI <BagControl>() as BagControl).Hide(); }