Пример #1
0
        public void btnRun_Click(object sender, EventArgs e)
        {
            //get parameters
            CParameterInitialize ParameterInitialize = _DataRecords.ParameterInitialize;
            IEnvelope            pFLayerEnv          = ParameterInitialize.m_mapFeature
                                                       .get_Layer(ParameterInitialize.cboLayerLt[0].SelectedIndex).AreaOfInterest;
            CEnvelope pIpeEnv = new CEnvelope(
                Convert.ToDouble(this.txtIpeMinX.Text), Convert.ToDouble(this.txtIpeMinY.Text),
                Convert.ToDouble(this.txtIpeMaxX.Text), Convert.ToDouble(this.txtIpeMaxY.Text));

            string strBoundWidth = this.cboSize.SelectedItem.ToString();

            if (chkOverrideWidth.Checked == false)
            {
                strBoundWidth = "";
            }

            //save path
            CHelpFunc.SetSavePath(ParameterInitialize);

            var pFLayerLt = CHelpFunc.GetVisibleLayers(ParameterInitialize);

            CToIpe.SaveToIpe(pFLayerLt, pFLayerEnv, pIpeEnv,
                             this.chkGroup.Checked, strBoundWidth, ParameterInitialize);
        }
Пример #2
0
        private string strDataOfLayers(int intLayerNum, List <string> strLayerNameLt, IFeatureLayer pFLayer,
                                       IEnvelope pFLayerEnv, CEnvelope pIpeEnv, string strBoundWidth,
                                       string strSimplification, string strBufferStyle, double dblMiterLimit)
        {
            //for the first layer, we add all the patches
            string strDataAllLayers = CIpeDraw.SpecifyLayerByWritingText(strLayerNameLt[0], "removable", 320, 64);

            strDataAllLayers += CToIpe.GetScaleLegend(pFLayerEnv, pIpeEnv, CHelpFunc.GetUnits(_ParameterInitialize.m_mapControl.MapUnits));
            strDataAllLayers += CIpeDraw.writeIpeText(strLayerNameLt[0], 320, 128)
                                + "<group>\n" + CToIpe.GetDataOfFeatureLayer(pFLayer, pFLayerEnv, pIpeEnv, strBoundWidth, true) + "</group>\n";

            //for each of other layers, we only add the new patch
            for (int i = 1; i < strLayerNameLt.Count; i++)
            {
                strDataAllLayers += CIpeDraw.SpecifyLayerByWritingText(strLayerNameLt[i], "removable", 320, 64);

                //draw a rectangle to cover the patch number of the last layer
                strDataAllLayers += CIpeDraw.drawIpeBox(304, 112, 384, 160, "white");

                //add layer name and a text of patch numbers
                strDataAllLayers += CIpeDraw.writeIpeText(strLayerNameLt[i], 320, 128);

                strDataAllLayers += CToIpe.GetScaleLegend(pFLayerEnv, pIpeEnv,
                                                          CHelpFunc.GetUnits(_ParameterInitialize.m_mapControl.MapUnits));

                //add the Content of animations
                strDataAllLayers += "<group>\n";
                strDataAllLayers += CIpeDraw.drawIpeEdge(pIpeEnv.XMin, pIpeEnv.YMin, pIpeEnv.XMin, pIpeEnv.YMax, "white");
                foreach (var cpg in GetResultCpgEb(this.MergedCpgLt, Convert.ToDouble(strLayerNameLt[i]),
                                                   strSimplification, strBufferStyle, dblMiterLimit))
                {
                    strDataAllLayers += CIpeDraw.DrawCpg(cpg, pFLayerEnv, pIpeEnv,
                                                         new CUtility.CColor(0, 0, 0), new CUtility.CColor(230, 230, 230), strBoundWidth);
                }
                strDataAllLayers += "</group>\n";
                //strDataAllLayers += CToIpe.TranIpgToIpe(IpgLt[i - 1], pFillSymbolLt[i - 1], pFLayerEnv, pIpeEnv, strBoundWidth);
            }

            return(strDataAllLayers);
        }