public ElevationDialog(IEditorService edSvc, IVectorScaleRange2 vsr2, string featureSourceId, ClassDefinition clsDef, string provider) { InitializeComponent(); _edSvc = edSvc; _vsr2 = vsr2; _clsDef = clsDef; _provider = provider; _featureSourceId = featureSourceId; cmbUnits.DataSource = Enum.GetValues(typeof(LengthUnitType)); cmbZOffsetType.DataSource = Enum.GetValues(typeof(ElevationTypeType)); _elSettings = vsr2.ElevationSettings; grpSettings.Enabled = (_elSettings != null); chkEnabled.Checked = (_elSettings != null); if (_elSettings == null) _elSettings = vsr2.Create("0", "0", ElevationTypeType.RelativeToGround, LengthUnitType.Meters); //NOXLATE try { _init = true; txtZExtrusion.Text = _elSettings.ZExtrusion; txtZOffset.Text = _elSettings.ZOffset; cmbUnits.SelectedItem = _elSettings.Unit; cmbZOffsetType.SelectedItem = _elSettings.ZOffsetType; } finally { _init = false; } }
public ElevationDialog(IEditorService edSvc, IVectorScaleRange2 vsr2, string featureSourceId, ClassDefinition clsDef, string provider) { InitializeComponent(); _edSvc = edSvc; _vsr2 = vsr2; _clsDef = clsDef; _provider = provider; _featureSourceId = featureSourceId; cmbUnits.DataSource = Enum.GetValues(typeof(LengthUnitType)); cmbZOffsetType.DataSource = Enum.GetValues(typeof(ElevationTypeType)); _elSettings = vsr2.ElevationSettings; grpSettings.Enabled = (_elSettings != null); chkEnabled.Checked = (_elSettings != null); if (_elSettings == null) { _elSettings = vsr2.Create("0", "0", ElevationTypeType.RelativeToGround, LengthUnitType.Meters); //NOXLATE } try { _init = true; txtZExtrusion.Text = _elSettings.ZExtrusion; txtZOffset.Text = _elSettings.ZOffset; cmbUnits.SelectedItem = _elSettings.Unit; cmbZOffsetType.SelectedItem = _elSettings.ZOffsetType; } finally { _init = false; } }