コード例 #1
0
        private void select_window_close(object sender, System.EventArgs e)
        {
            cardselect s = (cardselect)sender;

            if (s.Selectcard == -1)
            {
                return;
            }
            var list = cap.GetDevices();

            cap.SetDevice(s.Selectcard);
        }
コード例 #2
0
        private void selectbutton_Click(object sender, RoutedEventArgs e)
        {
            cardselect s    = new cardselect();
            var        list = cap.GetDevices();

            while (list == null)
            {
                MessageBox.Show("waiting...");
                Thread.Sleep(100);
                list = cap.GetDevices();
            }
            foreach (var i in list)
            {
                s.Cards.Items.Add(i);
            }
            s.Show();
            s.Closed += select_window_close;
        }