//==========================================================
char WindowName[]="LiteVNA.64.App";
int  WindowWidth=1024;
int  WindowHeight=600;
int  refresh_time=0;
#define   mode_Touch_and_Keyboard
int Lang=0;
#define  FILE_LANG
#include "xlang2.h" 
#include <mswindows.h>
// ==========================================================
#define huge
#define shuge
#define even
#define borland5
#define dev_cpp
#define directx
#define debug_names
#define maxcolor_32000
#include "options.h" 
#define DIALOG
#define _GLOBALS_
#ifndef _GLOBALS_
#include ".\include\T__Arial_Unicode_MS_14.h" 
#include ".\include\T_Arial_Unicode_MS_10.h" 
#include ".\include\T_Arial_Unicode_MS_12.h" 
#include ".\include\T_Arial_Unicode_MS_28.h" 
#include ".\include\T_Arial_Unicode_MS_18_Bold.h" 
#include ".\include\T_Arial_Unicode_MS_16.h" 
#else
extern const unsigned char T__Arial_Unicode_MS_14[]; 
extern const unsigned char T_Arial_Unicode_MS_10[]; 
extern const unsigned char T_Arial_Unicode_MS_12[]; 
extern const unsigned char T_Arial_Unicode_MS_28[]; 
extern const unsigned char T_Arial_Unicode_MS_18_Bold[]; 
extern const unsigned char T_Arial_Unicode_MS_16[]; 
#endif
#include "allicone.h" 
#include "c:\commons\c\objects\base_objects\commons\commons.h"
void exec_posiz(void *P){};
void idle(void) {};
// ==========================================================

volatile int pagina;
char *Compiler={"12.1 6/12/2025"};
int first_cycle=1;
int is_running=0;
int cold_start=0;
long int plc_loop=0;
#ifndef NO_PLC
#include ".\plc_vars.h" 
#endif

enum {_page1=1};
#include "common.h" 
#include "page1.c" 
#include "commonplc.h" 
#ifndef NO_PLC
#include "start_plc_pc.h" 
#endif

#ifdef __cplusplus
extern "C" {
#endif

void mainloop(void)
{
    _doubleclick=1;
    _tastiera=1;
    _touch=1;
    v_color(113,113);
    v_cls();
restart:
    pagina=1;
    CSET=0;
#ifdef __VERBOSE
  __verbose=1;
#endif
#ifndef NO_PRELOAD
    v_font(OFF8,1,2);v_color(113,0);v_llocate(3,6);v_print("loading page page1          ");loadpage(page1);
#endif
    v_font(OFF8,1,2);v_color(113,0);v_llocate(3,6);v_print("loading start.c         ");
#include "start.c" 
#ifndef NO_PLC
    v_font(OFF8,1,2);v_color(113,0);v_llocate(3,6);v_print("start plc               ");
    start_plc();
    wait(20);
#endif
    v_font(OFF8,1,2);v_color(113,0);v_llocate(3,6);v_print("start timers            ");
    start_timers();
#include "XLANG1.H" 
    while(1)
    {
      if(pagina==1) gopage(page1);
      if(pagina==-1) {
#ifndef NO_PLC
      stop_plc();
#endif
      pagina=1;cold_start=1;goto restart;}
      if(pagina<1) pagina=1;
      if(pagina>1) pagina=1;
    }
}
#ifdef __cplusplus
}
#endif
// ==========================================================
