1

私のwinformsアプリケーションでは、カスタム構文ハイライトを作成するので、次のxmlを作成しました。

<ScintillaNET>
  <Language Name="default">
    <Styles>
      <Style Name="Default" FontName="Consolas"/>
    </Styles>
  </Language>

  <Language Name="customSql">
    <Lexer LineCommentPrefix="--" StreamCommentPrefix="/* " StreamCommentSuffix=" /*" LexerName="customSql" >
      <Keywords List="0">
        Data Source Initial Catalog User Id Password Database Server Trusted_Connection
        Integrated Security Network Library User Instance AttachDbFilename Failover Partner
        Asynchronous Processing Uid Pwd Provider SSPI
      </Keywords>
    </Lexer>

    <Styles>
      <Sytle Name="CHARACTER" ForeColor="Black"/>
      <Sytle Name="NUMBER" ForeColor="Red" />
    </Styles>
  </Language>
</ScintillaNET>

私には元気そうです。私のアプリケーションでは、言語とその他のプロパティを次のように設定しました。

myC.ConfigurationManager.Language = "customSql";
myC.ConfigurationManager.CustomLocation = Global.Path + @"Resources\ScintillaNET.xml";
myC.ConfigurationManager.Configure();

なぜこれがまだ機能しないのか理解できません。私も例外ではなく、単にテキストが黒のままです。ヒントはありますか?

4

1 に答える 1

1

おそらく、ForeColorを黒に設定したが、BackColorを黒以外に設定したことがないためですか?

于 2012-05-30T17:39:14.843 に答える