ボタンクリックイベント引数

cBots (自動売買)

概要

ボタンクリックイベントのデータを表します。

シグネチャ

1
public class ButtonClickEventArgs

 

名前空間

cAlgo.API

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 using cAlgo.API;
 namespace cAlgo
 {
     // この例は、Button オブジェクトの Click イベント ButtonClickEventArgs を使用する方法を示しています。
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ButtonClickEventArgsSample : Indicator
     {
         protected override void Initialize()
         {
             var button = new Button
             {
                 Text = "まだクリックされていません",
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center
             };
             // ボタンをクリックすると、Button_Click メソッドが呼び出されます。
             button.Click += Button_Click;
             Chart.AddControl(button);
         }
         // ボタンがクリックされたときにテキストを変更します。
         private void Button_Click(ButtonClickEventArgs obj)
         {
             obj.Button.Text = "クリックされました";
         }
         public override void Calculate(int index)
         {
         }
     }
 }

関連項目

  • cAlgo.API.Button

プロパティ

Button

概要

ボタンデータを取得します。

シグネチャ

1
public Button Button {get;}

 

戻り値

Button

関連チュートリアル

  • コントロール
目次

このページについて