Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
BiologyTools authored Oct 3, 2024
1 parent b6cca1b commit cfb5fe4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
[![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
Controlling Micro-Manager 2.0.3 with IKVM & C#
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;
using System;
namespace MMTest
{
public partial class Form1 : Form
{
public Form1(string[] args)
public Form1()
{
InitializeComponent();
// Now, set the Java "user.dir" system property to match the C# current directory
string p = Path.GetDirectoryName(config).Replace("\\","/");
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("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[] {});
MMStudio.main(new string[] { });
studio = MMStudio.getInstance();
core = studio.core();
}
Expand All @@ -38,4 +39,5 @@ namespace MMTest
}
}
}
```

0 comments on commit cfb5fe4

Please sign in to comment.