Example #1
0
        /// <summary>
        /// BBCodeArea polygon(s) have been ported to this control
        /// </summary>
        private void EventPublisher_PolygonActivated(object sender, PolygonEventArgs e)
        {
            Polygon[] polygons = e.Polygons.ToArray();
            if (polygons.Length == 1)
            {
                // Polygon management grid: jump to the selected polygon row
                foreach (GridEXRow row in GridExPolygon.GetRows())
                {
                    if (row.RowType == RowType.Record)
                    {
                        var polygon = (Polygon)row.DataRow;
                        if (polygon.Equals(polygons[0]))
                        {
                            GridExPolygon.MoveTo(row);
                            break;
                        }
                    }
                }
            }

            GridExVillage.DataSource = PolygonDataSet.CreateDataSet(e.Polygons);
            GridExVillage.MoveFirst();
        }
Example #2
0
 /// <summary>
 ///     Raises the <see cref="PolygonVertexChanged" /> event.
 /// </summary>
 /// <param name="e">The <see cref="PolygonEventArgs" /> instance containing the event data.</param>
 protected virtual void OnPolygonVertexChanged(PolygonEventArgs e)
 {
     PolygonVertexChanged?.Invoke(this, e);
 }
Example #3
0
 /// <summary>
 ///     Raises the <see cref="PolygonAttributesChanged" /> event.
 /// </summary>
 /// <param name="e">The <see cref="PolygonEventArgs" /> instance containing the event data.</param>
 protected virtual void OnPolygonAttributesChanged(PolygonEventArgs e)
 {
     PolygonAttributesChanged?.Invoke(this, e);
 }
Example #4
0
 /// <summary>
 ///     Raises the <see cref="PolygonAdded" /> event.
 /// </summary>
 /// <param name="e">The <see cref="PolygonEventArgs" /> instance containing the event data.</param>
 protected virtual void OnPolygonAdded(PolygonEventArgs e)
 {
     PolygonAdded?.Invoke(this, e);
 }
Example #5
0
 private void EventPublisher_PolygonActivated(object sender, PolygonEventArgs e)
 {
     Tabs.SelectedTab = TabsPolygon;
 }