.NET to Javascript compiler

C# code   Html page   Start
public class WindowApp
{
    public static void Start()
    {
        Window window = new Window()
        {
            Element = HtmlDocument.Current.GetElementById("window").CloneNode(true),
            Width = 200,
            Height = 200,
            Left = 20,
            Top = 20,
            Visible = true,
            Resizable = true,
            Movable = true
        };

        window.Titlebar.Text = "Title";
        window.Titlebar.Visible = true;
        window.Buttons.Add(new CloseButton());
        window.Buttons.Add(new MaximizeButton());
    }
}
class MessageBoxApp
{
    readonly static string[] results = new string[] { "OK", "Cancel", "Abort", "Retry", "Ignore", "Yes", "No" };
    public static void StartOK()
    {
        MessageBox.Show("OK");
    }

    public static void StartOKCancel()
    {
        MessageBox.Show("OK Cancel - Inner Text\r\nNew Line\tTab\r\nNewLine long text long text long text long text long text long text "
            + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
            + " long text long text long text long text long text long text long text long text long text long text long text long text",
            "OK Cancel",
            MessageBoxButtons.OKCancel,
            DisplayResult);
    }

    public static async void StartAbortRetryIgnore()
    {
        DisplayResult(await MessageBox.Show("AbortRetryIgnore - Inner Text", "AbortRetryIgnore Caption (await)", MessageBoxButtons.AbortRetryIgnore));
    }

    public static void StartYesNoCancel()
    {
        MessageBox.Show("YesNoCancel - Inner Text", "YesNoCancel Caption", MessageBoxButtons.YesNoCancel, DisplayResult);
    }

    public static void StartYesNo()
    {
        MessageBox.Show("YesNo - Inner Text", "YesNo Caption", MessageBoxButtons.YesNo, DisplayResult);
    }

    public static async void StartRetryCancel()
    {
        DisplayResult(await MessageBox.Show("RetryCancel - Inner Text (await)", "RetryCancel Caption", MessageBoxButtons.RetryCancel));
    }

    public static async void StartFreeHtml()
    {
        DisplayResult(await MessageBox.Show(HtmlDocument.Current.GetElementById("freeHtml"), "FreeHtml Caption (await)", MessageBoxButtons.OK, " "));
    }

    static void DisplayResult(DialogResult result)
    {
        HtmlWindow.Current.Alert("DialogResult: " + results[(int)result - 1]);
    }
}


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" style="overflow:hidden;width:100%;height:100%">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="x-ua-compatible" content="IE=11;IE=10;IE=9;IE=8;IE=7" />
    <link rel="stylesheet" href="styles/jscriptsuite.css" type="text/css" />
    <link rel="stylesheet" href="styles/summary.css" type="text/css" />
    <script language="javascript" type="text/javascript" src="js/window.js?v2"></script>
  </head>
	<body onload="StartScript()">
		Window.html: Test
    <input type="button" value="Open Window" onclick="StartScript()"/>
    <input type="button" onclick="StartOK()" value="Start OK"/>
    <input type="button" onclick="StartOKCancel()" value="Start OKCancel"/>
    <input type="button" onclick="StartAbortRetryIgnore()" value="Start AbortRetryIgnore"/>
    <input type="button" onclick="StartYesNoCancel()" value="Start YesNoCancel"/>
    <input type="button" onclick="StartYesNo()" value="Start YesNo"/>
    <input type="button" onclick="StartRetryCancel()" value="Start RetryCancel"/>
    <input type="button" onclick="StartFreeHtml()" value="Start FreeHtml"/>

    <div style="display:none">      
      <div id="window" style="width:100%;height:100%;overflow:auto">
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        <input type="button" value="Open Window" onclick="StartScript()"/>
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
        Sample window Body
      </div>
      <div id="freeHtml" style="width:100%;height:100%;overflow:auto">
        <div class="messageBoxText">
          Free Html
          <input type="button" onclick="StartOK()" value="Start OK"/>
          <input type="button" onclick="StartOKCancel()" value="Start OKCancel"/>
          <input type="button" onclick="StartAbortRetryIgnore()" value="Start AbortRetryIgnore"/>
          <input type="button" onclick="StartYesNoCancel()" value="Start YesNoCancel"/>
          <input type="button" onclick="StartYesNo()" value="Start YesNo"/>
          <input type="button" onclick="StartRetryCancel()" value="Start RetryCancel"/>
          Free Html
          Free Html
        </div>
      </div>
    </div>
  </body>
</html>

© 2009 JScriptSuite. All rights reserved.