Esempio n. 1
0
        public void SetInfo(string imgPath, string outputPath, OutputFileTypes outputFileType, LatLng center,
                            ZoomInfo zoomInfo, OutputLayerTypes outputLayerType, string mapTypeName)
        {
            this.imgPath         = imgPath;
            this.outputPath      = outputPath;
            this.outputFileType  = outputFileType;
            this.center          = center;
            this.zoomInfo        = zoomInfo;
            this.outputLayerType = outputLayerType;
            this.mapTypeName     = mapTypeName;

            tbxImagePath.Text  = imgPath;
            tbxOutputPath.Text = outputPath;
            if (outputFileType == OutputFileTypes.TileAndCode)
            {
                lblOutputType.Text = "图块和代码";
            }
            else if (outputFileType == OutputFileTypes.TileOnly)
            {
                lblOutputType.Text = "仅图块";
            }
            lblCenter.Text           = center.Lat + ", " + center.Lng;
            lblLevelInfoConfirm.Text = "最小级别:" + zoomInfo.MinZoom.ToString()
                                       + ",最大级别:" + zoomInfo.MaxZoom.ToString()
                                       + ",原图级别:" + zoomInfo.ImageZoom.ToString();
            if (outputLayerType == OutputLayerTypes.MapType)
            {
                lblLayerConfigConfirm.Text = "独立地图类型";
            }
            else if (outputLayerType == OutputLayerTypes.NormalLayer)
            {
                lblLayerConfigConfirm.Text = "叠加图层";
            }
        }
Esempio n. 2
0
        /*
         * 信息设置
         */
        public void SetInfo(string imgPath, string outputPath, OutputFileTypes outputFileType, LatLng center,
                            ZoomInfo zoomInfo, OutputLayerTypes outputLayerType, string mapTypeName)
        {
            this.imgPath         = imgPath;
            this.outputPath      = outputPath;
            this.outputFileType  = outputFileType;
            this.center          = center;
            this.zoomInfo        = zoomInfo;
            this.outputLayerType = outputLayerType;
            this.mapTypeName     = mapTypeName;

            tileImage = new Bitmap(imgPath);
            imgWidth  = tileImage.Width;
            imgHeight = tileImage.Height;
        }
Esempio n. 3
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            switch (currentStep)
            {
            case 0:
                // 检查图片路径是否有效
                if (stepPanel1.GetImageFilePath() == "")
                {
                    showErrorInfo("请选择图片");
                    return;
                }
                imageFilePath = stepPanel1.GetImageFilePath();
                break;

            case 1:
                if (stepPanel2.getOutputPath() == "")
                {
                    showErrorInfo("请设置输出路径");
                    return;
                }
                outputPath = stepPanel2.getOutputPath();
                break;

            case 2:
                outputFileType = stepPanel3.getOutputFileType();
                break;

            case 3:
                center = stepPanel4.getCenter();
                break;

            case 4:
                stepPanel5.SetImagePath(imageFilePath);
                if (stepPanel5.CheckZoomValidation() == false)
                {
                    showErrorInfo("级别设置不正确,请检查");
                    return;
                }
                zoomInfo = stepPanel5.GetZoomInfo();
                break;

            case 5:
                outputLayerType = stepPanel6.GetOutputLayerType();
                mapTypeName     = stepPanel6.GetMapTypeName();
                if (outputLayerType == OutputLayerTypes.MapType && mapTypeName == "")
                {
                    showErrorInfo("请填写地图类型名称");
                    return;
                }
                break;

            case 6:
                stepPanel7.StartCut();
                break;
            }
            if (currentStep < 6)
            {
                currentStep++;
            }
            updateUI();
        }