|
//| CreateTextLable() function
void CreateTextLable
(string TextLableName, string Text, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )
{
//---
ObjectCreate(TextLableName, OBJ_LABEL, 0, 0, 0);
ObjectSet(TextLableName, OBJPROP_CORNER, TextCorner);
ObjectSet(TextLableName, OBJPROP_XDISTANCE, X);
ObjectSet(TextLableName, OBJPROP_YDISTANCE, Y);
ObjectSetText(TextLableName,Text,TextSize,FontName,TextColor);
//----
}
//| SetTextLable() function |
void SetTextLable
(string TextLableName, string Text, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )
{
//---
ObjectSet(TextLableName, OBJPROP_CORNER, TextCorner);
ObjectSet(TextLableName, OBJPROP_XDISTANCE, X);
ObjectSet(TextLableName, OBJPROP_YDISTANCE, Y);
ObjectSetText(TextLableName,Text,TextSize,FontName,TextColor);
//----
}
//| TimeCount() function |
void TimeCount
(string TextLableName, int StartNumber, int StopNumber, int Inerval, int TextSize, string FontName, color TextColor, int TextCorner, int X, int Y )
{
//---
CreateTextLable(TextLableName,"-"+StartNumber+"-",TextSize,FontName,TextColor,TextCorner,X,Y);
WindowRedraw();
PlaySound("WAIT");
for(int Count=StartNumber+1;Count<=StopNumber;Count++)
{
Sleep(Inerval);
PlaySound("WAIT");
SetTextLable(TextLableName,"-"+ Count+"-",TextSize,FontName,TextColor,TextCorner,X,Y);
WindowRedraw();
}
Sleep(Inerval);
ObjectDelete(TextLableName);
//----
}
|
|