BioImager  4.9.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
Loading...
Searching...
No Matches
BioImager.Imager.Profile Class Reference

Public Member Functions

void Save (string path)
 
 Profile (string path)
 
void Load ()
 
override string ToString ()
 

Public Attributes

string FilePath = ""
 
string Name = ""
 
string DirName = ""
 

Detailed Description

Definition at line 91 of file Imager.cs.

Constructor & Destructor Documentation

◆ Profile()

BioImager.Imager.Profile.Profile ( string path)

Definition at line 107 of file Imager.cs.

108 {
109 FilePath = path;
110 if (path != "Default")
111 {
112 Name = Path.GetFileNameWithoutExtension(FilePath);
113 DirName = Path.GetDirectoryName(FilePath);
114 }
115 }

Member Function Documentation

◆ Load()

void BioImager.Imager.Profile.Load ( )

Definition at line 117 of file Imager.cs.

118 {
119 string[] sts = File.ReadAllLines(FilePath);
120 foreach (string s in sts)
121 {
122 string[] ss = s.Split('=');
123 if (Settings.Default[ss[0]].GetType() == typeof(double))
124 {
125 Settings.Default[ss[0]] = double.Parse(ss[1]);
126 }
127 else
128 if (Settings.Default[ss[0]].GetType() == typeof(string))
129 {
130 Settings.Default[ss[0]] = ss[1];
131 }
132 }
133 }

◆ Save()

void BioImager.Imager.Profile.Save ( string path)

Definition at line 96 of file Imager.cs.

97 {
98 List<string> sts = new List<string>();
99 foreach (SettingsProperty currentProperty in Settings.Default.Properties)
100 {
101 string s = currentProperty.Name + "=" + Settings.Default[currentProperty.Name].ToString();
102 sts.Add(s);
103 }
104 File.WriteAllLines(path, sts.ToArray());
105 }

◆ ToString()

override string BioImager.Imager.Profile.ToString ( )

Definition at line 135 of file Imager.cs.

136 {
137 return Name + " " + DirName;
138 }

Member Data Documentation

◆ DirName

string BioImager.Imager.Profile.DirName = ""

Definition at line 95 of file Imager.cs.

◆ FilePath

string BioImager.Imager.Profile.FilePath = ""

Definition at line 93 of file Imager.cs.

◆ Name

string BioImager.Imager.Profile.Name = ""

Definition at line 94 of file Imager.cs.


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