Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
BiologyTools authored Jul 2, 2024
1 parent 18e4987 commit 32b7e7c
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@

- Then use Micro-Manager in C#
```
extern alias mm;
using mm::org.micromanager.@internal;
using mm::mmcorej;
using org.micromanager.@internal;
using System;
namespace MicroManagerNET
namespace MMTest
{
public partial class Form1 : Form
{
public Form1(string[] args)
{
InitializeComponent();
MicroManager.Initialize("C:/Program Files/Micro-Manager-2.0/MMConfig_demo.cfg");
Directory.SetCurrentDirectory("C:/Program Files/Micro-Manager-2.0/");
java.lang.System.setProperty("force.annotation.index", "true");
// Set the library path (adjust the path as needed)
Expand All @@ -26,19 +23,11 @@ namespace MicroManagerNET
{
MMStudio.main(args);
MMStudio ms = MMStudio.getInstance();
CMMCore core = ms.core();
core.setExposure(5);
core.setXYPosition(100, 100);
string obj = MicroManager.Objectives.GetObjective(1).Values[0];
core.setConfig(MicroManager.TurretName, obj);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
```

0 comments on commit 32b7e7c

Please sign in to comment.