Definition at line 8 of file MicroscopeConsole.cs.
◆ RunCommand()
Definition at line 78 of file MicroscopeConsole.cs.
79 {
80 Process[] prs = Process.GetProcessesByName("MicroscopeConsole.exe");
81 if (prs.Length == 1)
84 {
85 Start();
86 }
87 if (c.type.ToString().StartsWith("Get"))
88 {
89 string arg = JsonConvert.SerializeObject(c);
90 console.StandardInput.WriteLine(
"Command:" + arg);
91 A:
92 try
93 {
94 do
95 {
97 break;
98 string st =
console.StandardOutput.ReadLine();
99 if(st != null)
100 if (st.Length > 0)
101 {
102 return JsonConvert.DeserializeObject<
Command>(st);
103 }
104 Thread.Sleep(20);
105 } while (true);
106 }
107 catch (Exception e)
108 {
109 Console.WriteLine(e.Message);
110 goto A;
111 }
112
113 string er =
console.StandardError.ReadToEnd();
114 string o =
console.StandardOutput.ReadToEnd();
115 Console.WriteLine(er);
118 }
119 else
120 {
121 string arg = JsonConvert.SerializeObject(c);
122 console.StandardInput.WriteLine(
"Command:" + arg);
124 {
125
126 do
127 {
129 break;
130 string st =
console.StandardOutput.ReadLine();
131 if (st != null)
132 if (st.Length > 0)
133 {
134 return JsonConvert.DeserializeObject<
Command>(st);
135 }
137 } while (true);
138 }
140 }
141 }
System.Windows.Forms.Application Application
◆ SetStagePosition()
| static void BioImager.MicroscopeConsole.SetStagePosition |
( |
PointD | p | ) |
|
|
static |
◆ console
| Process BioImager.MicroscopeConsole.console = null |
|
static |
◆ synchronous
| bool BioImager.MicroscopeConsole.synchronous = true |
|
static |
The documentation for this class was generated from the following file: