Good morning,
I am developing an application in C # using Windows Forms and user controls, the application that I am developing is a small project for a restaurant which in the table interface, what it does is to click on the corresponding table changes its been either "busy" or "available." What happens is that by changing Form and returning to the tables they all return to "available".
There is some way that you can save the changes and do not go back to the default when you exit and re-enter the Form of tables.
I only save them as global variables:
class variables
{
public static bool presionado ;
public static bool presionado2 ;
public static bool presionado3;
public static bool presionado4;
public static bool presionado5 ;
public static bool presionado6 ;
public static bool presionado7 ;
public static bool presionado8 ;
public static bool presionado9 ;
public static bool presionado10 ;
public static bool presionado11 ;
public static bool presionado12 ;
}
Inside Form Tables:
if(variables.presionado == false)
{
button1.BackColor = Color.Gold;
variables.presionado = true;
}
else
{
button1.BackColor = Color.Green;
variables.presionado = false;
}