From 45bad40829488da751c8262c46f3383aaf7d08eb Mon Sep 17 00:00:00 2001 From: RepoErik <84872500+BiologyTools@users.noreply.github.com> Date: Thu, 1 Aug 2024 18:24:34 +0300 Subject: [PATCH] 4.2.0 --- BioCore/Source/Fiji.cs | 6 ++---- BioCore/Source/Recorder.cs | 16 ++++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/BioCore/Source/Fiji.cs b/BioCore/Source/Fiji.cs index 2c54b13..5316a1f 100644 --- a/BioCore/Source/Fiji.cs +++ b/BioCore/Source/Fiji.cs @@ -123,14 +123,10 @@ public static string ImageJMacroPath private static Random rng = new Random(); public static void RunImageJ(string file, string param) { - Console.WriteLine("RunImageJ(" + file + "," + param); ImagePlus ip = ImageJ.GetImagePlus(ImageView.SelectedImage); - Console.WriteLine("ImageJ.GetImagePlus(" + ImageView.SelectedImage.ToString() + ")"); WindowManager.setTempCurrentImage(ip); - Console.WriteLine("WindowManager.setTempCurrentImage(" +ip.ToString() + ")"); IJ.runMacroFile(file, param); ImageView.SelectedImage = ImageJ.GetBioImage(ip, ImageView.SelectedImage.Volume, ImageView.SelectedImage.PhysicalSizeX, ImageView.SelectedImage.PhysicalSizeY, ImageView.SelectedImage.PhysicalSizeZ); - } /// It runs a macro in ImageJ /// @@ -223,6 +219,7 @@ public static void RunString(string con, string param, bool headless) IJ.runMacro(con, param); ImageView.SelectedImage = ImageJ.GetBioImage(ip, ImageView.SelectedImage.Volume,ImageView.SelectedImage.PhysicalSizeX, ImageView.SelectedImage.PhysicalSizeY, ImageView.SelectedImage.PhysicalSizeZ); } + BioLib.Recorder.Record(BioLib.Recorder.GetCurrentMethodInfo(), false, con, param, headless); } /// It runs a macro on the current image, saves the result as a new image, and then opens the /// new image in a new tab @@ -323,6 +320,7 @@ public static void RunOnImage(string con, int index, bool headless, bool onTab, Console.WriteLine(e.Message.ToString()); } } + BioLib.Recorder.Record(BioLib.Recorder.GetCurrentMethodInfo(), false, con, index, headless, onTab, bioformats, resultInNewTab); } public static void RunOnImage(string s) { diff --git a/BioCore/Source/Recorder.cs b/BioCore/Source/Recorder.cs index db2d117..c690f4e 100644 --- a/BioCore/Source/Recorder.cs +++ b/BioCore/Source/Recorder.cs @@ -24,12 +24,12 @@ private void clearBut_Click(object sender, EventArgs e) log = ""; } -/// It takes the text in the textbox, splits it into an array of strings, then creates a new array of -/// strings that is one element shorter than the original array, and then copies the original array into -/// the new array, and then sets the textbox's text to the new array -/// -/// @param sender The object that raised the event. -/// @param EventArgs The EventArgs class is the base class for classes containing event data. + /// It takes the text in the textbox, splits it into an array of strings, then creates a new array of + /// strings that is one element shorter than the original array, and then copies the original array into + /// the new array, and then sets the textbox's text to the new array + /// + /// @param sender The object that raised the event. + /// @param EventArgs The EventArgs class is the base class for classes containing event data. private void delLineBut_Click(object sender, EventArgs e) { string[] sts = textBox.Lines; @@ -76,6 +76,10 @@ private void topMostBox_CheckedChanged(object sender, EventArgs e) /// @param EventArgs The EventArgs class is the base class for classes containing event data. private void Recorder_Activated(object sender, EventArgs e) { + foreach (string s in BioLib.Recorder.Lines) + { + log += s + Environment.NewLine; + } textBox.Text = log; }