Beispiel #1
0
 private void Execute()
 {
     progressBar1.Invoke(new Action(progressBar1.Show));
     progressBar1.Invoke(new Action(progressBar1.Start));
     if (QE == null)
     {
         QE = new QuickExport();
         QE.ExecuteCompleted += new EventHandler(QE_ExecuteCompleted);
     }
     QE.Source      = textBoxEx1.Text;
     QE.Destination = "MIF," + textBoxEx2.Text;
     try
     {
         QE.Execute();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     finally
     {
         Invoke(new Action <bool>(enabled =>
         {
             button3.Enabled = enabled;
         }), true);
         Invoke(new Action <bool>(enabled =>
         {
             ControlBox = enabled;
         }), true);
         progressBar1.Invoke(new Action(progressBar1.Stop));
         progressBar1.Invoke(new Action(progressBar1.Hide));
     }
 }
Beispiel #2
0
        public override bool DoWork()
        {
            if (m_strMapInfoFile == "" || m_strMDBFile == "")
            {
                return(false);
            }
            string strType = "";

            if (m_pType == EnumMapInfoType.tab)
            {
                strType = "MAPINFO";
            }
            else
            {
                strType = "MIF";
            }
            On_Start(this, "转换开始....目标数据类型为【" + strType + "】");
            Geoprocessor geoprocessor = new Geoprocessor();
            QuickExport  conversion   = new QuickExport();

            //D:\1.mdb\ok\DZZHYFQ;D:\1.mdb\ok\DZJCSS MIF,D:\test,"RUNTIME_MACROS,,META_MACROS,,METAFILE,MIF,COORDSYS,,__FME_DATASET_IS_SOURCE__,false"

            conversion.Input  = m_strMDBFile;
            conversion.Output = strType + "," + m_strMapInfoFile + "," + "\"RUNTIME_MACROS,,META_MACROS,,METAFILE," + strType + ",COORDSYS,,__FME_DATASET_IS_SOURCE__,false\"";
            bool bResult = RunTool(geoprocessor, conversion, null);

            if (bResult)
            {
                On_ProgressFinish(this, "转换成功!");
            }
            return(bResult);
        }
Beispiel #3
0
        public override bool DoWork()
        {
            //throw new NotImplementedException if (m_strMapInfoFile == "" || m_strMDBFile == "")
            On_Start(this, "数据转换开始....");
            Geoprocessor geoprocessor = new Geoprocessor();
            QuickExport conversion = new QuickExport();

            //设置输入参数
            conversion.Output = "E00, " + m_strE00Path + ",\"RUNTIME_MACROS,\"\"_PRECISION,"
            +"double,_COMPRESSION,NONE,_LINEAR_TOPO,"
            +"no\"\",META_MACROS,\"\"Dest_PRECISION,double,Dest_COMPRESSION,"
            +"NONE,Dest_LINEAR_TOPO,no\"\",METAFILE,E00,COORDSYS,,"
            +"__FME_DATASET_IS_SOURCE__,false\"";

            //设置输入路径
            conversion.Input =m_strMDBFiles;
            bool bResult = RunTool(geoprocessor, conversion, null);
            if (bResult)
            {
                On_ProgressFinish(this,"转换成功!");
            }
            return bResult;
        }
Beispiel #4
0
        public override bool DoWork()
        {
            //throw new NotImplementedException if (m_strMapInfoFile == "" || m_strMDBFile == "")
            On_Start(this, "数据转换开始....");
            Geoprocessor geoprocessor = new Geoprocessor();
            QuickExport  conversion   = new QuickExport();

            //设置输入参数
            conversion.Output = "E00, " + m_strE00Path + ",\"RUNTIME_MACROS,\"\"_PRECISION,"
                                + "double,_COMPRESSION,NONE,_LINEAR_TOPO,"
                                + "no\"\",META_MACROS,\"\"Dest_PRECISION,double,Dest_COMPRESSION,"
                                + "NONE,Dest_LINEAR_TOPO,no\"\",METAFILE,E00,COORDSYS,,"
                                + "__FME_DATASET_IS_SOURCE__,false\"";

            //设置输入路径
            conversion.Input = m_strMDBFiles;
            bool bResult = RunTool(geoprocessor, conversion, null);

            if (bResult)
            {
                On_ProgressFinish(this, "转换成功!");
            }
            return(bResult);
        }
Beispiel #5
0
        public override bool DoWork()
        {
            if (m_strMapInfoFile == "" || m_strMDBFile == "")
                return false;
            string strType = "";
            if (m_pType == EnumMapInfoType.tab)
            {
                strType = "MAPINFO";
            }
            else
            {
                strType = "MIF";
            }
            On_Start(this, "转换开始....目标数据类型为【"+strType+"】");
            Geoprocessor geoprocessor = new Geoprocessor();
            QuickExport conversion = new QuickExport();
            //D:\1.mdb\ok\DZZHYFQ;D:\1.mdb\ok\DZJCSS MIF,D:\test,"RUNTIME_MACROS,,META_MACROS,,METAFILE,MIF,COORDSYS,,__FME_DATASET_IS_SOURCE__,false"

            conversion.Input = m_strMDBFile;
            conversion.Output = strType + "," + m_strMapInfoFile + "," + "\"RUNTIME_MACROS,,META_MACROS,,METAFILE,"+strType+",COORDSYS,,__FME_DATASET_IS_SOURCE__,false\"";
            bool bResult = RunTool(geoprocessor, conversion, null);
            if (bResult)
            {
                On_ProgressFinish(this,"转换成功!");
            }
            return bResult;
        }