コード例 #1
0
    //Custom method to send the color to the device
    private void SendColorToDevice(Color color, bool forced)
    {
        //Check if device's current color is the same, no need to update if they are the same
        if (!device_color.Equals(color) || forced)
        {
            //SendArgs(new string[] { string.Format("--sc:{0}:{1}:{2}", color.R.ToString(), color.G.ToString(), color.B.ToString()) });

            _magicHomeAurora = new MagicHomeAuroraDevice();
            _magicHomeAurora.Init(ipAddress);
            _magicHomeAurora.SetColor(color);
            _magicHomeAurora.Stop();
            device_color = color;
            Global.logger.LogLine(string.Format("[C# Script] Sent a color, {0} to MagicHomeLive", color));
        }
    }
コード例 #2
0
 public void Shutdown()
 {
     _magicHomeAurora.Stop();
 }