using System;
using System.Windows.Forms;    // @DONOTEXPORT

public class csSpeakAndLogNoParms
{
    readonly HomeSeerAPI.IHSApplication hs = CSscripts.CSinit.hsobject;       // @DONOTEXPORT
    readonly HomeSeer.PluginSdk.IHsController hs4 = CSscripts.CSinit.hs4object;    // @DONOTEXPORT
    public void Main(object parm)
    {
        //
        // Simple Sample Script
        //
        //    Note that the MessageBox statement will NOT be exported to HomeSeer
        //
        hs.Speak("Sample Script");
        hs.WriteLog("SampleScript", "Sample Script");
        MessageBox.Show("Simple Sample Script:  SpeakAndLogNoParms", "tenScripting");  // @DONOTEXPORT
    }
}

public class csSpeakAndLogOneParm
{
    readonly HomeSeerAPI.IHSApplication hs = CSscripts.CSinit.hsobject;       // @DONOTEXPORT
    readonly HomeSeer.PluginSdk.IHsController hs4 = CSscripts.CSinit.hs4object;    // @DONOTEXPORT
    public void Main(object parm)
    {
        //
        // Simple Sample Using One Parm
        //
        // When you run this script, specify a parameter as the text to speak/log
        //
        string s = Convert.ToString(parm);
        hs.Speak(s);
        hs.WriteLog("SampleScript", s);
        Console.WriteLine("parm:" + s);
    }
}

public class csSpeakAndLogMultipleParms
{
    readonly HomeSeerAPI.IHSApplication hs = CSscripts.CSinit.hsobject;       // @DONOTEXPORT
    readonly HomeSeer.PluginSdk.IHsController hs4 = CSscripts.CSinit.hs4object;    // @DONOTEXPORT
    public void Main(object parm)
    {
        //
        // Simple Sample Using Multiple Parms
        //
        // Specify two parms, separated by a vertical bar character ("|")
        //
        //    The 1st parm is the text spoken
        //
        //    The 2nd parm is the text written to the HS log
        //
        string s = Convert.ToString(parm);
        string[] ss = s.Split('|');
        hs.Speak(ss[0]);
        hs.WriteLog("SampleScript", ss[1]);
    }
}


