protected void MainWindow_LoadedSink(object sender, RoutedEventArgs e) { RaumfeldNET.UPNP.NetworkConnectInfo networkConnectionInfo; networkConnectionInfo.subNetIndex = 0; String subnetIndex = this.getArgValue("-subnetindex"); if (!String.IsNullOrWhiteSpace(subnetIndex)) { int result; if (int.TryParse(subnetIndex, out result)) { networkConnectionInfo.subNetIndex = Convert.ToInt16(subnetIndex); } } rfController = new RaumfeldNET.Controller(networkConnectionInfo); if (App.mArgs != null && App.mArgs.Contains("-logwarning")) { rfController.logWriter.setLogLevel(RaumfeldNET.Log.LogType.Warning); } if (App.mArgs != null && App.mArgs.Contains("-logall")) { rfController.logWriter.setLogLevel(RaumfeldNET.Log.LogType.Info); } rfController.mediaServerFound += rfController_mediaServerFoundSink; rfController.mediaServerRemoved += rfController_mediaServerRemovedSink; rfController.allRenderersLinked += rfController_allRenderersLinkedSink; rfController.zonesRetrieved += rfController_zonesRetrievedSink; rfController.zoneTrackListReady += rfController_zoneTrackListReadySink; rfController.zoneTrackChanged += rfController_zoneTrackChangedSink; rfController.zoneTrackPositionChanged += rfController_zoneTrackPositionChangedSink; this.initAppUpdater(); this.initZoneTrackListControl(); this.initContentBrowserListControl(); this.initContentBrowserListSearch(); this.initScopeHandler(); this.initVolumeControls(); this.initVolumeControlsRotary(); this.initPlaylistManagement(); this.initContentBrowserContextMenu(); this.initPlaylistManagementContextMenu(); this.switchVisualContent(VisualContent.Loading); this.setZoneDataOnUpdate(true); this.setZoneTrackListOnUpdate(true); rfController.init(); VersionInfo.Content = "Version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); ComponentDispatcher.ThreadIdle += ComponentDispatcher_ThreadIdleSink; }
void Form1_FormClosed(object sender, FormClosedEventArgs e) { rfController = null; }
public Form1() { InitializeComponent(); this.FormClosed += Form1_FormClosed; rfController = new Controller(); }
protected void MainWindow_LoadedSink(object sender, RoutedEventArgs e) { RaumfeldNET.UPNP.NetworkConnectInfo networkConnectionInfo; networkConnectionInfo.subNetIndex = 0; String subnetIndex = this.getArgValue("-subnetindex"); if (!String.IsNullOrWhiteSpace(subnetIndex)) { int result; if (int.TryParse(subnetIndex, out result)) networkConnectionInfo.subNetIndex = Convert.ToInt16(subnetIndex); } rfController = new RaumfeldNET.Controller(networkConnectionInfo); if (App.mArgs != null && App.mArgs.Contains("-logwarning")) rfController.logWriter.setLogLevel(RaumfeldNET.Log.LogType.Warning); if (App.mArgs != null && App.mArgs.Contains("-logall")) rfController.logWriter.setLogLevel(RaumfeldNET.Log.LogType.Info); rfController.mediaServerFound += rfController_mediaServerFoundSink; rfController.mediaServerRemoved += rfController_mediaServerRemovedSink; rfController.allRenderersLinked += rfController_allRenderersLinkedSink; rfController.zonesRetrieved += rfController_zonesRetrievedSink; rfController.zoneTrackListReady += rfController_zoneTrackListReadySink; rfController.zoneTrackChanged += rfController_zoneTrackChangedSink; rfController.zoneTrackPositionChanged += rfController_zoneTrackPositionChangedSink; this.initAppUpdater(); this.initZoneTrackListControl(); this.initContentBrowserListControl(); this.initContentBrowserListSearch(); this.initScopeHandler(); this.initVolumeControls(); this.initVolumeControlsRotary(); this.initPlaylistManagement(); this.initContentBrowserContextMenu(); this.initPlaylistManagementContextMenu(); this.switchVisualContent(VisualContent.Loading); this.setZoneDataOnUpdate(true); this.setZoneTrackListOnUpdate(true); rfController.init(); VersionInfo.Content = "Version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); ComponentDispatcher.ThreadIdle += ComponentDispatcher_ThreadIdleSink; }