private void buttonSetRegime_Click(object sender, EventArgs e) { if (checkBoxMGhostMode.Checked) { simconnect.SetObserverRegime(textBoxMObserverName.Text, (int)OBSERVER_REGIME_TYPE.OBSERVER_GHOST); } else if (checkBoxMPassWater.Checked) { simconnect.SetObserverRegime(textBoxMObserverName.Text, (int)OBSERVER_REGIME_TYPE.OBSERVER_TELLURIAN); } else { simconnect.SetObserverRegime(textBoxMObserverName.Text, (int)OBSERVER_REGIME_TYPE.OBSERVER_TERRESTRIAL); } }