BioGTK  6.0.0
A .NET library & program for annotating, editing various microscopy imaging formats using Bioformats supported images. Including whole slide, pyramidal, and series.
All Classes Namespaces Functions
BioGTK.SetTool Class Reference
Inheritance diagram for BioGTK.SetTool:

Public Member Functions

void InitItems ()
 
void UpdateItems ()
 It updates the treeview with the current state of the scripts.
 

Static Public Member Functions

static SetTool Create ()
 

Protected Member Functions

 SetTool (Builder builder, IntPtr handle)
 

Detailed Description

Definition at line 9 of file SetTool.cs.

Constructor & Destructor Documentation

◆ SetTool()

BioGTK.SetTool.SetTool ( Builder builder,
IntPtr handle )
protected

Definition at line 38 of file SetTool.cs.

38 : base(handle)
39 {
40 _builder = builder;
41 builder.Autoconnect(this);
42 tree.RowActivated += TreeView_RowActivated;
43 this.FocusActivated += SetTool_FocusActivated;
44 InitItems();
45 App.ApplyStyles(this);
46 }
void InitItems()
Definition SetTool.cs:59

Member Function Documentation

◆ Create()

static SetTool BioGTK.SetTool.Create ( )
static

"Create a new instance of the SetTool class, using the Builder class to load the glade file and get the handle of the main window."

The Builder class is a class that is used to load the glade file and get the handle of the main window

Returns
A new instance of the SetTool class.

Definition at line 32 of file SetTool.cs.

33 {
34 Builder builder = new Builder(new FileStream(System.IO.Path.GetDirectoryName(Environment.ProcessPath) + "/" + "Glade/SetTool.glade", FileMode.Open));
35 return new SetTool(builder, builder.GetObject("setTool").Handle);
36 }

◆ InitItems()

void BioGTK.SetTool.InitItems ( )

It creates two columns in the treeview, and then adds the text from the first and second columns of the liststore to the first and second columns of the treeview.

Definition at line 59 of file SetTool.cs.

60 {
61 Gtk.TreeViewColumn coordCol = new Gtk.TreeViewColumn();
62 coordCol.Title = "Tool";
63 Gtk.CellRendererText coordCell = new Gtk.CellRendererText();
64 coordCol.PackStart(coordCell, true);
65
66 Gtk.TreeViewColumn expCol = new Gtk.TreeViewColumn();
67 expCol.Title = "State";
68 Gtk.CellRendererText expCell = new Gtk.CellRendererText();
69 expCol.PackStart(expCell, true);
70
71 tree.AppendColumn(coordCol);
72 tree.AppendColumn(expCol);
73
74 coordCol.AddAttribute(coordCell, "text", 0);
75 expCol.AddAttribute(expCell, "text", 1);
76
78 }
void UpdateItems()
It updates the treeview with the current state of the scripts.
Definition SetTool.cs:80

◆ UpdateItems()

void BioGTK.SetTool.UpdateItems ( )

It updates the treeview with the current state of the scripts.

Definition at line 80 of file SetTool.cs.

81 {
82 Gtk.TreeStore store = new Gtk.TreeStore(typeof(string), typeof(string), typeof(string));
83
84 foreach (Scripting.Script s in Scripting.scripts.Values)
85 {
86 if (s.thread == null)
87 store.AppendValues(s.name, ThreadState.Unstarted.ToString());
88 else
89 store.AppendValues(s.name, s.thread.ThreadState.ToString());
90 }
91 tree.Model = store;
92 }

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