Example #1
0
        public async Task RefreshList()
        {
            refreshLink.Enabled = false;

            using (var sddp = new Utility.Sddp())
            {
                sddp.OnResponse = r =>
                {
                    if (r.St != "c4:director")
                    {
                        return;
                    }

                    Invoke((Action)(() =>
                    {
                        controllerList.Items.Add(r);

                        if (controllerList.SelectedIndex < 0)
                        {
                            controllerList.SelectedIndex = 0;
                            Connect(r);
                        }
                    }));
                };

                sddp.Search("c4:director");

                await Task.Delay(4000);
            }

            refreshLink.Enabled = true;
        }
Example #2
0
        public async Task RefreshList()
        {
            using (var sddp = new Utility.Sddp())
            {
                sddp.OnResponse = r =>
                {
                    if (r.St != "c4:director")
                    {
                        return;
                    }

                    _ = Connect(r);
                };

                sddp.Search("c4:director");

                await Task.Delay(4000);
            }
        }