1
<span="normal"> 2
<span="normal"> 3
<span="normal"> 4
<span="normal"> 5
<span="normal"> 6
<span="normal"> 7
<span="normal"> 8
<span="normal"> 9
<span="normal">10
<span="normal">11
<span="normal">12
<span="normal">13
<span="normal">14
<span="normal">15
<span="normal">16
<span="normal">17
<span="normal">18
<span="normal">19
<span="normal">20
<span="normal">21 | using <span="nn">cAlgo.API<span="p">;
namespace <span="nn">cAlgo
<span="p">{
// この例では、ColorThemeChangeEventArgs を使用する方法を示します。
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
<span="k">public <span="k">class <span="nc">ColorThemeChangeEventArgsSample <span="p">: <span="n">Indicator
<span="p">{
<span="k">protected <span="k">override <span="k">void <span="nf">Initialize<span="p">()
<span="p">{
<span="n">Application<span="p">.<span="n">ColorThemeChanged <span="o">+= <span="n">Application_ColorThemeChanged<span="p">;
<span="p">}
<span="k">private <span="k">void <span="nf">Application_ColorThemeChanged<span="p">(<span="n">ColorThemeChangeEventArgs <span="n">obj<span="p">)
<span="p">{
<span="kt">var <span="n">text <span="o">= <span="kt">string<span="p">.<span="n">Format<span="p">(<span="s">"テーマが変更されました: {0}"<span="p">, <span="n">obj<span="p">.<span="n">ColorTheme<span="p">);
<span="n">Chart<span="p">.<span="n">DrawStaticText<span="p">(<span="s">"text"<span="p">, <span="n">text<span="p">, <span="n">VerticalAlignment<span="p">.<span="n">Top<span="p">, <span="n">HorizontalAlignment<span="p">.<span="n">Right<span="p">, <span="n">Color<span="p">.<span="n">Red<span="p">);
<span="p">}
<span="k">public <span="k">override <span="k">void <span="nf">Calculate<span="p">(<span="kt">int <span="n">index<span="p">)
<span="p">{
<span="p">}
<span="p">}
<span="p">}
|