int flag1 = 0;
int flag2 = 0;

void CheckBoxWidget5OnChange(tWidget *pWidget, unsigned long bSelected)
{

    static char *str1 = "On";
    static char *str2 = "Off" ;


    if (flag1 == 0)
    {
      hmi_Beep();
      CanvasTextSet(&LabelWidget7 , str1);
      WidgetPaint((tWidget*)&LabelWidget7);
      flag1 =1 ;
    }
    else
    {
      hmi_Beep();
      CanvasTextSet(&LabelWidget7 , str2);
      WidgetPaint((tWidget*)&LabelWidget7);
      flag1 =0 ;
    }
}


void CheckBoxWidget6OnChange(tWidget *pWidget, unsigned long bSelected)
{
    static char *str3 = "Open";
    static char *str4 = "Close";


    if (flag2 == 0)
    {
      hmi_Beep();
      CanvasTextSet(&LabelWidget8 , str3);
      WidgetPaint((tWidget*)&LabelWidget8);
      flag2 =1 ;
    }
    else
    {
      hmi_Beep();
      CanvasTextSet(&LabelWidget8 , str4);
      WidgetPaint((tWidget*)&LabelWidget8);
      flag2 =0 ;
    }
}
