Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/biologytools/micro-manager.net
Controlling Micro-Manager 2.0.3 with IKVM & C#
https://github.com/biologytools/micro-manager.net
micro-manager
Last synced: about 1 month ago
JSON representation
Controlling Micro-Manager 2.0.3 with IKVM & C#
- Host: GitHub
- URL: https://github.com/biologytools/micro-manager.net
- Owner: BiologyTools
- License: gpl-3.0
- Created: 2024-06-28T06:29:27.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-02T14:52:47.000Z (6 months ago)
- Last Synced: 2024-07-03T16:27:53.442Z (6 months ago)
- Topics: micro-manager
- Language: C#
- Homepage: https://micro-manager.org/
- Size: 75.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![NuGet version (Micro-Manager.NET)](https://img.shields.io/nuget/v/Micro-Manager.NET.svg)](https://www.nuget.org/packages/Micro-Manager.NET/2.0.3)
[![NuGet version (Micro-Manager.NET)](https://img.shields.io/nuget/dt/Micro-Manager.NET?color=g)](https://www.nuget.org/packages/Micro-Manager.NET/2.0.3)
# Micro-Manager.NET
Using Micro-Manager 2.0.3 with IKVM & C## Building
- Get IKVM 8.10.2.- Then use Micro-Manager in C#
```
using mmcorej;
using org.micromanager.@internal;
namespace MMTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
// Now, set the Java "user.dir" system property to match the C# current directory
string p = Path.GetDirectoryName("C:/Program Files/Micro-Manager-2.0/");
Directory.SetCurrentDirectory(p);
java.lang.System.setProperty("user.dir", p);
java.lang.System.setProperty("force.annotation.index", "true");
java.lang.System.setProperty("org.micromanager.corej.path", "C:/Program Files/Micro-Manager-2.0/");
CMMCore core;
MMStudio studio;
try
{
MMStudio.main(new string[] { });
studio = MMStudio.getInstance();
core = studio.core();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
Directory.SetCurrentDirectory(Path.GetDirectoryName(Environment.ProcessPath));
}
}
}```