浏览代码

写入日志

jeremy 10 月之前
父节点
当前提交
62931ad153
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 1 1
      URMAnalysisFramework/Program.cs
  2. 7 1
      URMDemo/MainWindow.xaml.cs

+ 1 - 1
URMAnalysisFramework/Program.cs

@@ -56,7 +56,7 @@ namespace URMAnalysisFramework
         private static void WriteLog(string outputFolder, string message)
         {
             var readmeFile = Path.Combine(outputFolder, "readme.txt");
-            File.AppendAllLines(readmeFile, new string[] { message });
+            File.AppendAllLines(readmeFile, new string[] { $"[{DateTime.Now.ToString("HH:mm:ss")}] {message}" });
         }
 
         private static void AppendEnvironmentPath()

+ 7 - 1
URMDemo/MainWindow.xaml.cs

@@ -64,7 +64,7 @@ namespace URMDemo
                 {
                     Directory.CreateDirectory(outputFolder);
                 }
-                bool success = _urmAnalysisProcess.URMAnalysis("\"UrmDatapath\":\"E:\\URM\\2.dat\",\"VecLens\":\"474\",\"Mlas\":\"128\",\"VectorStartForMid\":\"9\",\"FramesGot\":\"1200\",\"CenterFrequencyMHz\":\"3.8\",\"Prf\":\"10313\",\"Angles\":\"29\",\"SupersonicSpeed\":\"1540\",\"PulseNum\":\"3\",\"FrequencyMin\":\"5\",\"FMUint\":\"MHz\",\"FrameRateDisplay\":\"101.9\",\"FDUnit\":\"Hz\",\"ScaleOfPixel_x\":\"0.212260852677748\",\"ScaleOfPixel_y\":\"0.493506493506494\",\"ULMCount\":\"400\",\"PacketsNum\":\"200\",\"Res\":\"2.5\",\"MaxLinkingDistance\":\"2\",\"MinLength\":\"5\",\"MaxGapClosing\":\"2\",\"LocMethod\":\"radial\",\"ButterCuttofFreqLow\":\"30\",\"NLocalMax\":\"3\",\"SVDCutoffLow\":\"30\",\"Fwhm\":\"3\",\"MOCOYN\":\"0\",\"MOCOLevel\":\"4\",\"MOCOThresh1\":\"0.05\",\"MOCOThresh2\":\"0.05\",\"MOCOThresh3\":\"5\",\"LocaFixmethod\":\"fixgray\",\"LocFixThresh\":\"25\",\"RefNum\":\"1\",\"MotionCorrThresh\":\"0.5\",\"Pos\":\" 1,1,128,474 \",\"FilterDeci\":\"1\",\"PSFNum\":\"10\",\"PSFCorr\":\"0.5\",\"Depth\":\"0\",\"X0\":\"0\",\"Z0\":\"0\",\"ProbeType\":\"1\",\"Decifactorx\":\"1\",\"Decifactory\":\"1\",\"SizeScan\":\"474\",\"MotionAngleThresh\":\"2\",\"TrackInterpFactor\":\"0.8\"", outputFolder);
+                bool success = _urmAnalysisProcess.URMAnalysis("\"UrmDatapath\":\"E:\\URM\\2.dat\",\"VecLens\":\"474\",\"Mlas\":\"128\",\"VectorStartForMid\":\"9\",\"FramesGot\":\"1200\",\"CenterFrequencyMHz\":\"3.8\",\"Prf\":\"10313\",\"Angles\":\"29\",\"SupersonicSpeed\":\"1540\",\"PulseNum\":\"3\",\"FrequencyMin\":\"5\",\"FMUint\":\"MHz\",\"FrameRateDisplay\":\"101.9\",\"FDUnit\":\"Hz\",\"ScaleOfPixel_x\":\"0.212260852677748\",\"ScaleOfPixel_y\":\"0.493506493506494\",\"ULMCount\":\"400\",\"PacketsNum\":\"200\",\"Res\":\"2.5\",\"MaxLinkingDistance\":\"2\",\"MinLength\":\"5\",\"MaxGapClosing\":\"2\",\"LocMethod\":\"radial\",\"ButterCuttofFreqLow\":\"30\",\"NLocalMax\":\"3\",\"SVDCutoffLow\":\"30\",\"Fwhm\":\"3\",\"MOCOYN\":\"0\",\"MOCOLevel\":\"4\",\"MOCOThresh1\":\"0.05\",\"MOCOThresh2\":\"0.05\",\"MOCOThresh3\":\"5\",\"LocaFixmethod\":\"fixgray\",\"LocFixThresh\":\"25\",\"RefNum\":\"1\",\"MotionCorrThresh\":\"0.5\",\"Pos\":\" 1,1,128,474 \",\"FilterDeci\":\"1\",\"PSFNum\":\"10\",\"PSFCorr\":\"0.5\",\"Depth\":\"0\",\"X0\":\"0\",\"Z0\":\"0\",\"ProbeType\":\"1\",\"Decifactorx\":\"1\",\"Decifactory\":\"1\",\"SizeScan\":\"474\",\"MotionAngleThresh\":\"2\",\"TrackInterpFactor\":\"0.8\"", outputFolder, WriteLog);
                 Console.WriteLine($"_urmAnalysisProcess.URMAnalysis: {success}");
 
                 Application.Current.Dispatcher.Invoke(() =>
@@ -117,6 +117,12 @@ namespace URMDemo
             Console.WriteLine($"URMMeasure Success");
         }
 
+        private static void WriteLog(string outputFolder, string message)
+        {
+            var readmeFile = Path.Combine(outputFolder, "readme.txt");
+            File.AppendAllLines(readmeFile, new string[] { $"[{DateTime.Now.ToString("HH:mm:ss")}] {message}" });
+        }
+
 
     }
 }