private void chkNetworkControlEnabled_Checked(object sender, RoutedEventArgs e) { bool enableNetworkControl = (bool)((CheckBox)sender).IsChecked; Properties.Settings.Default.IsNetworkControlEnabled = enableNetworkControl; Properties.Settings.Default.Save(); OnRaiseNetworkControlEnabledEvent(new NetworkControlEnabledEventArgs(enableNetworkControl)); if (enableNetworkControl) { lblBrowserAddress.Content = "http://" + PlayerHTMLBuilder.GetLocalIPAddress() + ":9090/wamp/player"; } else { lblBrowserAddress.Content = ""; } }
public Stream GetPlayer() { var memoryStream = new MemoryStream(); //using (var memoryStream = new MemoryStream()) //{ StreamWriter writer = new StreamWriter(memoryStream); //using (StreamWriter writer = new StreamWriter(memoryStream)) //{ writer.Write(PlayerHTMLBuilder.GetPlayerHtml()); writer.Flush(); memoryStream.Position = 0; var context = WebOperationContext.Current; if (context != null) { context.OutgoingResponse.ContentType = "text/html"; } return(memoryStream); //} //} }