BioImager  3.9.1
A .NET microscopy imaging library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include PriorĀ® & ZeissĀ® & all devices supported by Micromanager 2.0 and python-microscope.
Loading...
Searching...
No Matches
BioImager.Recordings Class Reference
Inheritance diagram for BioImager.Recordings:

Classes

class  Node
 

Public Member Functions

void InitElements ()
 
void UpdateElements ()
 
void OpenRecording (string file)
 
void OpenProperty (string file)
 

Static Public Member Functions

static void Perform (string act)
 
static object GetProperty (Automation.Action.ValueType automation, string pro)
 

Protected Member Functions

override void Dispose (bool disposing)
 Clean up any resources being used. More...
 

Detailed Description

Definition at line 10 of file Recordings.cs.

Constructor & Destructor Documentation

◆ Recordings()

BioImager.Recordings.Recordings ( )

Definition at line 12 of file Recordings.cs.

13 {
14 InitializeComponent();
15 if (!Directory.Exists("Recordings"))
16 Directory.CreateDirectory("Recordings");
17 foreach (string file in Directory.GetFiles("Recordings"))
18 {
19 if (file.EndsWith("reco"))
20 OpenRecording(file);
21 else if (file.EndsWith("pro"))
22 OpenProperty(file);
23 }
24 foreach (Automation.Action.ValueType val in (Automation.Action.ValueType[])Enum.GetValues(typeof(Automation.Action.ValueType)))
25 {
26 propBox.Items.Add(val);
27 }
28
29 }

Member Function Documentation

◆ Dispose()

override void BioImager.Recordings.Dispose ( bool  disposing)
protected

Clean up any resources being used.

Parameters
disposingtrue if managed resources should be disposed; otherwise, false.

Definition at line 14 of file Recordings.designer.cs.

15 {
16 if (disposing && (components != null))
17 {
18 components.Dispose();
19 }
20 base.Dispose(disposing);
21 }

◆ GetProperty()

static object BioImager.Recordings.GetProperty ( Automation.Action.ValueType  automation,
string  pro 
)
static

Definition at line 170 of file Recordings.cs.

171 {
172 Automation.Recording rec = null;
173 if (Automation.Properties.ContainsKey(pro))
174 rec = (Automation.Recording)Automation.Properties[pro];
175 else
176 return null;
177 Recorder.AddLine("Recordings.Get(" + rec.Name + ");");
178 return rec.Get();
179 }

◆ InitElements()

void BioImager.Recordings.InitElements ( )

Definition at line 30 of file Recordings.cs.

31 {
32 view.Nodes.Clear();
33 foreach (Automation.Recording rec in Automation.Recordings.Values)
34 {
35 TreeNode tr = new TreeNode();
36 Node n = new Node(rec, tr, Node.Type.recording);
37 tr.Tag = n;
38 tr.Text = rec.Name;
39 foreach (Automation.Action item in rec.List)
40 {
41 try
42 {
43 TreeNode tn = new TreeNode();
44 tn.Text = item.ToString();
45 Node no = new Node(item, tn, Node.Type.action);
46 no.recording = rec;
47 tn.Tag = no;
48 tr.Nodes.Add(tn);
49 }
50 catch (Exception)
51 {
52
53 }
54 }
55 view.Nodes.Add(tr);
56 }
57
58 propView.Nodes.Clear();
59 foreach (Automation.Recording rec in Automation.Properties.Values)
60 {
61 TreeNode tr = new TreeNode();
62 Node n = new Node(rec, tr, Node.Type.recording);
63 tr.Tag = n;
64 tr.Text = rec.Name;
65 foreach (Automation.Action item in rec.List)
66 {
67 try
68 {
69 TreeNode tn = new TreeNode();
70 tn.Text = item.ToString();
71
72 Node no = new Node(item, tn, Node.Type.action);
73 no.recording = rec;
74 tn.Tag = no;
75 tr.Nodes.Add(tn);
76 }
77 catch (Exception)
78 {
79
80 }
81 }
82 propView.Nodes.Add(tr);
83 }
84 }

◆ OpenProperty()

void BioImager.Recordings.OpenProperty ( string  file)

Definition at line 316 of file Recordings.cs.

317 {
318 Automation.Recording rec = OpenRec(file);
319 Automation.Properties.Add(rec.Name, rec);
320 InitElements();
321 }

◆ OpenRecording()

void BioImager.Recordings.OpenRecording ( string  file)

Definition at line 310 of file Recordings.cs.

311 {
312 Automation.Recording rec = OpenRec(file);
313 Automation.Recordings.Add(rec.Name, rec);
314 InitElements();
315 }

◆ Perform()

static void BioImager.Recordings.Perform ( string  act)
static

Definition at line 164 of file Recordings.cs.

165 {
166 Automation.Recording rec = (Automation.Recording)Automation.Recordings[act];
167 rec.Run();
168 Recorder.AddLine("Recordings.Perform(" + rec.Name + ");");
169 }

◆ UpdateElements()

void BioImager.Recordings.UpdateElements ( )

Definition at line 85 of file Recordings.cs.

86 {
87 foreach (TreeNode rec in view.Nodes)
88 {
89 rec.Nodes.Clear();
90 Node n = (Node)rec.Tag;
91 foreach (Automation.Action item in n.recording.List)
92 {
93 try
94 {
95 TreeNode tr = new TreeNode();
96 tr.Text = item.ToString();
97 Node no = new Node(item, rec, Node.Type.action);
98 no.recording = n.recording;
99 tr.Tag = no;
100 rec.Nodes.Add(tr);
101 }
102 catch (Exception)
103 {
104
105 }
106 }
107 }
108 foreach (TreeNode rec in propView.Nodes)
109 {
110 rec.Nodes.Clear();
111 Node n = (Node)rec.Tag;
112 foreach (Automation.Action item in n.recording.List)
113 {
114 try
115 {
116 TreeNode tr = new TreeNode();
117 tr.Text = item.ToString();
118 Node no = new Node(item, rec, Node.Type.action);
119 no.recording = n.recording;
120 tr.Tag = no;
121 rec.Nodes.Add(tr);
122 }
123 catch (Exception)
124 {
125
126 }
127 }
128 }
129 }

The documentation for this class was generated from the following files: