Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix renaming + cosmetics + rebase #1

Merged
merged 5 commits into from
Jul 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions LibVLCSharp.WPF.Sample/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System.Windows;

namespace LibVlcSharp.Wpf.Sample
{
public class App : Application
{
}
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
using LibVLCSharp.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace LibVLCSharp.WPF.Sample
{
public partial class Controls : UserControl
{
Example1 parent;
readonly Example1 parent;

public Controls(Example1 Parent)
{
Expand All @@ -31,15 +19,15 @@ public Controls(Example1 Parent)
StopButton.Click += StopButton_Click;
}

private void StopButton_Click(object sender, RoutedEventArgs e)
void StopButton_Click(object sender, RoutedEventArgs e)
{
if (parent.Player.MediaPlayer.IsPlaying)
{
parent.Player.MediaPlayer.Stop();
}
}

private void PlayButton_Click(object sender, RoutedEventArgs e)
void PlayButton_Click(object sender, RoutedEventArgs e)
{
if (!parent.Player.MediaPlayer.IsPlaying)
{
Expand All @@ -48,4 +36,4 @@ private void PlayButton_Click(object sender, RoutedEventArgs e)
}
}
}
}
}
17 changes: 17 additions & 0 deletions LibVLCSharp.WPF.Sample/Example1.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Windows;

namespace LibVLCSharp.WPF.Sample
{
public partial class Example1 : Window
{
readonly Controls _controls;

public Example1()
{
InitializeComponent();

_controls = new Controls(this);
Player.Content = _controls;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
using LibVLCSharp.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace LibVLCSharp.WPF.Sample
{
Expand All @@ -21,23 +12,25 @@ public Example2()
{
InitializeComponent();

Label label = new Label();
label.Content = "TEST";
label.HorizontalAlignment = HorizontalAlignment.Right;
label.VerticalAlignment = VerticalAlignment.Bottom;
label.Foreground = new SolidColorBrush(Colors.Red);
var label = new Label
{
Content = "TEST",
HorizontalAlignment = HorizontalAlignment.Right,
VerticalAlignment = VerticalAlignment.Bottom,
Foreground = new SolidColorBrush(Colors.Red)
};
test.Children.Add(label);
}

private void StopButton_Click(object sender, RoutedEventArgs e)
void StopButton_Click(object sender, RoutedEventArgs e)
{
if (Player.MediaPlayer.IsPlaying)
{
Player.MediaPlayer.Stop();
}
}

private void PlayButton_Click(object sender, RoutedEventArgs e)
void PlayButton_Click(object sender, RoutedEventArgs e)
{
if (!Player.MediaPlayer.IsPlaying)
{
Expand All @@ -46,4 +39,4 @@ private void PlayButton_Click(object sender, RoutedEventArgs e)
}
}
}
}
}
133 changes: 133 additions & 0 deletions LibVLCSharp.WPF.Sample/LibVLCSharp.WPF.Sample.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{01CCB934-B77F-4681-86C5-AE4FEE648238}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>LibVLCSharp.WPF.Sample</RootNamespace>
<AssemblyName>LibVLCSharp.WPF.Sample</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
</ApplicationDefinition>
<Page Include="Controls.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Example2.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Example1.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Controls.xaml.cs">
<DependentUpon>Controls.xaml</DependentUpon>
</Compile>
<Compile Include="Example2.xaml.cs">
<DependentUpon>Example2.xaml</DependentUpon>
</Compile>
<Compile Include="Example1.xaml.cs">
<DependentUpon>Example1.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LibVLCSharp.WPF\LibVLCSharp.WPF.csproj">
<Project>{da7a2677-0944-481f-a59b-9128fc54fd5f}</Project>
<Name>LibVLCSharp.WPF</Name>
</ProjectReference>
<ProjectReference Include="..\LibVLCSharp\LibVLCSharp.csproj">
<Project>{d1c3b7c4-713b-46b2-b33a-e9298c819921}</Project>
<Name>LibVLCSharp</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets" Condition="Exists('..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
</PropertyGroup>
<Error Condition="!Exists('..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\VideoLAN.LibVLC.Windows.3.0.0-alpha3\build\VideoLAN.LibVLC.Windows.targets'))" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LibVLCSharp.Wpf\LibVLCSharp.WPF.csproj">
<ProjectReference Include="..\LibVLCSharp.WPF\LibVLCSharp.WPF.csproj">
<Project>{da7a2677-0944-481f-a59b-9128fc54fd5f}</Project>
<Name>LibVLCSharp.WPF</Name>
</ProjectReference>
Expand Down
26 changes: 26 additions & 0 deletions LibVLCSharp.WPF.Sample/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System.Windows;

namespace LibVLCSharp.WPF.Sample
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Example1Btn.Click += Example1Btn_Click;
Example2Btn.Click += Example2Btn_Click;
}

void Example1Btn_Click(object sender, RoutedEventArgs e)
{
var window = new Example1();
window.Show();
}

void Example2Btn_Click(object sender, RoutedEventArgs e)
{
var window = new Example2();
window.Show();
}
}
}
1 change: 0 additions & 1 deletion LibVLCSharp.WPF/ForegroundWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:LibVLCSharp.WPF"
x:ClassModifier="internal"
mc:Ignorable="d"
Title="LibVLCSharp.WPF" Height="300" Width="300" WindowStyle="None" Background="Transparent" ResizeMode="NoResize" AllowsTransparency="True" ShowInTaskbar="False">
Expand Down
Loading