Compare commits

...
7 changed files with 70 additions and 4 deletions
+6
View File
@@ -994,6 +994,12 @@ namespace MtApi
return MtApiTimeConverter.ConvertFromMtTime(commandResponse); return MtApiTimeConverter.ConvertFromMtTime(commandResponse);
} }
public DateTime TimeGMT()
{
var commandResponse = SendCommand<int>(MtCommandType.TimeGMT, null);
return MtApiTimeConverter.ConvertFromMtTime(commandResponse);
}
public int TimeDay(DateTime date) public int TimeDay(DateTime date)
{ {
var commandParameters = new ArrayList { MtApiTimeConverter.ConvertToMtTime(date) }; var commandParameters = new ArrayList { MtApiTimeConverter.ConvertToMtTime(date) };
+1
View File
@@ -111,6 +111,7 @@
TimeSeconds = 86, TimeSeconds = 86,
TimeYear = 87, TimeYear = 87,
Year = 88, Year = 88,
TimeGMT = 281,
//Global Variables //Global Variables
GlobalVariableCheck = 89, GlobalVariableCheck = 89,
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.39.0")] [assembly: AssemblyVersion("1.0.40.0")]
[assembly: AssemblyFileVersion("1.0.39.0")] [assembly: AssemblyFileVersion("1.0.40.0")]
+40 -2
View File
@@ -143,6 +143,8 @@
this.label23 = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label();
this.textBoxAccountInfoSymbol = new System.Windows.Forms.TextBox(); this.textBoxAccountInfoSymbol = new System.Windows.Forms.TextBox();
this.tabPage4 = new System.Windows.Forms.TabPage(); this.tabPage4 = new System.Windows.Forms.TabPage();
this.comboBox12 = new System.Windows.Forms.ComboBox();
this.button72 = new System.Windows.Forms.Button();
this.button36 = new System.Windows.Forms.Button(); this.button36 = new System.Windows.Forms.Button();
this.comboBox10 = new System.Windows.Forms.ComboBox(); this.comboBox10 = new System.Windows.Forms.ComboBox();
this.comboBox9 = new System.Windows.Forms.ComboBox(); this.comboBox9 = new System.Windows.Forms.ComboBox();
@@ -210,6 +212,7 @@
this.button4 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button();
this.tabPage11 = new System.Windows.Forms.TabPage(); this.tabPage11 = new System.Windows.Forms.TabPage();
this.button69 = new System.Windows.Forms.Button(); this.button69 = new System.Windows.Forms.Button();
this.button73 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.statusStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
@@ -1427,6 +1430,8 @@
// //
// tabPage4 // tabPage4
// //
this.tabPage4.Controls.Add(this.comboBox12);
this.tabPage4.Controls.Add(this.button72);
this.tabPage4.Controls.Add(this.button36); this.tabPage4.Controls.Add(this.button36);
this.tabPage4.Controls.Add(this.comboBox10); this.tabPage4.Controls.Add(this.comboBox10);
this.tabPage4.Controls.Add(this.comboBox9); this.tabPage4.Controls.Add(this.comboBox9);
@@ -1450,6 +1455,25 @@
this.tabPage4.Text = "MarketInfo"; this.tabPage4.Text = "MarketInfo";
this.tabPage4.UseVisualStyleBackColor = true; this.tabPage4.UseVisualStyleBackColor = true;
// //
// comboBox12
//
this.comboBox12.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox12.FormattingEnabled = true;
this.comboBox12.Location = new System.Drawing.Point(13, 188);
this.comboBox12.Name = "comboBox12";
this.comboBox12.Size = new System.Drawing.Size(186, 21);
this.comboBox12.TabIndex = 38;
//
// button72
//
this.button72.Location = new System.Drawing.Point(208, 186);
this.button72.Name = "button72";
this.button72.Size = new System.Drawing.Size(111, 23);
this.button72.TabIndex = 37;
this.button72.Text = "TerminalInfoString";
this.button72.UseVisualStyleBackColor = true;
this.button72.Click += new System.EventHandler(this.button72_Click);
//
// button36 // button36
// //
this.button36.Location = new System.Drawing.Point(208, 157); this.button36.Location = new System.Drawing.Point(208, 157);
@@ -1844,6 +1868,7 @@
// //
// tabPage6 // tabPage6
// //
this.tabPage6.Controls.Add(this.button73);
this.tabPage6.Controls.Add(this.textBoxPrint); this.tabPage6.Controls.Add(this.textBoxPrint);
this.tabPage6.Controls.Add(this.button27); this.tabPage6.Controls.Add(this.button27);
this.tabPage6.Controls.Add(this.button14); this.tabPage6.Controls.Add(this.button14);
@@ -1858,14 +1883,14 @@
// //
// textBoxPrint // textBoxPrint
// //
this.textBoxPrint.Location = new System.Drawing.Point(13, 86); this.textBoxPrint.Location = new System.Drawing.Point(13, 108);
this.textBoxPrint.Name = "textBoxPrint"; this.textBoxPrint.Name = "textBoxPrint";
this.textBoxPrint.Size = new System.Drawing.Size(386, 20); this.textBoxPrint.Size = new System.Drawing.Size(386, 20);
this.textBoxPrint.TabIndex = 3; this.textBoxPrint.TabIndex = 3;
// //
// button27 // button27
// //
this.button27.Location = new System.Drawing.Point(405, 84); this.button27.Location = new System.Drawing.Point(405, 106);
this.button27.Name = "button27"; this.button27.Name = "button27";
this.button27.Size = new System.Drawing.Size(75, 23); this.button27.Size = new System.Drawing.Size(75, 23);
this.button27.TabIndex = 2; this.button27.TabIndex = 2;
@@ -2146,6 +2171,16 @@
this.button69.UseVisualStyleBackColor = true; this.button69.UseVisualStyleBackColor = true;
this.button69.Click += new System.EventHandler(this.button69_Click); this.button69.Click += new System.EventHandler(this.button69_Click);
// //
// button73
//
this.button73.Location = new System.Drawing.Point(13, 74);
this.button73.Name = "button73";
this.button73.Size = new System.Drawing.Size(75, 23);
this.button73.TabIndex = 4;
this.button73.Text = "TimeGMT";
this.button73.UseVisualStyleBackColor = true;
this.button73.Click += new System.EventHandler(this.button73_Click);
//
// Form1 // Form1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -2379,6 +2414,9 @@
private System.Windows.Forms.TextBox textBoxAccountLogin; private System.Windows.Forms.TextBox textBoxAccountLogin;
private System.Windows.Forms.Button button70; private System.Windows.Forms.Button button70;
private System.Windows.Forms.Button button71; private System.Windows.Forms.Button button71;
private System.Windows.Forms.ComboBox comboBox12;
private System.Windows.Forms.Button button72;
private System.Windows.Forms.Button button73;
} }
} }
+21
View File
@@ -34,6 +34,7 @@ namespace TestApiClientUI
comboBox9.DataSource = Enum.GetNames(typeof(EnumTerminalInfoInteger)); comboBox9.DataSource = Enum.GetNames(typeof(EnumTerminalInfoInteger));
comboBox10.DataSource = Enum.GetNames(typeof(EnumTerminalInfoDouble)); comboBox10.DataSource = Enum.GetNames(typeof(EnumTerminalInfoDouble));
comboBox11.DataSource = Enum.GetNames(typeof(EnumObject)); comboBox11.DataSource = Enum.GetNames(typeof(EnumObject));
comboBox12.DataSource = Enum.GetNames(typeof(ENUM_TERMINAL_INFO_STRING));
comboBoxAccountInfoCmd.DataSource = Enum.GetNames(typeof(TradeOperation)); comboBoxAccountInfoCmd.DataSource = Enum.GetNames(typeof(TradeOperation));
_apiClient.QuoteUpdated += apiClient_QuoteUpdated; _apiClient.QuoteUpdated += apiClient_QuoteUpdated;
@@ -615,18 +616,28 @@ namespace TestApiClientUI
listBoxProceHistory.DataSource = items; listBoxProceHistory.DataSource = items;
} }
//TimeCurrent
private void button13_Click(object sender, EventArgs e) private void button13_Click(object sender, EventArgs e)
{ {
var retVal = _apiClient.TimeCurrent(); var retVal = _apiClient.TimeCurrent();
PrintLog($"TimeCurrent result: {retVal}"); PrintLog($"TimeCurrent result: {retVal}");
} }
//TimeLocal
private void button14_Click(object sender, EventArgs e) private void button14_Click(object sender, EventArgs e)
{ {
var retVal = _apiClient.TimeLocal(); var retVal = _apiClient.TimeLocal();
PrintLog($"TimeLocal result: {retVal}"); PrintLog($"TimeLocal result: {retVal}");
} }
//TimeGMT
private void button73_Click(object sender, EventArgs e)
{
var retVal = _apiClient.TimeGMT();
PrintLog($"TimeGMT result: {retVal}");
}
//RefreshRates
private void buttonRefreshRates_Click(object sender, EventArgs e) private void buttonRefreshRates_Click(object sender, EventArgs e)
{ {
var retVal = _apiClient.RefreshRates(); var retVal = _apiClient.RefreshRates();
@@ -1129,6 +1140,16 @@ namespace TestApiClientUI
PrintLog($"TerminalInfoDouble: result = {result}"); PrintLog($"TerminalInfoDouble: result = {result}");
} }
//TerminalInfoString
private async void button72_Click(object sender, EventArgs e)
{
ENUM_TERMINAL_INFO_STRING propId;
Enum.TryParse(comboBox12.Text, out propId);
var result = await Execute(() => _apiClient.TerminalInfoString(propId));
PrintLog($"TerminalInfoString: result = {result}");
}
private void checkBox2_CheckedChanged(object sender, EventArgs e) private void checkBox2_CheckedChanged(object sender, EventArgs e)
{ {
var checkbox = sender as CheckBox; var checkbox = sender as CheckBox;
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.