private void OnViewerSelected(object sender, EventArgs e) { ComboBoxItemWithEntity serviceItem = (ComboBoxItemWithEntity)viewer.comboBoxService.SelectedItem; if (serviceItem == null) { Util.ShowErrorDialog(UtnEmall.ServerManager.Properties.Resources.NoServiceSelected); return; } if (statistics != null && statistics.IsVisible) { Util.ShowErrorDialog(UtnEmall.ServerManager.Properties.Resources.ServiceStatisticsViewerOpened); return; } statistics = new ServiceStatistics((ServiceEntity)serviceItem.Entity, control.Session); statistics.ShowDialog(); }