private void buttonNightMode_Click(object sender, EventArgs e) { if (nightMode_) { ClientCommonAPI.ExitNightMode(this); buttonNightMode.Text = "Night &Mode"; nightMode_ = false; } else { ClientCommonAPI.EnterNightMode(this); buttonNightMode.Text = "Day &Mode"; nightMode_ = true; } }