修飾キーの種類を指定します。

概要

修飾キーのセットを指定します。

署名

1
public enum ModifierKeys

 

名前空間

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
30
31
32
33
34
35
36
37
38
39
40
41
 using cAlgo.API;
 namespace cAlgo
 {
     // このサンプルは ModifierKeys の使用方法を示しています
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ModifierKeysSample : Indicator
     {
         private double _mouseBarIndex, _mousePrice;
         [Parameter(DefaultValue = Key.R)]
         public Key HotKey { get; set; }
         [Parameter(DefaultValue = ModifierKeys.Control)]
         public ModifierKeys HotKeyModifier { get; set; }
         protected override void Initialize()
         {
             Chart.MouseMove += Chart_MouseMove;
             Chart.MouseEnter += ResetMouseLocation;
             Chart.MouseLeave += ResetMouseLocation;
             ResetMouseLocation(null);
             Chart.AddHotkey(DrawLines, HotKey, HotKeyModifier);
         }
         private void ResetMouseLocation(ChartMouseEventArgs obj)
         {
             _mouseBarIndex = -1;
             _mousePrice = double.NaN;
         }
         private void Chart_MouseMove(ChartMouseEventArgs obj)
         {
             _mouseBarIndex = obj.BarIndex;
             _mousePrice = obj.YValue;
         }
         private void DrawLines()
         {
             if (_mouseBarIndex == -1 || double.IsNaN(_mousePrice))
                 return;
             
             var line = Chart.DrawTrendLine(_mouseBarIndex, _mousePrice, _mouseBarIndex + 10, _mousePrice, Color.Red);
         }
     }
 }

 

フィールド

なし

概要

修飾キーが押されていません。

署名

1
public static ModifierKeys None;

 

戻り値

ModifierKeys

Alt

概要

ALTキー。

署名

1
public static ModifierKeys Alt;

 

戻り値

ModifierKeys

Control

概要

CTRLキー。

署名

1
public static ModifierKeys Control;

 

戻り値

ModifierKeys

Shift

概要

SHIFTキー。

署名

1
public static ModifierKeys Shift;

 

戻り値

ModifierKeys

目次

このページについて