BioCore  5.0.0
A Windows .NET microscopy library and application for viewing, editing, and annotating images.
Loading...
Searching...
No Matches
BioCore.Automation Class Reference

Classes

class  Action
 
class  AutomationHelpers
 
class  Recording
 

Public Member Functions

 Automation ()
 

Static Public Member Functions

static void StartRecording ()
 It starts recording.
 
static void StopRecording ()
 It stops the recording and adds it to the list of recordings.
 
static void StartPropertyRecording (string name)
 
static void StopPropertyRecording ()
 Stop recording the property and add it to the list of properties.
 
static object GetProperty (string prop)
 
static void SetProperty (string prop, string val)
 
static void AddProperty (Recording rec)
 
static void RunRecording (string prop)
 

Static Public Attributes

static InputSimulator input
 
static Dictionary< string, Recording > Recordings = new Dictionary<string, Recording>()
 
static Dictionary< string, Recording > Properties = new Dictionary<string, Recording>()
 
static UIA3Automation automation = new UIA3Automation()
 
static Recording rec = new Recording()
 
static string recname
 

Properties

static bool IsRecording [get]
 
static AutomationElement Element [get]
 

Detailed Description

Definition at line 9 of file Automation.cs.

Constructor & Destructor Documentation

◆ Automation()

BioCore.Automation.Automation ( )

Definition at line 385 of file Automation.cs.

386 {
387 m_GlobalHook = Hook.GlobalEvents();
388 m_GlobalHook.MouseDownExt += GlobalHookMouseDownExt;
389 m_GlobalHook.MouseUpExt += GlobalHookMouseUpExt;
390 m_GlobalHook.MouseMoveExt += GlobalHookMouseMoveExt;
391 m_GlobalHook.KeyPress += GlobalHookKeyPress;
392 m_GlobalHook.KeyUp += GlobalHookKeyUp;
393 m_GlobalHook.KeyDown += GlobalHookKeyDown;
394 m_GlobalHook.MouseWheel += GlobalHookMouseWheel;
395 input = new InputSimulator();
396 }
static InputSimulator input
Definition Automation.cs:11

Member Function Documentation

◆ AddProperty()

static void BioCore.Automation.AddProperty ( Recording rec)
static

If the dictionary contains the key, then update the value. Otherwise, add the key and value to the dictionary

Parameters
Recording

Definition at line 467 of file Automation.cs.

468 {
469 if (Properties.ContainsKey(rec.Name))
471 else
472 Properties.Add(rec.Name, rec);
473 }
static Dictionary< string, Recording > Properties
Definition Automation.cs:13
static Recording rec

◆ GetProperty()

static object BioCore.Automation.GetProperty ( string prop)
static

It takes a string as an argument, and returns an object

Parameters
propThe name of the property to get.
Returns
The value of the property.

Definition at line 448 of file Automation.cs.

449 {
450 Recorder.AddLine("Automation.GetProperty(" + '"' + prop + '"' + ");");
451 return Properties[prop].Get();
452 }

◆ RunRecording()

static void BioCore.Automation.RunRecording ( string prop)
static

Runs a recording from the Properties collection

Parameters
propThe name of the recording you want to run.

Definition at line 477 of file Automation.cs.

478 {
479 Recording rec = (Recording)Properties[prop];
480 rec.Run();
481 Recorder.AddLine("Automation.RunRecording(" + '"' + prop + '"' + ");");
482 }

◆ SetProperty()

static void BioCore.Automation.SetProperty ( string prop,
string val )
static

It takes a property name and a value, and sets the property to the value

Parameters
propThe name of the property you want to set.
valThe value to set the property to.

Definition at line 457 of file Automation.cs.

458 {
459 Recording rec = (Recording)Properties[prop];
460 rec.Set(val);
461 Recorder.AddLine("Automation.SetProperty(" + '"' + prop + '"' + "," + '"' + val + '"' + ");");
462 }

◆ StartPropertyRecording()

static void BioCore.Automation.StartPropertyRecording ( string name)
static

‍Start recording the properties of the current object

Definition at line 430 of file Automation.cs.

431 {
432 recording = true;
433 recname = name;
434 rec = new Recording();
435 rec.Name = recname;
436 }
static string recname

◆ StartRecording()

static void BioCore.Automation.StartRecording ( )
static

It starts recording.

Definition at line 416 of file Automation.cs.

417 {
418 recording = true;
419 rec = new Recording();
420 }

◆ StopPropertyRecording()

static void BioCore.Automation.StopPropertyRecording ( )
static

Stop recording the property and add it to the list of properties.

Definition at line 438 of file Automation.cs.

439 {
440 recording = false;
441 Properties.Add(rec.Name,rec);
442 }

◆ StopRecording()

static void BioCore.Automation.StopRecording ( )
static

It stops the recording and adds it to the list of recordings.

Definition at line 422 of file Automation.cs.

423 {
424 recording=false;
425 rec.Name = recname;
426 Recordings.Add(rec.Name,rec);
427 }
static Dictionary< string, Recording > Recordings
Definition Automation.cs:12

Member Data Documentation

◆ automation

UIA3Automation BioCore.Automation.automation = new UIA3Automation()
static

Definition at line 14 of file Automation.cs.

◆ input

InputSimulator BioCore.Automation.input
static

Definition at line 11 of file Automation.cs.

◆ Properties

Dictionary<string, Recording> BioCore.Automation.Properties = new Dictionary<string, Recording>()
static

Definition at line 13 of file Automation.cs.

◆ rec

Recording BioCore.Automation.rec = new Recording()
static

Definition at line 383 of file Automation.cs.

◆ recname

string BioCore.Automation.recname
static

Definition at line 428 of file Automation.cs.

◆ Recordings

Dictionary<string, Recording> BioCore.Automation.Recordings = new Dictionary<string, Recording>()
static

Definition at line 12 of file Automation.cs.

Property Documentation

◆ Element

AutomationElement BioCore.Automation.Element
staticget

Definition at line 400 of file Automation.cs.

401 {
402 get
403 {
404 try
405 {
406 return automation.FromPoint(new Point(Cursor.Position.X, Cursor.Position.Y));
407 }
408 catch (Exception)
409 {
410
411 }
412 return null;
413 }
414 }
System.Drawing.Point Point
static UIA3Automation automation
Definition Automation.cs:14

◆ IsRecording

bool BioCore.Automation.IsRecording
staticget

Definition at line 375 of file Automation.cs.

376 {
377 get { return recording; }
378 }

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