Beispiel #1
0
        private void addBottomLine()
        {
            CSpatialSubs       oSpatialSubs = new CSpatialSubs();
            ISimpleLineSymbol  pLineSym     = null;
            IMxDocument        pMxDoc       = (IMxDocument)ArcMap.Document;
            IGraphicsContainer pGC          = (IGraphicsContainer)pMxDoc.PageLayout;

            try
            {
                pLineSym = (ISimpleLineSymbol)oSpatialSubs.createSimpleLineSymbol(oSpatialSubs.createRGB(0, 0, 0), (1 * base.XFactor), esriSimpleLineStyle.esriSLSSolid);
                oSpatialSubs.addLineToGraphicsContainer(pGC,
                                                        pLineSym,
                                                        SPrintConst.MapFrame_XMax * base.XFactor,
                                                        SPrintConst.Neatline_XMax * base.XFactor,
                                                        (SPrintConst.Name_YMin - .02) * base.YFactor,
                                                        (SPrintConst.Name_YMin - .02) * base.YFactor);
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("Errors: CPortraitLayout:addCenterLine()\r\n" + ex.Message, "Errors occurred", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
            }
            finally
            {
                oSpatialSubs.Dispose();
                pLineSym = null;
                pMxDoc   = null;
                pGC      = null;
            }
        }
Beispiel #2
0
        public override void addSeperatorLine()
        {
            CSpatialSubs       oSpatialSubs = new CSpatialSubs();
            IMxDocument        pMxDoc       = (IMxDocument)ArcMap.Document;
            IGraphicsContainer pGC          = (IGraphicsContainer)pMxDoc.PageLayout;

            try
            {
                ISimpleLineSymbol pLineSymbol = (ISimpleLineSymbol)oSpatialSubs.createSimpleLineSymbol(oSpatialSubs.createRGB(0, 0, 0), (this.XFactor * 2), esriSimpleLineStyle.esriSLSSolid);
                //oSpatialSubs.addLineToGraphicsContainer(pGC, pLineSymbol, (SPrintConst.MapFrame_XMax * this.XFactor), (SPrintConst.MapFrame_XMax * this.XFactor), (SPrintConst.MapFrame_YMin * this.YFactor), (SPrintConst.MapFrame_YMax * this.YFactor));
                oSpatialSubs.addLineToGraphicsContainer(pGC, pLineSymbol, (SPrintConst.MapFrame_XMax * this.XFactor), (SPrintConst.MapFrame_XMax * this.XFactor), (SPrintConst.Neatline_YMin * this.YFactor), (SPrintConst.Neatline_YMax * this.YFactor));

                addCenterLine();
                addBottomLine();

                pLineSymbol = null;
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("Errors: CLandscapeLayout:addSeperatorLine()\r\n" + ex.Message, "Errors occurred", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
            }
            finally
            {
                oSpatialSubs.Dispose();
                pMxDoc = null;
                pGC    = null;
            }
        }
Beispiel #3
0
        /// <summary>
        ///     Adds a black rectangle in the lower right corner area just below the mapframe. The white
        ///     text CITY OF MEDFORD is added on top of this rectangle.
        /// </summary>
        public override void addMedfordRectangle()
        {
            CSpatialSubs       oSpatialSubs = new CSpatialSubs();
            IMxDocument        pMxDoc       = (IMxDocument)ArcMap.Document;
            IGraphicsContainer pGC          = (IGraphicsContainer)pMxDoc.PageLayout;

            try
            {
                ILineSymbol       pLineSym    = oSpatialSubs.createSimpleLineSymbol(oSpatialSubs.createRGB(0, 0, 0), base.XFactor, esriSimpleLineStyle.esriSLSSolid);
                ISimpleFillSymbol pFillSymbol = (ISimpleFillSymbol)oSpatialSubs.createSimpleFillSymbol(oSpatialSubs.createRGB(0, 0, 0), pLineSym, esriSimpleFillStyle.esriSFSSolid);

                oSpatialSubs.addRectangleToGraphicsContainer(pGC,
                                                             (IFillSymbol)pFillSymbol,
                                                             (base.XFactor * SPrintConst.MapFrame_XMax),
                                                             (base.XFactor * SPrintConst.Neatline_XMax),
                                                             (base.YFactor * (SPrintConst.Neatline_YMax - SPrintConst.Logo_Offset)),
                                                             (base.YFactor * SPrintConst.Neatline_YMax));
                pLineSym    = null;
                pFillSymbol = null;
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("Errors: CLandscapeLayout:addMedfordRectangle()\r\n" + ex.Message, "Errors occurred", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
            }
            finally
            {
                oSpatialSubs.Dispose();
                pMxDoc = null;
                pGC    = null;
            }
        }
Beispiel #4
0
        public override void addSeperatorLine()
        {
            CSpatialSubs       oSpatialSubs = new CSpatialSubs();
            IMxDocument        pMxDoc       = (IMxDocument)base.App.Document;
            IGraphicsContainer pGC          = (IGraphicsContainer)pMxDoc.PageLayout;
            ISimpleLineSymbol  pLineSym     = null;

            try
            {
                pLineSym = (ISimpleLineSymbol)oSpatialSubs.createSimpleLineSymbol(oSpatialSubs.createRGB(0, 0, 0), (2 * base.XFactor), esriSimpleLineStyle.esriSLSSolid);
                oSpatialSubs.addLineToGraphicsContainer(pGC, pLineSym,
                                                        (SPrintConst.Neatline_XMin * base.XFactor),
                                                        (SPrintConst.Neatline_XMax * base.XFactor),
                                                        (SPrintConst.Neatline_YMin * base.YFactor),
                                                        (SPrintConst.Neatline_YMin * base.YFactor));
                addRightOfTitleLine();
                addLeftLine();
                addCenterLine();
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("Errors: CPortraitLayout:addSeperatorLine()\r\n" + ex.Message, "Errors occurred", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
            }
            finally
            {
                oSpatialSubs.Dispose();
                pMxDoc   = null;
                pGC      = null;
                pLineSym = null;
            }
        }