private string GetRackDescription() { // Convert rack layout information to Chromeleon's rack description language. // The rack layout can either be part of your configuration XML, in which case this is static information, // or the driver can update the rack description dynamically when communication with the hardware is established // and the hardware reports a new rack layout. // DDKV1.chm - search for Rack // C:\Thermo\Chromeleon\Bin\RackView.TestHarness.exe - The example below is the "Rectangle Tray" rack IRackLayoutDescriptionBuilder builder = m_InjectHandler.CreateRackLayoutDescriptionBuilder(); if (builder == null) { return(string.Empty); } ITray rack = builder.AddTray(string.Empty, 0, 0); rack.SetRectangularForm(0, 0, 332.3, 250.5); // Optional //rack.SetBorderStyle(double lineWidth, double red, double green, double blue); //rack.SetFillColor(double red, double green, double blue); int rackIndex = -1; RackAddGroupLeft(rack, m_RackInfos[++rackIndex]); RackAddGroupRight(rack, m_RackInfos[++rackIndex]); // tray{"TwoSubRacks";pos{0;0};form{rect;0;0;332.3;250.5};tubes{form{elli;14.3;14.3};rect{10;15;4;6;15.8;15.9;enum{SawH;"A%p%";151;151}}};tubes{form{elli;16.2;16.2};rect{8;12;177.1;17;18;18;enum{SawH;"B%p%";1;1}}}} string result = builder.Description; return(result); }
private String GenerateTrayDescription() { // Convert tray layout information to Chromeleon's tray description language. // The tray layout can either be part of your configuration XML, in which case this is static information, // or the driver can update the tray description dynamically when communication with the hardware is established // and the hardware reports a new tray layout. // For simplicity, the code below just shows a small subset of what can be done. IRackLayoutDescriptionBuilder rackLayoutDescriptionBuilder = m_InjectHandler.CreateRackLayoutDescriptionBuilder(); if (rackLayoutDescriptionBuilder == null) { return(String.Empty); } ITray tray = rackLayoutDescriptionBuilder.AddTray("TwoSubTrays", 0, 0); tray.SetRectangularForm(0.0, 0.0, 332.3, 250.5); ITubesGroup group1 = tray.AddTubesGroup(); group1.SetEllipsoidForm(16.2, 16.2); IRectangularTubeCollection rectangle1 = group1.AddRectangle(8, 12, 177.1, 17.0, 18.0, 18.0); rectangle1.AddEnumeration(EnumerationScheme.SawH, 1, 1); ITubesGroup group2 = tray.AddTubesGroup(); group2.SetEllipsoidForm(14.3, 14.3); IRectangularTubeCollection rectangle2 = group2.AddRectangle(10, 15, 4.0, 6.0, 15.8, 15.9); rectangle2.AddEnumeration(EnumerationScheme.SawH, 151, 151); return(rackLayoutDescriptionBuilder.Description); }