Download ScriptingHost-Jint3.zip, last updated 31/08/2020 (148.60 KB)

Download
  • md5: b024e3fc7125b05e7ec5eb5e5330f838
  • sha1: ce3d14820a647e3eb4588bf606b97047464041e9
  • sha256: d68e1b14e0da47d405e8cda8439a07ff45dff6adcdd992397fa190293e76edf6
using System.Windows.Forms;

// Adding Scripting to .NET Applications
// https://www.cyotek.com/blog/adding-scripting-to-net-applications

// Copyright © 2020 Cyotek Ltd. All Rights Reserved.

// This work is licensed under the MIT License.
// See LICENSE.TXT for the full text

// Found this example useful?
// https://www.paypal.me/cyotek

namespace Cyotek.Demo.ScriptingHost
{
  internal class SampleApplication
  {
    #region Private Fields

    private readonly MainForm _host;

    private string _title;

    #endregion Private Fields

    #region Public Constructors

    public SampleApplication(MainForm host)
    {
      _host = host;
      _title = Application.ProductName;
    }

    #endregion Public Constructors

    #region Public Properties

    public string Title
    {
      get { return _title; }
      set
      {
        _title = value;
        _host.UpdateWindowTitle();
      }
    }

    #endregion Public Properties

    #region Public Methods

    public void Quit()
    {
      _host.Close();
    }

    #endregion Public Methods
  }
}

Donate

Donate