コード例 #1
0
 public TrickOverViewPreview(AExample_Base aExampleBase)
 {
     m_Example = aExampleBase;
     this.m_DrawCallbaclAction = m_Example.DrawUI;
     try
     {
         this.highlightedCode = SyntaxHighlighter.Parse(m_Example.GetTrickOverViewInfo().Code);
     }
     catch (Exception exception)
     {
         Debug.LogError($"条目{aExampleBase.GetTrickOverViewInfo().Name}的代码块高亮失败,原因是:{exception}");
         this.highlightedCode = m_Example.GetTrickOverViewInfo().Code;
         this.showRaw         = true;
     }
 }
コード例 #2
0
 public TrickOverViewPreview(TrickOverViewInfo exampleInfo)
 {
     this.ExampleInfo          = exampleInfo;
     this.m_DrawCallbaclAction = (this.ExampleInfo.PreviewObject as AExample_Base).DrawUI;
     try
     {
         this.highlightedCode = SyntaxHighlighter.Parse(this.ExampleInfo.Code);
     }
     catch (Exception exception)
     {
         Debug.LogException(exception);
         this.highlightedCode = this.ExampleInfo.Code;
         this.showRaw         = true;
     }
 }