Example #1
0
 /// <summary>
 /// 转换
 /// </summary>
 /// <param name="sourceFile"></param>
 /// <param name="dest"></param>
 /// <returns></returns>
 public override List <string> DoDecompress(string sourceFile, string dest)
 {
     try
     {
         return(de.Decompress(sourceFile, DestDirectory, IsDeleteSource, IsOverwrite));
     }
     catch (Exception ex) { log.Error(ex.Message); }
     return(new List <string>());
 }
Example #2
0
        private void DecomposeRinex(string sourseDir, string rinexDir, bool delSourse)
        {
            if (!Directory.Exists(rinexDir))
            {
                Directory.CreateDirectory(rinexDir);
            }

            string[] files = Directory.GetFiles(sourseDir, "*.**d");
            if (this.ProgressBar != null)
            {
                this.ProgressBar.InitProcess(files.Length);
            }

            Geo.Utils.DecompressRinexer de = new Geo.Utils.DecompressRinexer(Setting.PathOfCrx2rnx);
            foreach (var item in files)
            {
                if (IsCancelProcessing)
                {
                    break;
                }

                try
                {
                    de.Decompress(item, rinexDir);
                    if (delSourse)
                    {
                        File.Delete(item);
                    }

                    ShowInfo("总进度 " + (allCountProcess) + "/" + allCount + " 解压Rinex " + item);

                    PerformStep();
                }
                catch (Exception ex)
                {
                    string msg = "解压Rinex出错了:" + ex.Message + "\r\n";
                    ShowInfo(msg);
                    if (!ignoreError)
                    {
                        if (FormUtil.ShowYesNoMessageBox(msg + "是否继续?")
                            == System.Windows.Forms.DialogResult.No)
                        {
                            break;
                        }
                    }
                }
            }
        }