I wrote code about the settings page that uses static bool then I need to Check If the public static bool changed or not In the form that I needed to call (Form1 Is main form and Can be opened Once But Form2 Can open >1) then I wrote this code
private static bool Called = false;
public static bool HideButton
{
get { return Called; }
set
{
if (Called != value)
{
Called = value;
Update(); //function about updating buttons
}
}
}
private void checkBox5_CheckedChanged(object sender, EventArgs e) {
if (checkBox5.Checked)
{
Form1.HideButton = true;
}
else
{
Form1.HideButton = false;
}
}
Then it said that you can't run non-static inside static So I have an idea If I can check public static bool then call async void that is not static. any idea?
