This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#" + olMapControls.map.div).on('initialized', function(){ | |
// add Custom Controls | |
addControls(); | |
}); | |
function addControls(){ | |
$('#btnZoomIn').click(function (evt) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( document ).ready(function() { | |
olMapControls.map.center = [7.1942,51.2762]; // adjust Default Values here | |
olMapControls.map.zoom = 12; | |
olMapControls.map.div = 'map'; | |
// init Map | |
olMapControls.init(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// global namespace | |
var olMapControls = { | |
map: { | |
projectionElement: "latlon", | |
positionformat: "Lat/Lon: {y}°, {x}°", | |
positiondigits: 4, | |
center: [7.1942,51.2762], | |
zoom: 13, | |
div: "map", | |
olmap: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!-- <link rel="icon" href="favicon.ico"> --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public event RExececutedEventHandler rExec; | |
protected virtual void CommandExecuted(RExececutedEventArgs e) | |
{ | |
RExececutedEventHandler handler = rExec; | |
if (handler != null) | |
{ | |
handler(e); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private SymbolicExpression EvaluateLine(String cmd) | |
{ | |
String result = ""; | |
// getTempfile name for sink | |
FileInfo f = new FileInfo(Path.GetTempFileName()); | |
SymbolicExpression s = null; | |
try | |
{ | |
// Activate sink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Dispose() | |
{ | |
if (this.rEngine != null) | |
{ | |
try | |
{ | |
// if any plots are open, they have to be closed | |
// before shooting down R | |
int I = this.getInt("length(dev.list())"); | |
for (int i = 0; i < I; i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using RDotNet; | |
namespace RepertoryGrid.BaseClasses | |
{ | |
public delegate void RExececutedEventHandler(RExececutedEventArgs e); | |
public class RExececutedEventArgs : EventArgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub sugarlevel_TextChanged(sender As Object, e As EventArgs) Handles sugarlevel.TextChanged | |
calc() | |
End Sub | |
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
calc() | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub calc() | |
Dim _return As String = "" | |
Try | |
Dim dbl As Double = CDbl(sugarlevel.Text) | |
Select Case cbolevel.SelectedValue | |
Case 2 | |
dbl *= 18.02 | |
_return = String.Format("{0} [mg/dl]", Format(dbl, "0.00")) |