private void btnOk_Click(object sender, EventArgs e) { m_northArrow.Size = Convert.ToDouble(textBoxSize.Text); m_northArrow.Color = PageLayoutInsert.ColorToIColor(buttonColor.BackColor); m_northArrow.CalibrationAngle = Convert.ToDouble(textBoxAngle.Text); m_northArrow.Refresh(); }
public override IElement GetElement(IPageLayout ipageLayout_0) { this.CreateElement(ipageLayout_0); if (base.m_pElement == null) { return(null); } IPoint position = this.GetPosition(ipageLayout_0); IEnvelope bounds = new EnvelopeClass(); base.m_pElement.QueryBounds((ipageLayout_0 as IActiveView).ScreenDisplay, bounds); if ((base.m_pElement as IMapSurroundFrame).MapSurround is INorthArrow) { INorthArrow mapSurround = (base.m_pElement as IMapSurroundFrame).MapSurround as INorthArrow; if (mapSurround.Map != (ipageLayout_0 as IActiveView).FocusMap) { mapSurround.Map = (ipageLayout_0 as IActiveView).FocusMap; mapSurround.Refresh(); } } if (!bounds.IsEmpty) { IEnvelope envelope2 = new EnvelopeClass(); envelope2.PutCoords(position.X, position.Y, position.X + bounds.Width, position.Y + bounds.Height); base.m_pElement.Geometry = envelope2; } return(base.m_pElement); }