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.Automation.Recording Class Reference

Public Member Functions

 Recording (string fil, List< Action > l)
 
void Run ()
 
object Get ()
 
Bitmap GetImage ()
 
Rectangle GetBounds ()
 
void Set (string val)
 
override string ToString ()
 

Properties

string Name [get, set]
 
string File [get, set]
 
List< ActionList [get, set]
 

Detailed Description

Definition at line 284 of file Automation.cs.

Constructor & Destructor Documentation

◆ Recording() [1/2]

BioImager.Automation.Recording.Recording ( )

Definition at line 304 of file Automation.cs.

305 {
306 }

◆ Recording() [2/2]

BioImager.Automation.Recording.Recording ( string  fil,
List< Action l 
)

Definition at line 307 of file Automation.cs.

308 {
309 list = l;
310 file = fil;
311 Name = System.IO.Path.GetFileNameWithoutExtension(fil);
312 }

Member Function Documentation

◆ Get()

object BioImager.Automation.Recording.Get ( )

Definition at line 320 of file Automation.cs.

321 {
322 if(list.Count > 1)
323 for (int i = 0; i < list.Count; i++)
324 {
325 Action ac = list[i];
326 if (i == list.Count - 1)
327 continue;
328 ac.Perform();
329 }
330 Action la = list.Last();
331 AutomationElement ae = AutomationHelpers.GetElementByProcess(la.ProcessName, la.Title, la.AutomationID, la.Name, la.ClassName, la.Index);
332 if (la.Value == Action.ValueType.Name)
333 return ae.Name;
334 else if (la.Value == Action.ValueType.SelectionPattern)
335 return AutomationHelpers.GetSelection(ae);
336 else if (la.Value == Action.ValueType.TextPattern)
337 return AutomationHelpers.GetText(ae);
338 else if (la.Value == Action.ValueType.ValuePattern)
339 return AutomationHelpers.GetValue(ae);
340 else if (la.Value == Action.ValueType.TogglePattern)
341 return AutomationHelpers.GetToggle(ae);
342 else
343 return AutomationHelpers.GetImage(ae);
344 }

◆ GetBounds()

Rectangle BioImager.Automation.Recording.GetBounds ( )

Definition at line 351 of file Automation.cs.

352 {
353 Action la = list.Last();
354 AutomationElement ae = AutomationHelpers.GetElementByProcess(la.ProcessName, la.Title, la.AutomationID, la.Name, la.ClassName, la.Index);
355 return ae.BoundingRectangle;
356 }

◆ GetImage()

Bitmap BioImager.Automation.Recording.GetImage ( )

Definition at line 345 of file Automation.cs.

346 {
347 Action la = list.Last();
348 AutomationElement ae = AutomationHelpers.GetElementByProcess(la.ProcessName, la.Title, la.AutomationID, la.Name, la.ClassName, la.Index);
349 return AutomationHelpers.GetImage(ae);
350 }

◆ Run()

void BioImager.Automation.Recording.Run ( )

Definition at line 313 of file Automation.cs.

314 {
315 foreach (Action a in list)
316 {
317 a.Perform();
318 }
319 }

◆ Set()

void BioImager.Automation.Recording.Set ( string  val)

Definition at line 357 of file Automation.cs.

358 {
359 for (int i = 0; i < list.Count; i++)
360 {
361 Action ac = list[i];
362 if (i == list.Count - 1)
363 continue;
364 ac.Perform();
365 }
366 Action la = list.Last();
367 AutomationElement ae = AutomationHelpers.GetElementByProcess(la.ProcessName, la.Title, la.AutomationID, la.Name, la.ClassName, la.Index);
368 AutomationHelpers.SetValue(ae, val);
369 }

◆ ToString()

override string BioImager.Automation.Recording.ToString ( )

Definition at line 370 of file Automation.cs.

371 {
372 return Name;
373 }

Property Documentation

◆ File

string BioImager.Automation.Recording.File
getset

Definition at line 293 of file Automation.cs.

294 {
295 get { return file; }
296 set { file = value; }
297 }

◆ List

List<Action> BioImager.Automation.Recording.List
getset

Definition at line 299 of file Automation.cs.

300 {
301 get { return list; }
302 set { list = value; }
303 }

◆ Name

string BioImager.Automation.Recording.Name
getset

Definition at line 287 of file Automation.cs.

288 {
289 get { return name; }
290 set { name = value; }
291 }

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