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.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 87 of file Imager.cs.

Constructor & Destructor Documentation

◆ Profile()

BioImager.Imager.Profile.Profile ( string  path)

Definition at line 103 of file Imager.cs.

104 {
105 FilePath = path;
106 if (path != "Default")
107 {
108 Name = Path.GetFileNameWithoutExtension(FilePath);
109 DirName = Path.GetDirectoryName(FilePath);
110 }
111 }

Member Function Documentation

◆ Load()

void BioImager.Imager.Profile.Load ( )

Definition at line 113 of file Imager.cs.

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

◆ Save()

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

Definition at line 92 of file Imager.cs.

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

◆ ToString()

override string BioImager.Imager.Profile.ToString ( )

Definition at line 131 of file Imager.cs.

132 {
133 return Name + " " + DirName;
134 }

Member Data Documentation

◆ DirName

string BioImager.Imager.Profile.DirName = ""

Definition at line 91 of file Imager.cs.

◆ FilePath

string BioImager.Imager.Profile.FilePath = ""

Definition at line 89 of file Imager.cs.

◆ Name

string BioImager.Imager.Profile.Name = ""

Definition at line 90 of file Imager.cs.


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