我的MediaElement播放器无法在其他计算机上运行

时间:2016-08-10 13:04:52

标签: c# wpf visual-studio publish

我有两台电脑,一台是我的工作电脑(带VS的WIN8),另一台是我的姊妹电脑(Win7)。

我在WPF中创建了一个简单的MediaElement,用于连接无线电流URL。

我的XAML

  @ManyToMany(cascade = CascadeType.ALL ,fetch=FetchType.EAGER)
            @JoinTable(name = "EMPLOYEE_PROJECT", joinColumns = { @JoinColumn(name = "EMPLOYEE_PKEY") }, inverseJoinColumns = { @JoinColumn(name = "PROJECT_PKEY") })
            private Set<Project> projects = new HashSet<Project>(0);

我的C#代码

<Window x:Class="radio.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:radio" mc:Ignorable="d" Title="MainWindow" Height="300" Width="508.667" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
    <Grid Margin="0,-7,0,7">
        <MediaElement x:Name="mediaElement" HorizontalAlignment="Left" Height="18" VerticalAlignment="Top" Width="17" />
        <Button x:Name="hitz" Content="hitz" HorizontalAlignment="Left" Margin="187,117,0,0" VerticalAlignment="Top" Width="75" Click="hitz_Click" Height="69" Background="#FFAA2D9F" FontSize="21.333" FontWeight="Bold" Foreground="#FFEEBF20" />
        <Label x:Name="label1" Content="Now Playing :" HorizontalAlignment="Left" Margin="112,25,0,0" VerticalAlignment="Top" FontSize="26.667" />
        <TextBlock x:Name="textBlock" HorizontalAlignment="Left" Margin="320,31,0,0" TextWrapping="Wrap" Text="None" VerticalAlignment="Top" FontSize="26.667" Foreground="#FFFF1717" />
        <Button x:Name="nine" Content="9.88" HorizontalAlignment="Left" Margin="337,117,0,0" VerticalAlignment="Top" Width="75" Height="69" FontSize="26.667" FontWeight="Bold" Background="#FFE64343" Click="nine_Click" Foreground="White" />
        <Button x:Name="myFm" Content="MY FM" HorizontalAlignment="Left" Margin="262,117,0,0" VerticalAlignment="Top" Width="75" Height="69" Background="#FFE0493A" FontSize="18.667" FontWeight="Bold" Click="button_Click" Foreground="#FF5C2078" />
        <Button x:Name="flyFm" Content="Fly FM" HorizontalAlignment="Left" Margin="112,117,0,0" VerticalAlignment="Top" Width="75" Height="69" Background="Black" FontSize="18.667" FontWeight="Bold" Foreground="#FFD6E634" Click="flyFm_Click" />
        <TextBlock x:Name="textBlock1" HorizontalAlignment="Left" Margin="25,50,0,0" TextWrapping="Wrap" Text="Wan Fai" VerticalAlignment="Top" Foreground="Red" />
    </Grid>
</Window>

当我从发布标签中的“发布向导”发布我的应用程序时,我可以从具有V. Studio的计算机中收听我的无线电流声音。但是当我在我姐姐的电脑上打开我的应用程序时,它没有播放任何无线电流声音(即使我点击任何按钮,它仍然没有播放任何声音)

有谁知道导致此问题的原因并知道如何解决此问题?

0 个答案:

没有答案