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

Public Member Functions

void UpdateGUI ()
 
void SetColor ()
 
 FloodTool ()
 
 FloodTool (Pen p, ColorS tolerance, int bitPerPixel)
 

Protected Member Functions

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

Properties

Pen Pen [get, set]
 
ColorS Tolerance [get]
 

Detailed Description

Definition at line 3 of file FloodTool.Designer.cs.

Constructor & Destructor Documentation

◆ FloodTool() [1/2]

BioCore.FloodTool.FloodTool ( )

Definition at line 49 of file FloodTool.cs.

50 {
51 InitializeComponent();
52 UpdateGUI();
53 }

◆ FloodTool() [2/2]

BioCore.FloodTool.FloodTool ( Pen p,
ColorS tolerance,
int bitPerPixel )

Definition at line 54 of file FloodTool.cs.

55 {
56 InitializeComponent();
57 pen = p;
58 bitsPerPixel = bitPerPixel;
59 if (bitsPerPixel == 8)
60 {
61 rBar.Maximum = 255;
62 gBar.Maximum = 255;
63 bBar.Maximum = 255;
64 redBox.Maximum = 255;
65 greenBox.Maximum = 255;
66 blueBox.Maximum = 255;
67 }
68 if (rBar.Maximum <= p.color.R)
69 rBar.Value = rBar.Maximum;
70 if (gBar.Maximum <= p.color.G)
71 gBar.Value = gBar.Maximum;
72 if (bBar.Maximum <= p.color.B)
73 bBar.Value = bBar.Maximum;
74 this.tolerance = tolerance;
75 tolRBox.Value = (decimal)tolerance.R;
76 tolGBox.Value = (decimal)tolerance.G;
77 tolBBox.Value = (decimal)tolerance.B;
78 SetColor();
79 UpdateGUI();
80 }

Member Function Documentation

◆ Dispose()

override void BioCore.FloodTool.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 FloodTool.Designer.cs.

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

◆ SetColor()

void BioCore.FloodTool.SetColor ( )

Definition at line 43 of file FloodTool.cs.

44 {
45 rBar.Value = pen.color.R;
46 gBar.Value = pen.color.G;
47 bBar.Value = pen.color.B;
48 }
ColorS color
Definition Graphics.cs:6

◆ UpdateGUI()

void BioCore.FloodTool.UpdateGUI ( )

Definition at line 31 of file FloodTool.cs.

32 {
33 pen.color = new ColorS((ushort)redBox.Value, (ushort)greenBox.Value, (ushort)blueBox.Value);
34 colorPanel.BackColor = System.Drawing.Color.FromArgb(pen.color.R,pen.color.G,pen.color.B);
35 if (rBar.Value != redBox.Value)
36 redBox.Value = rBar.Value;
37 if (gBar.Value != greenBox.Value)
38 greenBox.Value = gBar.Value;
39 if (bBar.Value != blueBox.Value)
40 blueBox.Value = bBar.Value;
41 }

Property Documentation

◆ Pen

Pen BioCore.FloodTool.Pen
getset

Definition at line 10 of file FloodTool.cs.

11 {
12 get
13 {
14 return pen;
15 }
16 set
17 {
18 pen = value;
19 }
20 }

◆ Tolerance

ColorS BioCore.FloodTool.Tolerance
get

Definition at line 23 of file FloodTool.cs.

24 {
25 get
26 {
27 return tolerance;
28 }
29 }

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