- Correction of Test Client

- Missing codes in mtapi5.mq5
This commit is contained in:
Janderson FFerreira
2018-03-12 11:17:12 -03:00
parent 951a91976c
commit cbff71f8d0
3 changed files with 166 additions and 83 deletions
+11 -11
View File
@@ -8,6 +8,7 @@ using System.Collections.ObjectModel;
using System.Globalization;
using System.Threading.Tasks;
using System.IO;
using Microsoft.Win32;
namespace MtApi5TestClient
{
@@ -114,17 +115,16 @@ namespace MtApi5TestClient
var MT5Path = _mtApiClient.TerminalInfoString(ENUM_TERMINAL_INFO_STRING.TERMINAL_PATH);
var TemplateName = "\\Files\\aa.tpl";
var TemplateStringContent = File.ReadAllLines("d:\\template_name.tpl");
File.WriteAllLines($"{MT5Path}\\MQL5{TemplateName}", TemplateStringContent);
AddLog($"path: {MT5Path}");
_mtApiClient.ChartApplyTemplate(ChartId, TemplateName);
//var Applytemplate = _mtApiClient.ChartApplyTemplate(ChartId, "/")
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Template File (*.tpl)|*.tpl|All files (*.*)|*.*";
if (openFileDialog.ShowDialog() == true)
{
var TemplateName = "\\Files\\mt5api_copy.tpl";
var TemplateStringContent = File.ReadAllLines(openFileDialog.FileName);
File.WriteAllLines($"{MT5Path}\\MQL5{TemplateName}", TemplateStringContent);
AddLog($"path: {MT5Path}");
_mtApiClient.ChartApplyTemplate(ChartId, TemplateName);
}
return ChartId;
});