diff --git a/TestClients/TestApiClientUI/Form1.Designer.cs b/TestClients/TestApiClientUI/Form1.Designer.cs index c7f09913..00c3ee50 100644 --- a/TestClients/TestApiClientUI/Form1.Designer.cs +++ b/TestClients/TestApiClientUI/Form1.Designer.cs @@ -193,12 +193,13 @@ this.label28 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); this.tabPage9 = new System.Windows.Forms.TabPage(); + this.textBoxChartId = new System.Windows.Forms.TextBox(); this.button38 = new System.Windows.Forms.Button(); this.button37 = new System.Windows.Forms.Button(); this.tabPage10 = new System.Windows.Forms.TabPage(); - this.button4 = new System.Windows.Forms.Button(); this.comboBox11 = new System.Windows.Forms.ComboBox(); - this.textBoxChartId = new System.Windows.Forms.TextBox(); + this.button4 = new System.Windows.Forms.Button(); + this.button68 = new System.Windows.Forms.Button(); this.groupBox1.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.groupBox2.SuspendLayout(); @@ -1967,6 +1968,13 @@ this.tabPage9.Text = "Chart Operations"; this.tabPage9.UseVisualStyleBackColor = true; // + // textBoxChartId + // + this.textBoxChartId.Location = new System.Drawing.Point(115, 8); + this.textBoxChartId.Name = "textBoxChartId"; + this.textBoxChartId.Size = new System.Drawing.Size(100, 20); + this.textBoxChartId.TabIndex = 2; + // // button38 // this.button38.Location = new System.Drawing.Point(12, 39); @@ -1989,6 +1997,7 @@ // // tabPage10 // + this.tabPage10.Controls.Add(this.button68); this.tabPage10.Controls.Add(this.comboBox11); this.tabPage10.Controls.Add(this.button4); this.tabPage10.Location = new System.Drawing.Point(4, 40); @@ -1999,6 +2008,15 @@ this.tabPage10.Text = "Object Functions"; this.tabPage10.UseVisualStyleBackColor = true; // + // comboBox11 + // + this.comboBox11.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox11.FormattingEnabled = true; + this.comboBox11.Location = new System.Drawing.Point(6, 5); + this.comboBox11.Name = "comboBox11"; + this.comboBox11.Size = new System.Drawing.Size(121, 21); + this.comboBox11.TabIndex = 1; + // // button4 // this.button4.Location = new System.Drawing.Point(133, 3); @@ -2009,21 +2027,15 @@ this.button4.UseVisualStyleBackColor = true; this.button4.Click += new System.EventHandler(this.button4_Click); // - // comboBox11 + // button68 // - this.comboBox11.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBox11.FormattingEnabled = true; - this.comboBox11.Location = new System.Drawing.Point(6, 5); - this.comboBox11.Name = "comboBox11"; - this.comboBox11.Size = new System.Drawing.Size(121, 21); - this.comboBox11.TabIndex = 1; - // - // textBoxChartId - // - this.textBoxChartId.Location = new System.Drawing.Point(115, 8); - this.textBoxChartId.Name = "textBoxChartId"; - this.textBoxChartId.Size = new System.Drawing.Size(100, 20); - this.textBoxChartId.TabIndex = 2; + this.button68.Location = new System.Drawing.Point(6, 39); + this.button68.Name = "button68"; + this.button68.Size = new System.Drawing.Size(75, 23); + this.button68.TabIndex = 2; + this.button68.Text = "ObjectName"; + this.button68.UseVisualStyleBackColor = true; + this.button68.Click += new System.EventHandler(this.button68_Click); // // Form1 // @@ -2246,6 +2258,7 @@ private System.Windows.Forms.Button button4; private System.Windows.Forms.ComboBox comboBox11; private System.Windows.Forms.TextBox textBoxChartId; + private System.Windows.Forms.Button button68; } } diff --git a/TestClients/TestApiClientUI/Form1.cs b/TestClients/TestApiClientUI/Form1.cs index befbfd3f..5e405df0 100644 --- a/TestClients/TestApiClientUI/Form1.cs +++ b/TestClients/TestApiClientUI/Form1.cs @@ -1384,14 +1384,23 @@ namespace TestApiClientUI //ObjectCreate private async void button4_Click(object sender, EventArgs e) { - long chartId = 0; - string objectName = "label_object"; - //long.TryParse(textBoxChartId.Text, ) + const long chartId = 0; + const string objectName = "label_object"; EnumObject objectType; Enum.TryParse(comboBox11.Text, out objectType); var result = await Execute(() => _apiClient.ObjectCreate(chartId, objectName, objectType, 0, null, 0)); PrintLog($"ObjectCreate result: {result}"); } + + //ObjectName + private async void button68_Click(object sender, EventArgs e) + { + const long chartId = 0; + const int objectIndex = 0; + + var result = await Execute(() => _apiClient.ObjectName(chartId, objectIndex)); + PrintLog($"ObjectName result: {result}"); + } } } diff --git a/mq4/MtApi.ex4 b/mq4/MtApi.ex4 index 9a2d6681..5bf89b7e 100755 Binary files a/mq4/MtApi.ex4 and b/mq4/MtApi.ex4 differ