version 1.0.24. Added functions TerminalInfoString and SymbolInfoString

This commit is contained in:
vdemydiuk
2016-01-07 13:02:22 +02:00
parent eceb71fd40
commit 8e41a53e93
7 changed files with 61 additions and 3 deletions
+1
View File
@@ -58,6 +58,7 @@
<Compile Include="MtCommandType.cs" />
<Compile Include="MtQuote.cs" />
<Compile Include="MtQuoteEventArgs.cs" />
<Compile Include="MtTypes.cs" />
<Compile Include="PriceConstantsType.cs" />
<Compile Include="MarketInfoModeType.cs" />
<Compile Include="MtApiClient.cs" />
+14
View File
@@ -1208,6 +1208,20 @@ namespace MtApi
#endregion
#region Checkup
public string TerminalInfoString(ENUM_TERMINAL_INFO_STRING property_id)
{
var commandParameters = new ArrayList { (int)property_id };
return sendCommand<string>(MtCommandType.TerminalInfoString, commandParameters);
}
public string SymbolInfoString(string name, ENUM_SYMBOL_INFO_STRING prop_id)
{
var commandParameters = new ArrayList { name, (int)prop_id };
return sendCommand<string>(MtCommandType.SymbolInfoString, commandParameters); ;
}
#endregion
#region Private Methods
private void Connect(string host, int port)
{
+14
View File
@@ -11,6 +11,20 @@ namespace MtApi
public enum ENUM_TERMINAL_INFO_STRING
{
TERMINAL_LANGUAGE = 13,
TERMINAL_COMPANY = 0,
TERMINAL_NAME = 1,
TERMINAL_PATH = 2,
TERMINAL_DATA_PATH = 3,
TERMINAL_COMMONDATA_PATH = 4
}
public enum ENUM_SYMBOL_INFO_STRING
{
SYMBOL_CURRENCY_BASE = 22,
SYMBOL_CURRENCY_PROFIT = 23,
SYMBOL_CURRENCY_MARGIN = 24,
SYMBOL_DESCRIPTION = 20,
SYMBOL_PATH = 21
}
}
+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
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.23.0")]
[assembly: AssemblyFileVersion("1.0.23.0")]
[assembly: AssemblyVersion("1.0.24.0")]
[assembly: AssemblyFileVersion("1.0.24.0")]
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductName="MtApi" ?>
<?define ProductVersion="1.0.23" ?>
<?define ProductVersion="1.0.24" ?>
<?define Manufacturer="DW"?>
<?define ProductPath="..\build\products\$(var.Configuration)\"?>
BIN
View File
Binary file not shown.
+29
View File
@@ -3469,6 +3469,35 @@ int executeCommand()
}
break;
case 153: //TerminalInfoString
if (getIntValue(ExpertHandle, 0, typeValue))
{
PrintParamError("property_id");
}
if (!sendStringResponse(ExpertHandle, TerminalInfoString(typeValue)))
{
PrintResponseError("TerminalInfoString");
}
break;
case 154: //SymbolInfoString
if (!getStringValue(ExpertHandle, 0, symbolValue))
{
PrintParamError("symbol");
}
if (getIntValue(ExpertHandle, 1, typeValue))
{
PrintParamError("prop_id");
}
if (!sendStringResponse(ExpertHandle, SymbolInfoString(symbolValue, typeValue)))
{
PrintResponseError("SymbolInfoString");
}
break;
default:
Print("Unknown command type = ", commandType);
sendVoidResponse(ExpertHandle);