コード例 #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
ファイル: MainForm.cs プロジェクト: iRequire/yeecontrol
        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);
        }