예제 #1
0
        private void Devices_Load(object sender, EventArgs e)
        {
            toolStripStatusLabel1.Text = "YeeControl " + GlobalVariables.VERSION + " | www.yeecontrol.com";

            yeelightControlDevices = YeeControlDeviceHelper.GetYeeControlDevices();
            RefreshDeviceList();
            groupBoxActions.Enabled = false;
        }
예제 #2
0
        private async void MainForm_Load(object sender, EventArgs e)
        {
            toolStripStatusLabel1.Text = "YeeControl " + GlobalVariables.VERSION + " | www.yeecontrol.com";
            this.Size = defaultSize;

            foreach (YeeControlDevice ycd in YeeControlDeviceHelper.GetYeeControlDevices())
            {
                allDevices.Add(new Device(ycd.Hostname));
            }
            await allDevices.Connect();


            RefreshPresets();
            RefreshCheckedListBox();
            RefreshLightState();

            listBox1.SelectedIndexChanged += listBox1_SelectedIndexChanged;

            RT(() => RefreshLightState(), 7, cts.Token);
        }