public ActionResult TutView(int topicID = 0) { ViewBag.Message = "Tutorial"; TutorialsEntities db = new TutorialsEntities(); TutorialTable tutorialsTable = db.TutorialTables.Find(topicID); ViewBag.CodeSources = tutorialsTable.CodeSources.Split(';'); return(View(tutorialsTable)); }
// GET: Site public ActionResult Tutorials(int topicID = 0) { TutorialsEntities db = new TutorialsEntities(); TutorialTable tutorialsTable = db.TutorialTables.Find(topicID); if (tutorialsTable == null) { tutorialsTable = db.TutorialTables.Find(0); } ViewBag.Message = "Examples"; ViewBag.topicID = tutorialsTable.Id; ViewBag.ShortSummary = tutorialsTable.ShortSummary; ViewBag.TopicName = tutorialsTable.TopicName; ViewBag.Date = tutorialsTable.LastUpdated.ToString("MM/dd/yyyy"); return(View()); }
public void NextTutorial() { HideTutorialUI(); TutorialTable table = DataManager.GetInstance().GetTutorial(nowTutorial, nowCount); if (table == null) { messageBox.HideMessageBox(() => { EndTutorial(); }); } else { messageBox.SetMessageBox(table.textIdx, table.targetPos, () => { blocker.SetAllBlock(true); switch (table.emphasis) { case Define.TutorialEmphasis.NoEmphasis: emphasis.SetAllBlind(true); break; case Define.TutorialEmphasis.JustEmphasis: emphasis.SetEmphasis(table.targetPos, table.targetSize); break; case Define.TutorialEmphasis.EmphasisTarget: emphasis.SetEmphasis(table.targetPos, table.targetSize); break; } TutorialBase tutorial = GetTutorial(table.tutorialType); if (tutorial != null) { tutorial.CallMethod(table.method); } StartCoroutine(DelayFunc(delayTime, () => { Vector3 pos = new Vector3(-370f, 0f, 0f); if (table.targetPos.y >= 0f) { pos.y = bottomHeight; } else { pos.y = topHeight; } switch (table.emphasis) { case Define.TutorialEmphasis.NoEmphasis: blocker.SetTouchTarget(); break; case Define.TutorialEmphasis.JustEmphasis: blocker.SetTouchTarget(); break; case Define.TutorialEmphasis.EmphasisTarget: blocker.SetEmphasis(table.blockPos, table.blockSize); pos = table.blockPos; break; } nowCount++; SetReaction(pos); })); }); } }