forked from eugeniokp/ROOT
497 lines
20 KiB
Text
497 lines
20 KiB
Text
//+------------------------------------------------------------------+
| |||
//| PipaGirando.mq4 |
| |||
//| Copyright 2022, Yevheniy Kopanitskyy |
| |||
//| https://www.mql5.com |
| |||
//+------------------------------------------------------------------+
| |||
#property copyright "Copyright 2022, Yevheniy Kopanitskyy"
| |||
#property link "https://www.mql5.com"
| |||
#property version "1.00"
| |||
#property strict
| |||
//+------------------------------------------------------------------+
| |||
//| Expert initialization function |
| |||
//+------------------------------------------------------------------+
| |||
int SEV=1;
| |||
int YUG=1;
| |||
int ZAP=1;
| |||
int VOST=1;
| |||
double HIGHT;
| |||
datetime BrTime;
| |||
long CHWPX;
| |||
datetime time_bar;
| |||
string RectanglLabel="703";
| |||
datetime bar_time=D'2018.08.06 00:00';
| |||
string Text_Space_1=" Ejemplo de Texto ";
| |||
ushort CharacterGet;
| |||
string Text_Space_2;
| |||
string Text_Space_3;
| |||
string Play="203";
| |||
string ObiektTe="2001";
| |||
string TextSpace="202";
| |||
string TextSpace_2="200";
| |||
string TextSpace_3="199";
| |||
int LetraCorriente=-1;
| |||
string PosLetra;
| |||
string Delante="206";
| |||
string Atras="207";
| |||
string Write="208";
| |||
int LetSimbEN[9999,20];
| |||
string CharLetra;
| |||
string FileName1="Letras_EN.bin";
| |||
bool ShowSimb=false;
| |||
| |||
//+------------------------------------------------------------------+
| |||
//| |
| |||
//+------------------------------------------------------------------+
| |||
int OnInit()
| |||
{
| |||
//Загрузка массива с буквами
| |||
ArrayInitialize(LetSimbEN,0);
| |||
int file_handle1=FileOpen(FileName1,FILE_READ|FILE_WRITE|FILE_BIN);//Loading
| |||
Print(" Letras_EN ",file_handle1);
| |||
if(file_handle1>0)
| |||
{
| |||
| |||
FileSeek(file_handle1,0,SEEK_CUR);
| |||
| |||
uint test=FileReadArray(file_handle1,LetSimbEN,0,WHOLE_ARRAY);
| |||
FileClose(file_handle1);
| |||
}
| |||
//Последняя пустая позиция
| |||
for(int Bi=1; Bi<9998; Bi++)
| |||
{
| |||
Print(" Fila ",Bi," Contenido de celda ",LetSimbEN[Bi,10]);//Печать наличия в массиве
| |||
if(LetSimbEN[Bi,0]==0)
| |||
{
| |||
Print(" Numero de Fila Libre ",Bi);
| |||
break;
| |||
}
| |||
| |||
}
| |||
| |||
| |||
CHWPX=-1;
| |||
ChartGetInteger(0,CHART_WIDTH_IN_PIXELS,0,CHWPX);
| |||
//--- create timer
| |||
| |||
// - Working with charts ---
| |||
| |||
ChartSetInteger(0,CHART_SHOW_GRID,0,false);
| |||
ChartSetInteger(0,CHART_DRAG_TRADE_LEVELS,0,false);
| |||
ChartSetInteger(0,CHART_SHIFT,0,true);
| |||
ChartSetDouble(0,CHART_SHIFT_SIZE,25);
| |||
ChartSetSymbolPeriod(0,Symbol(),PERIOD_M1);
| |||
ChartSetInteger(0,CHART_MODE,CHART_CANDLES);
| |||
ChartSetInteger(0,CHART_COLOR_BACKGROUND,clrWhite);
| |||
ChartSetInteger(0,CHART_COLOR_FOREGROUND,clrBlack);
| |||
ChartSetInteger(0,CHART_COLOR_CHART_UP,clrBlack);
| |||
ChartSetInteger(0,CHART_COLOR_CHART_DOWN,clrBlack);
| |||
ChartSetInteger(0,CHART_COLOR_CHART_LINE,clrBlack);
| |||
ChartSetInteger(0,CHART_COLOR_CANDLE_BULL,clrWhite);
| |||
ChartSetInteger(0,CHART_COLOR_CANDLE_BEAR,clrBlack);
| |||
ChartSetInteger(0,CHART_COLOR_BID,clrBlue);
| |||
EventSetTimer(60);
| |||
| |||
| |||
//-----обиект прямоугольное окно
| |||
ObjectCreate(0,RectanglLabel,OBJ_RECTANGLE_LABEL,0,0,0);
| |||
ObjectSetInteger(0,RectanglLabel,OBJPROP_XDISTANCE,CHWPX-1300);
| |||
ObjectSetInteger(0,RectanglLabel,OBJPROP_YDISTANCE,0);
| |||
ObjectSetInteger(0,RectanglLabel,OBJPROP_XSIZE,CHWPX-300);
| |||
ObjectSetInteger(0,RectanglLabel,OBJPROP_YSIZE,700);
| |||
ObjectSetInteger(0,RectanglLabel,OBJPROP_BGCOLOR,clrBlueViolet);
| |||
ObjectSetInteger(0,RectanglLabel,OBJPROP_BORDER_TYPE,BORDER_SUNKEN);
| |||
ObjectSetInteger(0,RectanglLabel,OBJPROP_COLOR,clrBlack);
| |||
ObjectSetInteger(0,RectanglLabel,OBJPROP_STYLE,DRAW_SECTION);
| |||
ObjectSetInteger(0,RectanglLabel,OBJPROP_WIDTH,10);
| |||
| |||
| |||
//------Поле ввода Текста----
| |||
| |||
| |||
| |||
ObjectCreate(ObiektTe,OBJ_EDIT,0,BrTime,HIGHT+0.00015);//Создание Поля ввода для текста
| |||
ObjectSetInteger(0,ObiektTe,OBJPROP_XDISTANCE,CHWPX-1300);//Устанавливается дистанция по оси X 300 пикселей
| |||
ObjectSetInteger(0,ObiektTe,OBJPROP_YDISTANCE,0);//Устанавливается дистанция по оси Y 0 пикселей
| |||
ObjectSetInteger(0,ObiektTe,OBJPROP_XSIZE,1200);//Устанавливается размер поля по оси икс в 120 пикселей
| |||
ObjectSetInteger(0,ObiektTe,OBJPROP_YSIZE,40);//Устанавливается размер поля по оси игрик в 20 пикселей
| |||
ObjectSetInteger(0,ObiektTe,OBJPROP_ALIGN,ALIGN_CENTER);//Устанавливается значение центровка текста на уравень центра
| |||
ObjectSetInteger(0,ObiektTe,OBJPROP_COLOR,clrRed);//Обьект поле получает красный цвет
| |||
//--- установим текст
| |||
string TextInit="introdusca texto para ejecutar el jego, texto en minuscula";//Установка текста в поле
| |||
ObjectSetString(0,ObiektTe,OBJPROP_TEXT,TextInit);
| |||
//--- Вывод 1 Текста
| |||
| |||
| |||
ObjectDelete(TextSpace);
| |||
ObjectCreate(TextSpace,OBJ_LABEL,0,BrTime,HIGHT+0.00015);
| |||
ObjectSetString(0,TextSpace,OBJPROP_TEXT,Text_Space_1);
| |||
ObjectSetInteger(0,TextSpace,OBJPROP_COLOR,clrRed);
| |||
ObjectSetInteger(0,TextSpace,OBJPROP_FONTSIZE,16);
| |||
ObjectSetInteger(0,TextSpace,OBJPROP_XDISTANCE,CHWPX-1300);
| |||
ObjectSetInteger(0,TextSpace,OBJPROP_YDISTANCE,80);
| |||
ObjectSetInteger(0,TextSpace,OBJPROP_ALIGN,ALIGN_CENTER);//Устанавливается значение центровка текста на уравень центра
| |||
ObjectSetInteger(0,TextSpace,OBJPROP_COLOR,clrBlack);
| |||
| |||
//--- Вывод 2 Текста
| |||
| |||
| |||
ObjectDelete(TextSpace_2);
| |||
ObjectCreate(TextSpace_2,OBJ_LABEL,0,BrTime,HIGHT+0.00015);
| |||
ObjectSetString(0,TextSpace_2,OBJPROP_TEXT,Text_Space_2);
| |||
ObjectSetInteger(0,TextSpace_2,OBJPROP_COLOR,clrRed);
| |||
ObjectSetInteger(0,TextSpace_2,OBJPROP_FONTSIZE,10);
| |||
ObjectSetInteger(0,TextSpace_2,OBJPROP_XDISTANCE,CHWPX-1300);
| |||
ObjectSetInteger(0,TextSpace_2,OBJPROP_YDISTANCE,120);
| |||
ObjectSetInteger(0,TextSpace_2,OBJPROP_ALIGN,ALIGN_CENTER);//Устанавливается значение центровка текста на уравень центра
| |||
ObjectSetInteger(0,TextSpace_2,OBJPROP_COLOR,clrBlack);
| |||
| |||
//--- Вывод 3 Текста
| |||
| |||
| |||
ObjectDelete(TextSpace_3);
| |||
ObjectCreate(TextSpace_3,OBJ_LABEL,0,BrTime,HIGHT+0.00015);
| |||
ObjectSetString(0,TextSpace_3,OBJPROP_TEXT,Text_Space_3);
| |||
ObjectSetInteger(0,TextSpace_3,OBJPROP_COLOR,clrRed);
| |||
ObjectSetInteger(0,TextSpace_3,OBJPROP_FONTSIZE,10);
| |||
ObjectSetInteger(0,TextSpace_3,OBJPROP_XDISTANCE,CHWPX-1300);
| |||
ObjectSetInteger(0,TextSpace_3,OBJPROP_YDISTANCE,160);
| |||
ObjectSetInteger(0,TextSpace_3,OBJPROP_ALIGN,ALIGN_CENTER);//Устанавливается значение центровка текста на уравень центра
| |||
ObjectSetInteger(0,TextSpace_3,OBJPROP_COLOR,clrBlack);
| |||
| |||
//--Play Button--------------------
| |||
| |||
ObjectDelete(Play);
| |||
ObjectCreate(0,Play,OBJ_BUTTON,0,bar_time,HIGHT+0.00015);
| |||
ObjectSetInteger(0,Play,OBJPROP_XDISTANCE,CHWPX-90);
| |||
ObjectSetInteger(0,Play,OBJPROP_YDISTANCE,0);
| |||
ObjectSetInteger(0,Play,OBJPROP_XSIZE,60);
| |||
ObjectSetInteger(0,Play,OBJPROP_YSIZE,40);
| |||
string textPlay="Play";
| |||
ObjectSetString(0,Play,OBJPROP_TEXT,textPlay);
| |||
ObjectSetInteger(0,Play,OBJPROP_COLOR,clrRed);
| |||
ObjectSetInteger(0,Play,OBJPROP_FONTSIZE,14);
| |||
ObjectSetInteger(0,Play,OBJPROP_ALIGN,ALIGN_CENTER);
| |||
bool Playstate=false;
| |||
ObjectSetInteger(0,Play,OBJPROP_STATE,Playstate);
| |||
//long Playbuttonpresed=ObjectGetInteger(0,Play,OBJPROP_STATE,0);
| |||
| |||
//--Game 1 Button--------------------
| |||
string Game_1="204";
| |||
ObjectDelete(Game_1);
| |||
//ObjectCreate(0,Game_1,OBJ_BUTTON,0,bar_time,HIGHT+0.00015);
| |||
ObjectSetInteger(0,Game_1,OBJPROP_XDISTANCE,CHWPX-120);
| |||
ObjectSetInteger(0,Game_1,OBJPROP_YDISTANCE,80);
| |||
ObjectSetInteger(0,Game_1,OBJPROP_XSIZE,100);
| |||
ObjectSetInteger(0,Game_1,OBJPROP_YSIZE,40);
| |||
string textGame_1="Game 1";
| |||
ObjectSetString(0,Game_1,OBJPROP_TEXT,textGame_1);
| |||
ObjectSetInteger(0,Game_1,OBJPROP_COLOR,clrRed);
| |||
ObjectSetInteger(0,Game_1,OBJPROP_FONTSIZE,14);
| |||
ObjectSetInteger(0,Game_1,OBJPROP_ALIGN,ALIGN_CENTER);
| |||
bool Game_1state=false;
| |||
ObjectSetInteger(0,Game_1,OBJPROP_STATE,Game_1state);
| |||
//long Game_1buttonpresed=ObjectGetInteger(0,Game_1,OBJPROP_STATE,0);
| |||
| |||
//--Game 2 Button--------------------
| |||
string Game_2="205";
| |||
ObjectDelete(Game_2);
| |||
//ObjectCreate(0,Game_2,OBJ_BUTTON,0,bar_time,HIGHT+0.00015);
| |||
ObjectSetInteger(0,Game_2,OBJPROP_XDISTANCE,CHWPX-240);
| |||
ObjectSetInteger(0,Game_2,OBJPROP_YDISTANCE,80);
| |||
ObjectSetInteger(0,Game_2,OBJPROP_XSIZE,100);
| |||
ObjectSetInteger(0,Game_2,OBJPROP_YSIZE,40);
| |||
string textGame_2="Game 2";
| |||
ObjectSetString(0,Game_2,OBJPROP_TEXT,textGame_2);
| |||
ObjectSetInteger(0,Game_2,OBJPROP_COLOR,clrRed);
| |||
ObjectSetInteger(0,Game_2,OBJPROP_FONTSIZE,14);
| |||
ObjectSetInteger(0,Game_2,OBJPROP_ALIGN,ALIGN_CENTER);
| |||
bool Game_2state=false;
| |||
ObjectSetInteger(0,Game_2,OBJPROP_STATE,Game_2state);
| |||
//long Game_2buttonpresed=ObjectGetInteger(0,Game_2,OBJPROP_STATE,0);
| |||
| |||
//--Delante Button--------------------
| |||
| |||
ObjectDelete(Delante);
| |||
ObjectCreate(0,Delante,OBJ_BUTTON,0,bar_time,HIGHT+0.00015);
| |||
ObjectSetInteger(0,Delante,OBJPROP_XDISTANCE,CHWPX-540);
| |||
ObjectSetInteger(0,Delante,OBJPROP_YDISTANCE,140);
| |||
ObjectSetInteger(0,Delante,OBJPROP_XSIZE,140);
| |||
ObjectSetInteger(0,Delante,OBJPROP_YSIZE,40);
| |||
string textDelante="Delante ->>";
| |||
ObjectSetString(0,Delante,OBJPROP_TEXT,textDelante);
| |||
ObjectSetInteger(0,Delante,OBJPROP_COLOR,clrRed);
| |||
ObjectSetInteger(0,Delante,OBJPROP_FONTSIZE,14);
| |||
ObjectSetInteger(0,Delante,OBJPROP_ALIGN,ALIGN_CENTER);
| |||
bool Delantestate=false;
| |||
ObjectSetInteger(0,Delante,OBJPROP_STATE,Delantestate);
| |||
//long Delantebuttonpresed=ObjectGetInteger(0,Delante,OBJPROP_STATE,0);
| |||
//--Atras Button--------------------
| |||
| |||
ObjectDelete(Atras);
| |||
ObjectCreate(0,Atras,OBJ_BUTTON,0,bar_time,HIGHT+0.00015);
| |||
ObjectSetInteger(0,Atras,OBJPROP_XDISTANCE,CHWPX-840);
| |||
ObjectSetInteger(0,Atras,OBJPROP_YDISTANCE,140);
| |||
ObjectSetInteger(0,Atras,OBJPROP_XSIZE,140);
| |||
ObjectSetInteger(0,Atras,OBJPROP_YSIZE,40);
| |||
string textAtras="<<- Atras";
| |||
ObjectSetString(0,Atras,OBJPROP_TEXT,textAtras);
| |||
ObjectSetInteger(0,Atras,OBJPROP_COLOR,clrRed);
| |||
ObjectSetInteger(0,Atras,OBJPROP_FONTSIZE,14);
| |||
ObjectSetInteger(0,Atras,OBJPROP_ALIGN,ALIGN_CENTER);
| |||
bool Atrasstate=false;
| |||
ObjectSetInteger(0,Atras,OBJPROP_STATE,Atrasstate);
| |||
//long Atrasbuttonpresed=ObjectGetInteger(0,Atras,OBJPROP_STATE,0);
| |||
//--Write Button--------------------
| |||
| |||
ObjectDelete(Write);
| |||
// ObjectCreate(0,Write,OBJ_BUTTON,0,bar_time,HIGHT+0.00015);
| |||
ObjectSetInteger(0,Write,OBJPROP_XDISTANCE,CHWPX-685);
| |||
ObjectSetInteger(0,Write,OBJPROP_YDISTANCE,190);
| |||
ObjectSetInteger(0,Write,OBJPROP_XSIZE,140);
| |||
ObjectSetInteger(0,Write,OBJPROP_YSIZE,40);
| |||
string textWrite=" Write ";
| |||
ObjectSetString(0,Write,OBJPROP_TEXT,textWrite);
| |||
ObjectSetInteger(0,Write,OBJPROP_COLOR,clrRed);
| |||
ObjectSetInteger(0,Write,OBJPROP_FONTSIZE,14);
| |||
ObjectSetInteger(0,Write,OBJPROP_ALIGN,ALIGN_CENTER);
| |||
bool Writestate=false;
| |||
ObjectSetInteger(0,Write,OBJPROP_STATE,Writestate);
| |||
//long Writebuttonpresed=ObjectGetInteger(0,Write,OBJPROP_STATE,0);
| |||
//---
| |||
return(INIT_SUCCEEDED);
| |||
}
| |||
//+------------------------------------------------------------------+
| |||
//| Expert deinitialization function |
| |||
//+------------------------------------------------------------------+
| |||
void OnDeinit(const int reason)
| |||
{
| |||
//--- destroy timer
| |||
EventKillTimer();
| |||
| |||
}
| |||
//+------------------------------------------------------------------+
| |||
//| Expert tick function |
| |||
//+------------------------------------------------------------------+
| |||
void OnTick()
| |||
{
| |||
//if(time_bar!=Time[0])// Body area containing binary code analyzers
| |||
//{
| |||
HIGHT=iHigh(Symbol(),0,1);
| |||
BrTime=iTime(Symbol(),0,1);
| |||
| |||
//----
| |||
//time_bar=Time[0];
| |||
//---
| |||
| |||
| |||
| |||
| |||
| |||
| |||
//-------imag Kubo-----
| |||
| |||
//-------imag Kubo-Game----
| |||
string Kubo_Img1="\\Images\\Class-Kubo-16-img\\1.bmp";
| |||
string Kubo_Img2="\\Images\\Class-Kubo-16-img\\2.bmp";
| |||
string Kubo_Img5="\\Images\\Class-Kubo-16-img\\5.bmp";
| |||
string Kubo_Img6="\\Images\\Class-Kubo-16-img\\6.bmp";
| |||
string Kubo_Img3="\\Images\\Class-Kubo-16-img\\3.bmp";
| |||
string Kubo_Img4="\\Images\\Class-Kubo-16-img\\4.bmp";
| |||
string Kubo_Img7="\\Images\\Class-Kubo-16-img\\7.bmp";
| |||
string Kubo_Img8="\\Images\\Class-Kubo-16-img\\8.bmp";
| |||
string Kubo_Img9="\\Images\\Class-Kubo-16-img\\9.bmp";
| |||
string Kubo_Img10="\\Images\\Class-Kubo-16-img\\10.bmp";
| |||
string Kubo_Img13="\\Images\\Class-Kubo-16-img\\13.bmp";
| |||
string Kubo_Img14="\\Images\\Class-Kubo-16-img\\14.bmp";
| |||
string Kubo_Img11="\\Images\\Class-Kubo-16-img\\11.bmp";
| |||
string Kubo_Img12="\\Images\\Class-Kubo-16-img\\12.bmp";
| |||
string Kubo_Img15="\\Images\\Class-Kubo-16-img\\15.bmp";
| |||
string Kubo_Img16="\\Images\\Class-Kubo-16-img\\16.bmp";
| |||
string Kubo_ImgZERO="\\Images\\Class-Kubo-16-img\\ZERO.bmp";
| |||
//-----------------------
| |||
string obiekt1001="1001";
| |||
ObjectDelete(0,obiekt1001);
| |||
ObjectDelete(obiekt1001);
| |||
ObjectCreate(obiekt1001,OBJ_BITMAP_LABEL,0,BrTime,HIGHT+0.00015);
| |||
ObjectSetString(0,obiekt1001,OBJPROP_BMPFILE,Kubo_ImgZERO);
| |||
ObjectSetInteger(0,obiekt1001,OBJPROP_XDISTANCE,1600);
| |||
ObjectSetInteger(0,obiekt1001,OBJPROP_YDISTANCE,130);
| |||
| |||
//--------Play Button 1-----//
| |||
string IgetText;
| |||
long Playbuttonpresed=ObjectGetInteger(0,Play,OBJPROP_STATE,0);
| |||
if(Playbuttonpresed==1)
| |||
{
| |||
| |||
| |||
IgetText=ObjectGetString(0,ObiektTe,OBJPROP_TEXT);
| |||
ObjectSetString(0,TextSpace,OBJPROP_TEXT,IgetText);
| |||
ObjectSetInteger(0,Play,OBJPROP_STATE,0);
| |||
LetraCorriente=0;//Порядковый номер текущей буквы
| |||
//string test="abcdefghigklmnopqrstuvwxyzñ ";//Начало чтения с 0 символа
| |||
int resstrlen=StringLen(IgetText);
| |||
Print(resstrlen);//минусуется последний символ так как является пустым
| |||
int resstrlen1=resstrlen;
| |||
string stresstrlen1=IntegerToString(resstrlen1);
| |||
CharacterGet=StringGetCharacter(IgetText,LetraCorriente);//Пробел цифра 32
| |||
Print(" Character 0 - ",CharacterGet);
| |||
ObjectSetString(0,TextSpace_2,OBJPROP_TEXT,"Cantidad de Letras Total = a "+stresstrlen1);
| |||
CharLetra=CharToStr(CharacterGet);
| |||
//Print(" Letra - ",CharLetra);
| |||
//спарсить весьнабор букв в циферном значении
| |||
| |||
string stLetraCorriente=IntegerToString(LetraCorriente+1);
| |||
ObjectSetString(0,TextSpace_3,OBJPROP_TEXT,"Letra actual =[ "+CharLetra+ " ] Y Posicion de letra en texto = a [ "+stLetraCorriente+" ]");
| |||
ShowSimb=true;
| |||
}
| |||
//--------Delante Button 1-----//
| |||
| |||
long Delantebuttonpresed=ObjectGetInteger(0,Delante,OBJPROP_STATE,0);
| |||
if(Delantebuttonpresed==1)
| |||
{
| |||
LetraCorriente++;//Присваем Номер текущей цифры
| |||
Print("Delante Letra N ",LetraCorriente);
| |||
IgetText=ObjectGetString(0,ObiektTe,OBJPROP_TEXT);
| |||
CharacterGet=StringGetCharacter(IgetText,LetraCorriente);//Пробел цифра 32
| |||
CharLetra=CharToStr(CharacterGet);
| |||
| |||
string stLetraCorriente=IntegerToString(LetraCorriente+1);
| |||
ObjectSetString(0,TextSpace_3,OBJPROP_TEXT,"Letra actual =[ "+CharLetra+ " ] Y Posicion de letra en texto = a [ "+stLetraCorriente+" ]");
| |||
ObjectSetInteger(0,Delante,OBJPROP_STATE,0);
| |||
//Подача номера Буквы
| |||
ShowSimb=true;
| |||
| |||
| |||
| |||
}
| |||
long Atrasbuttonpresed=ObjectGetInteger(0,Atras,OBJPROP_STATE,0);
| |||
if(Atrasbuttonpresed==1)
| |||
{
| |||
| |||
LetraCorriente--;//Присваем Номер текущей цифры
| |||
Print("Atras Letra N ",LetraCorriente);
| |||
IgetText=ObjectGetString(0,ObiektTe,OBJPROP_TEXT);
| |||
| |||
CharacterGet=StringGetCharacter(IgetText,LetraCorriente);//Пробел цифра 32
| |||
CharLetra=CharToStr(CharacterGet);
| |||
string stLetraCorriente=IntegerToString(LetraCorriente+1);
| |||
ObjectSetString(0,TextSpace_3,OBJPROP_TEXT,"Letra actual =[ "+CharLetra+ " ] Y Posicion de letra en texto = a [ "+stLetraCorriente+" ]");
| |||
ObjectSetInteger(0,Atras,OBJPROP_STATE,0);
| |||
//Подача номера Буквы
| |||
| |||
ShowSimb=true;
| |||
| |||
| |||
}
| |||
int i;
| |||
long Writebuttonpresed=ObjectGetInteger(0,Write,OBJPROP_STATE,0);
| |||
if(Writebuttonpresed==1)
| |||
{
| |||
| |||
ObjectSetInteger(0,Write,OBJPROP_STATE,0);
| |||
//Запись Данных в Массив
| |||
| |||
| |||
//Записываем Изображения семечки 8 бит
| |||
i=5;//Номер строки
| |||
| |||
LetSimbEN[i,0]=1;//Bit 1
| |||
LetSimbEN[i,1]=10;//Bit 2
| |||
LetSimbEN[i,2]=2;//Bit 3
| |||
LetSimbEN[i,3]=9;//Bit 4
| |||
LetSimbEN[i,4]=4;//Bit 5
| |||
LetSimbEN[i,5]=12;//Bit 6
| |||
LetSimbEN[i,6]=3;//Bit 7
| |||
LetSimbEN[i,7]=14;//Bit 8
| |||
//--Польс 1 из 4
| |||
LetSimbEN[i,8]=1;//Sev - 1,Yug -2 ,Vost - 3, Zap - 4
| |||
//--Вариант Переключателя x1 - 1,x2 - 2,x3 - 3,x4 - 4 , z1 -5 ,z2 - 6,z3 - 7,z4 - 8
| |||
LetSimbEN[i,9]=1;
| |||
//-- Номер симвала из MQL4 Пример , 201, 202, 203
| |||
LetSimbEN[i,10]=99;
| |||
| |||
| |||
Print(LetSimbEN[i,0]);
| |||
Print(LetSimbEN[i,1]);
| |||
Print(LetSimbEN[i,2]);
| |||
Print(LetSimbEN[i,3]);
| |||
Print(LetSimbEN[i,4]);
| |||
Print(LetSimbEN[i,5]);
| |||
Print(LetSimbEN[i,6]);
| |||
Print(LetSimbEN[i,7]);
| |||
Print(LetSimbEN[i,8]);
| |||
Print(LetSimbEN[i,9]);
| |||
Print(LetSimbEN[i,10]);
| |||
| |||
| |||
| |||
//Запись внесённых символов в Массив
| |||
int file_handle1=FileOpen(FileName1,FILE_READ|FILE_WRITE|FILE_BIN);
| |||
//Print("HANDLE ",file_handle13);
| |||
if(file_handle1>0)
| |||
{
| |||
| |||
FileSeek(file_handle1,0,SEEK_CUR);
| |||
| |||
uint test =FileWriteArray(file_handle1,LetSimbEN,0,WHOLE_ARRAY);
| |||
//Print("WRITED ",test);
| |||
FileClose(file_handle1);
| |||
| |||
| |||
}
| |||
| |||
}
| |||
| |||
| |||
| |||
| |||
if(LetraCorriente>-1 && ShowSimb==true)
| |||
{
| |||
for(int Si=0; Si<9999; Si++) // Si номер индекса в массиве
| |||
{
| |||
Print(" StrNum ",CharacterGet," Si ",Si);
| |||
if(LetSimbEN[Si,10]==CharacterGet)//поиск строки по номеру буквы.
| |||
{
| |||
| |||
ObjectSetString(0,obiekt1001,OBJPROP_BMPFILE,"\\Images\\Class-Kubo-16-img\\"+IntegerToString(LetSimbEN[Si,0])+".bmp");
| |||
Sleep(3500);
| |||
ObjectSetString(0,obiekt1001,OBJPROP_BMPFILE,"\\Images\\Class-Kubo-16-img\\"+IntegerToString(LetSimbEN[Si,1])+".bmp");
| |||
Sleep(3500);
| |||
ObjectSetString(0,obiekt1001,OBJPROP_BMPFILE,"\\Images\\Class-Kubo-16-img\\"+IntegerToString(LetSimbEN[Si,2])+".bmp");
| |||
Sleep(3500);
| |||
ObjectSetString(0,obiekt1001,OBJPROP_BMPFILE,"\\Images\\Class-Kubo-16-img\\"+IntegerToString(LetSimbEN[Si,3])+".bmp");
| |||
Sleep(3500);
| |||
ObjectSetString(0,obiekt1001,OBJPROP_BMPFILE,"\\Images\\Class-Kubo-16-img\\"+IntegerToString(LetSimbEN[Si,4])+".bmp");
| |||
Sleep(3500);
| |||
ObjectSetString(0,obiekt1001,OBJPROP_BMPFILE,"\\Images\\Class-Kubo-16-img\\"+IntegerToString(LetSimbEN[Si,5])+".bmp");
| |||
Sleep(3500);
| |||
ObjectSetString(0,obiekt1001,OBJPROP_BMPFILE,"\\Images\\Class-Kubo-16-img\\"+IntegerToString(LetSimbEN[Si,6])+".bmp");
| |||
Sleep(3500);
| |||
ObjectSetString(0,obiekt1001,OBJPROP_BMPFILE,"\\Images\\Class-Kubo-16-img\\"+IntegerToString(LetSimbEN[Si,7])+".bmp");
| |||
SEV=1;
| |||
YUG=0;
| |||
ZAP=0;
| |||
VOST=0;
| |||
break;
| |||
Print("FIN DE LA LETRA ");//вывести заголовок конец буквы
| |||
ShowSimb=false;
| |||
}
| |||
}
| |||
}
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
// }
| |||
}
| |||
//+------------------------------------------------------------------+
| |||
//| Timer function |
| |||
//+------------------------------------------------------------------+
| |||
| |||
//+------------------------------------------------------------------+
|