The opinions expressed herein are my own personal opinions. They are not necessarily fact or sactioned by any other person or organization. If you disagree that's your right. It's also my right to not care.
© Copyright 2008, Chris Tacke
Radios radios = Radios.GetRadios();Debug.WriteLine("\nBefore\r\n--------");foreach (IRadio radio in radios){ Debug.WriteLine(string.Format("Name: {0}, Type: {1}, State: {2}", radio.DeviceName, radio.RadioType.ToString(), radio.RadioState.ToString())); // toggle all radio states radio.RadioState = (radio.RadioState == RadioState.On) ? RadioState.Off : RadioState.On;}// give the radios enough time to change state - some (like BT) seem to be slowThread.Sleep(1000);radios.Refresh();// display againDebug.WriteLine("\r\nAfter\r\n--------");foreach (IRadio radio in radios){ Debug.WriteLine(string.Format("Name: {0}, Type: {1}, State: {2}", radio.DeviceName, radio.RadioType.ToString(), radio.RadioState.ToString()));}Debug.WriteLine("\r\n\n");Thread.Sleep(100);
Remember Me