Skip to content

Instantly share code, notes, and snippets.

View joecastelo's full-sized avatar

Joao Castelo joecastelo

View GitHub Profile
@joecastelo
joecastelo / ScriptContextArgs.cs
Created May 14, 2020 15:17
Class to perform transformation from the ScriptContext to command line args
// All credits to Carlos Anderson
// https://github.com/redcurry/EsapiEssentials/blob/master/src/EsapiEssentials/Standalone/StandaloneRunner/ScriptContextArgs.cs
using CommandLine;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VMS.TPS.Common.Model.API;
@joecastelo
joecastelo / Script.cs
Created May 14, 2020 15:19
Entry to ESAPI
using ExecutableLogic;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using VMS.TPS.Common.Model.API;
@joecastelo
joecastelo / RunStandalone.cs
Last active May 14, 2020 16:21
Logic to Copy and Paste all files in a folder to another subfolder where the file you are launching the executable
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@joecastelo
joecastelo / Program.cs
Created May 14, 2020 16:34
Executable Program to Print Beam Descriptions
using ExecutableLogic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VMS.TPS.Common.Model.API;
namespace LogPatientFields
{
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<title>Plot.ly 3D</title>
<script src="https://cdn.plot.ly/plotly-1.2.0.min.js"></script>
</head>
<body>
@joecastelo
joecastelo / index.html
Created May 27, 2020 20:51
Simple Plot.ly JS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<title>Plot.ly 3D</title>
<script src="https://cdn.plot.ly/plotly-1.2.0.min.js"></script>
</head>
<body>
@joecastelo
joecastelo / index.html
Created May 27, 2020 20:55
Simple Plot.ly JS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<title>Plot.ly 3D</title>
<script src="https://cdn.plot.ly/plotly-1.2.0.min.js"></script>
</head>
<body>
@joecastelo
joecastelo / index.html
Created May 27, 2020 21:01
Simple Plot.ly JS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<title>Plot.ly 3D</title>
<script src="https://cdn.plot.ly/plotly-1.2.0.min.js"></script>
</head>
@joecastelo
joecastelo / PlotMU_SSD_DMax.cs
Last active May 27, 2020 21:44
Javscript Plot C# Script
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using VMS.TPS.Common.Model.API;
namespace VMS.TPS
{
public class Script
{
class Patient
{
public string ID { get; set; }
public int Age { get; set; }
public int Priority { get; set; }
public Patient(string iD, int age, int priority)
{
ID = iD;
Age = age;