public ObervHandler() { xmlWriter = new XMLWriter(); setup = new UPnP_Setup(); subscribe(); setup.StartSinkDisco(); setup.StartSourceDisco(); }
public MainWindow() { setup = new UPnP_Setup(); InitializeComponent(); subscribe(); setup.StartSinkDisco(); setup.StartSourceDisco(); //btnSubscribe.IsEnabled = false; }
/// <summary> /// MainWindow Codebehind /// </summary> public MainWindow() { InitializeComponent(); settingsw = new Settings(); _UPnPSetup = new UPnP_Setup(); subscribe(); _UPnPSetup.StartServices(); dgPlayQueue.ItemsSource = playqueue; dgMusikindex.ItemsSource = musikindex; dgPlayQueue.IsReadOnly = true; dgMusikindex.IsReadOnly = true; sliderTime.DataContext = this; _sliderTimer.Interval = TimeSpan.FromMilliseconds(500); _sliderTimer.Tick += new EventHandler(timerEventFunc); sliderTime.Maximum = 0; }
/// <summary> /// Terminates the UPnP connection and tries to make a new one /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnRescan_OnClick(object sender, RoutedEventArgs e) { _UPnPSetup = null; _UPnPSink = null; _UPnPSource = null; GreyoutButtons(); _UPnPSetup = new UPnP_Setup(); subscribe(); _UPnPSetup.StartServices(); }