
using System;
using tenGlobalMethods;
using HomeSeerAPI;
using System.Text.RegularExpressions;
using HomeSeer.PluginSdk.Devices;
using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;


using System.IO;
using System.Net;
//using System.Net.Http;
//using System.Net.Http.Headers;




public class testit
{
    readonly HomeSeerAPI.IHSApplication hs = CSscripts.CSinit.hsobject;       // @DONOTEXPORT
    readonly HomeSeer.PluginSdk.IHsController hs4 = CSscripts.CSinit.hs4object;    // @DONOTEXPORT
    public void Main(object parm)
    {
        string Result;
        Result = tenGlobalMethods.ten.ToggleDeviceOnOff(hs, 174);



    }

    public enum Test_Enumerations
    {
        Test_Enum_01 = 100,
        Test_Enum_02 = 200,
        Test_Enum_03 = 300,
        Test_Enum_04 = 400
    }


}

public class TestScript
{
    readonly HomeSeerAPI.IHSApplication hs = CSscripts.CSinit.hsobject;       // @DONOTEXPORT
    readonly HomeSeer.PluginSdk.IHsController hs4 = CSscripts.CSinit.hs4object;    // @DONOTEXPORT
    public void Main(object parm)
    {



        // Get Device and Feature Names from DevRef
        string[] FullName;
        string DeviceName;
        string FeatureName;
        FullName = tenGlobalMethods.ten.GetFullnameByRef(hs4, 1045);
        DeviceName = FullName[0];
        FeatureName = FullName[1];
       // FeatureName = System.Environment.MachineName;
        hs.WriteLog("test", DeviceName);
        hs.WriteLog("test", FeatureName);


    }
}

//public class ejttestcs
//{
//    readonly HomeSeerAPI.IHSApplication hs = CSscripts.CSinit.hsobject;       // @DONOTEXPORT
//    readonly HomeSeer.PluginSdk.IHsController hs4 = CSscripts.CSinit.hs4object;    // @DONOTEXPORT
//    public void Main(object parm)
//    {

//        // Get formatted label for DevRef 174
//        double aValue;
//        HomeSeer.PluginSdk.Devices.Controls.StatusControl aStatusControl;
//        List<string> anAdditionalStatusData;
//        string aLabel;
//        aValue = (double)hs4.GetPropertyByRef(174, HomeSeer.PluginSdk.Devices.EProperty.Value);
//        aStatusControl = hs4.GetStatusControlForValue(174, aValue);
//        anAdditionalStatusData = (List<string>)hs4.GetPropertyByRef(174, HomeSeer.PluginSdk.Devices.EProperty.AdditionalStatusData);
//        if (aStatusControl == null)
//        {
//            aLabel = "";
//        }
//        else
//        {
//            if (anAdditionalStatusData == null)
//            {
//                aLabel = aStatusControl.GetLabelForValue(aValue);
//            }
//            else
//            {
//                aLabel = aStatusControl.GetLabelForValue(aValue, anAdditionalStatusData.ToArray());
//            }
//        }
//    }
//}

public class thisisatest
{
    readonly HomeSeerAPI.IHSApplication hs = CSscripts.CSinit.hsobject;       // @DONOTEXPORT
    readonly HomeSeer.PluginSdk.IHsController hs4 = CSscripts.CSinit.hs4object;    // @DONOTEXPORT
                                                                                   // This script generates a list of any windows that are currently open.



    public object Main(object parm)
    {
        string[] parms = ((string)parm).Split(',');

        System.Net.Http.HttpClient client = new System.Net.Http.HttpClient();

        return 0;
    }
}


