private void _layerView_SelectedLayerChanged(object sender, LayersEventArgs e) { if (EnumerationHelper.IsEmpty(e.Layers)) { UnselectAllLayers(); } else { SetSelectedLayers(e.Layers); } }
private void InitializeDialog() { dpiComboBox.Items.Clear(); dpiComboBox.Items.Add(72); dpiComboBox.Items.Add(150); dpiComboBox.Items.Add(300); dpiComboBox.Items.Add(600); Graphics infoGfx = _diagramPresenter.Diagram.DisplayService.InfoGraphics; for (int i = dpiComboBox.Items.Count - 1; i >= 0; --i) { System.Diagnostics.Debug.Assert(dpiComboBox.Items[i] is int); if ((int)dpiComboBox.Items[i] < infoGfx.DpiY) { dpiComboBox.Items.Insert(i + 1, (int)infoGfx.DpiY); dpiComboBox.SelectedIndex = i + 1; break; } else if (i == 0) { dpiComboBox.Items.Insert(i, (int)infoGfx.DpiY); dpiComboBox.SelectedIndex = i; } } colorLabel.BackColor = Color.White; backColorCheckBox.Checked = false; marginUpDown.Value = 0; emfPlusRadioButton.Checked = true; toFileRadioButton.Checked = true; if (_diagramPresenter.SelectedShapes.Count > 0) { exportSelectedRadioButton.Enabled = exportSelectedRadioButton.Checked = true; } else { exportSelectedRadioButton.Enabled = false; exportAllRadioButton.Checked = true; } visibleLayersOnlyCheckBox.Checked = (!EnumerationHelper.IsEmpty(_diagramPresenter.HiddenLayerIds)); EnableOkButton(); }