Пример #1
0
 private void axPageLayoutControl1_OnMouseUp(object sender, IPageLayoutControlEvents_OnMouseUpEvent e)
 {
     if (_enumMapSurType != EnumMapSurroundType.None)
     {
         if (pNewEnvelopeFeedback != null)
         {
             IActiveView pActiveView = null;
             pActiveView = axPageLayoutControl1.PageLayout as IActiveView;
             IEnvelope pEnvelope = pNewEnvelopeFeedback.Stop();
             AddMapSurround(pActiveView, _enumMapSurType, pEnvelope);
             pNewEnvelopeFeedback = null;
             _enumMapSurType      = EnumMapSurroundType.None;
         }
     }
 }
Пример #2
0
        private void AddMapSurround(IActiveView pAV, EnumMapSurroundType _enumMapSurroundType, IEnvelope pEnvelope)
        {
            try
            {
                switch (_enumMapSurroundType)
                {
                case EnumMapSurroundType.NorthArrow:
                    addNorthArrow(axPageLayoutControl1.PageLayout, pEnvelope, pAV);
                    break;

                case EnumMapSurroundType.ScaleBar:
                    makeScaleBar(pAV, axPageLayoutControl1.PageLayout, pEnvelope);
                    break;

                case EnumMapSurroundType.Legend:
                    MakeLegend(pAV, axPageLayoutControl1.PageLayout, pEnvelope);
                    break;
                }
            }
            catch (Exception ex)
            {
            }
        }
Пример #3
0
 private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     _enumMapSurType = EnumMapSurroundType.NorthArrow;
 }
Пример #4
0
 private void addScaleBar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     _enumMapSurType = EnumMapSurroundType.ScaleBar;
 }
Пример #5
0
 private void addLegend_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     _enumMapSurType = EnumMapSurroundType.Legend;
 }