IntersectOperation GetUpdateOp() { IntersectForm parent = (this.ParentForm as IntersectForm); Debug.Assert(parent != null); return(parent.GetUpdateOp()); }
internal void InitializeControl(IntersectForm parent, int lineNum) { SetWantSplit(false); // If we are updating a feature that was previously created, // load the original info. For line-line intersections, // we need to know which page this is, to determine whether we // should display info for the 1st or 2nd line. IntersectOperation op = parent.GetUpdateOp(); ShowUpdate(op, lineNum); /* * // Check the appropriate check boxes for the split stuff. * if (m_Line!=null) * { * if (m_WantSplit==1) * yesCheckBox.Checked = true; * else * noCheckBox.Checked = true; * * } * * // Make sure everything is drawn on top. * OnDraw(); */ }
internal void InitializeControl(IntersectForm parent) { // Ask the enclosing property sheet whether we are updating // an existing feature or not. // If we are updating a previously existing point, select // the previously defined entity type. IntersectOperation op = parent.GetUpdateOp(); if (op == null) { // Load the entity combo box with a list for point features. IEntity ent = pointTypeComboBox.Load(SpatialType.Point); // Load the ID combo (reserving the first available ID). IdHelper.LoadIdCombo(pointIdComboBox, ent, m_PointId); // If we are auto-numbering, disable the ID combo. EditingController controller = EditingController.Current; if (controller.IsAutoNumber) { pointIdComboBox.Enabled = false; } } else { pointTypeComboBox.SelectedValueChanged -= pointTypeComboBox_SelectedValueChanged; pointIdComboBox.SelectedValueChanged -= pointIdComboBox_SelectedValueChanged; pointTypeComboBox.Enabled = false; pointIdComboBox.Enabled = false; // Load the entity combo box with a list for point features and disable it. ILayer layer = EditingController.Current.ActiveLayer; pointTypeComboBox.Load(SpatialType.Point, layer); // Scroll the entity combo to the previously defined // entity type for the intersection point. PointFeature feat = op.IntersectionPoint; IEntity curEnt = feat.EntityType; if (curEnt != null) { pointTypeComboBox.SelectEntity(curEnt); } // Display the point key (if any) pointIdComboBox.DropDownStyle = ComboBoxStyle.DropDown; pointIdComboBox.Text = feat.FormattedKey; // Intersects involving line features... m_CloseTo = op.ClosePoint; ShowCloseTo(); } }
internal void InitializeControl(IntersectForm parent, int distNum) { // Initialize combo box with a list of all line entity types // for the currently active editing layer. lineTypeComboBox.Load(SpatialType.Line); // If we are updating a feature that was previously created, // load the original info. For distance-distance intersections, // we need to know which page this is, to determine whether we // should display info for the 1st or 2nd distance. IntersectOperation op = parent.GetUpdateOp(); if (op == null) { op = parent.GetRecall(); } ShowUpdate(op, distNum); // Go to the first text box fromPointTextBox.Focus(); }
internal void InitializeControl(IntersectForm parent, int dirNum) { // Default settings for direction radio buttons. TurnRadioOff(clockwiseRadioButton); TurnRadioOff(counterClockwiseRadioButton); // Default settings for offset radio buttons (not checked, not enabled) TurnRadioOff(leftRadioButton); TurnRadioOff(rightRadioButton); // Clear the button that lets the displayed offset value be set as default setDefaultOffsetButton.Enabled = false; // If we've got a default offset, display it (and set the // appropriate radio button) string value = GlobalUserSetting.Read(DEFAULT_OFFSET_KEY); if (value.Length > 0) { m_DefaultOffset = new Distance(value); if (m_DefaultOffset.IsDefined) m_DefaultOffset.SetFixed(); else m_DefaultOffset = null; } // Initialize combo box with a list of all line entity types // for the currently active theme. m_LineType = lineTypeComboBox.Load(SpatialType.Line); if (m_DefaultOffset!=null) { lineTypeComboBox.SelectEntity(null); lineTypeGroupBox.Enabled = false; m_LineType = null; } if (parent is IntersectDirectionAndLineForm) { // For direction-line intersections, the default is NOT // to add a line, so if we're not doing an update, make // sure the line type is undefined. if (parent.GetUpdateOp()==null) { lineTypeComboBox.SelectEntity(null); //lineTypeGroupBox.Enabled = false; m_LineType = null; } } // If we are updating a feature that was previously created (or recalling // a previous edit), load the original info. For direction-direction intersections, // we need to know which page this is, to determine whether we // should display info for the 1st or 2nd direction. IntersectOperation op = parent.GetUpdateOp(); if (op == null) op = parent.GetRecall(); if (!ShowUpdate(op, (byte)dirNum)) { // Display default offset (if there is one). Setting the text will cause // a call to OnChangeOffset, which will define m_Offset & m_IsRight if (m_DefaultOffset!=null) offsetTextBox.Text = m_DefaultOffset.Format(); } // Go to the first text box fromPointTextBox.Focus(); }
internal void InitializeControl(IntersectForm parent, int lineNum) { SetWantSplit(false); // If we are updating a feature that was previously created, // load the original info. For line-line intersections, // we need to know which page this is, to determine whether we // should display info for the 1st or 2nd line. IntersectOperation op = parent.GetUpdateOp(); ShowUpdate(op, lineNum); /* // Check the appropriate check boxes for the split stuff. if (m_Line!=null) { if (m_WantSplit==1) yesCheckBox.Checked = true; else noCheckBox.Checked = true; } // Make sure everything is drawn on top. OnDraw(); */ }
internal void InitializeControl(IntersectForm parent, int distNum) { // Initialize combo box with a list of all line entity types // for the currently active editing layer. lineTypeComboBox.Load(SpatialType.Line); // If we are updating a feature that was previously created, // load the original info. For distance-distance intersections, // we need to know which page this is, to determine whether we // should display info for the 1st or 2nd distance. IntersectOperation op = parent.GetUpdateOp(); if (op == null) op = parent.GetRecall(); ShowUpdate(op, distNum); // Go to the first text box fromPointTextBox.Focus(); }