void Properties(object sender, EventArgs e) { if (_PropertiesScreen == null) { _PropertiesScreen = new PropertiesScreen(); _PropertiesScreen.InitializeUpdateObject(_MonitorService); _PropertiesScreen.FormClosed += _PropertiesScreen_FormClosed; _PropertiesScreen?.Show(); } else { _PropertiesScreen.Show(); } }
private void _PropertiesScreen_FormClosed(object sender, FormClosedEventArgs e) { _PropertiesScreen.FormClosed -= _PropertiesScreen_FormClosed; _PropertiesScreen = null; }