Issue #31: Implemented function TerminalInfoInteger in MtApi MT4

This commit is contained in:
vdemydiuk
2016-11-15 10:02:30 +02:00
parent 563a5a895b
commit 8e5dcbd2ee
9 changed files with 316 additions and 123 deletions
+25
View File
@@ -162,6 +162,8 @@
this.label30 = new System.Windows.Forms.Label();
this.comboBox8 = new System.Windows.Forms.ComboBox();
this.button34 = new System.Windows.Forms.Button();
this.button35 = new System.Windows.Forms.Button();
this.comboBox9 = new System.Windows.Forms.ComboBox();
this.groupBox1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.groupBox2.SuspendLayout();
@@ -1044,6 +1046,8 @@
//
// tabPage4
//
this.tabPage4.Controls.Add(this.comboBox9);
this.tabPage4.Controls.Add(this.button35);
this.tabPage4.Controls.Add(this.button34);
this.tabPage4.Controls.Add(this.comboBox8);
this.tabPage4.Controls.Add(this.label30);
@@ -1608,6 +1612,25 @@
this.button34.UseVisualStyleBackColor = true;
this.button34.Click += new System.EventHandler(this.button34_Click);
//
// button35
//
this.button35.Location = new System.Drawing.Point(208, 128);
this.button35.Name = "button35";
this.button35.Size = new System.Drawing.Size(111, 23);
this.button35.TabIndex = 33;
this.button35.Text = "TerminalInfoInteger";
this.button35.UseVisualStyleBackColor = true;
this.button35.Click += new System.EventHandler(this.button35_Click);
//
// comboBox9
//
this.comboBox9.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox9.FormattingEnabled = true;
this.comboBox9.Location = new System.Drawing.Point(13, 130);
this.comboBox9.Name = "comboBox9";
this.comboBox9.Size = new System.Drawing.Size(186, 21);
this.comboBox9.TabIndex = 34;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1788,6 +1811,8 @@
private System.Windows.Forms.Label label30;
private System.Windows.Forms.ComboBox comboBox8;
private System.Windows.Forms.Button button34;
private System.Windows.Forms.Button button35;
private System.Windows.Forms.ComboBox comboBox9;
}
}
+11
View File
@@ -31,6 +31,7 @@ namespace TestApiClientUI
comboBox6.DataSource = Enum.GetNames(typeof(ENUM_TIMEFRAMES));
comboBox7.DataSource = Enum.GetNames(typeof(EnumSymbolInfoDouble));
comboBox8.DataSource = Enum.GetNames(typeof(MarketInfoModeType));
comboBox9.DataSource = Enum.GetNames(typeof(EnumTerminalInfoInteger));
_apiClient.QuoteUpdated += apiClient_QuoteUpdated;
_apiClient.QuoteAdded += apiClient_QuoteAdded;
@@ -1264,5 +1265,15 @@ namespace TestApiClientUI
PrintLog($"SymbolInfoTick: Tick - time = {result.Time}, Bid = {result.Bid}, Ask = {result.Ask}, Last = {result.Last}, Volume = {result.Volume}");
}
}
//TerminalInfoInteger
private async void button35_Click(object sender, EventArgs e)
{
EnumTerminalInfoInteger propId;
Enum.TryParse(comboBox9.Text, out propId);
var result = await Execute(() => _apiClient.TerminalInfoInteger(propId));
PrintLog($"TerminalInfoInteger: result = {result}");
}
}
}