Skip to content

Commit

Permalink
Agora é possivel alternar entre o modo tela cheia ao precionar o botã…
Browse files Browse the repository at this point in the history
…o f11
  • Loading branch information
Kairo Martins committed Oct 20, 2023
1 parent cd5c470 commit 95debf0
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 51 deletions.
9 changes: 1 addition & 8 deletions App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
xmlns:local="clr-namespace:Youtube.tv.win"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

</Application.Resources>
</Application>
12 changes: 8 additions & 4 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
xmlns:local="clr-namespace:Youtube.tv.win"
mc:Ignorable="d"

Title="YT tv" Height="570.492" Width="1115.984" Icon="youtube_logo_icon_147199.ico" WindowStyle="ThreeDBorderWindow" WindowState="Maximized" WindowStartupLocation="CenterScreen" Closing="ui_Closing">
<Grid>
<Border BorderThickness="0,1">
<wpf:ChromiumWebBrowser x:Name="Browser" Address="www.youtube.com/tv#" Margin="0,1,0,0" Foreground="{x:Null}"/>
Title="YT TV MODE (BY @KAIRO18)" Height="570.492" Width="1115.984" Icon="youtube_logo_icon_147199.ico" WindowStyle="ThreeDBorderWindow" WindowState="Maximized" WindowStartupLocation="CenterScreen" Closing="ui_Closing" KeyDown="ui_KeyDown">
<Grid Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="11*"/>
</Grid.ColumnDefinitions>
<Border BorderThickness="0,1" Grid.RowSpan="1" Grid.ColumnSpan="2">
<wpf:ChromiumWebBrowser x:Name="Browser" Address="www.youtube.com/tv#" Foreground="{x:Null}" Background="#FFF5EBEB"/>
</Border>
</Grid>
</Window>
28 changes: 28 additions & 0 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,33 @@ private void ui_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
Cef.Shutdown();
}
bool telacheia = false;
private void ui_KeyDown(object sender, KeyEventArgs e)
{

if (e.Key == Key.F11)
{

if (telacheia == false)
{
this.Topmost = true;
this.WindowState = WindowState.Maximized;
this.WindowStyle = WindowStyle.None;
telacheia = true;
}
else
{

this.WindowState = WindowState.Normal;
this.WindowStyle = WindowStyle.ThreeDBorderWindow;
this.Topmost = false;
telacheia = false;

}

}


}
}
}
46 changes: 16 additions & 30 deletions Youtube.tv.win.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\CefSharp.Common.108.4.130\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.108.4.130\build\CefSharp.Common.props')" />
<Import Project="packages\cef.redist.x86.108.4.13\build\cef.redist.x86.props" Condition="Exists('packages\cef.redist.x86.108.4.13\build\cef.redist.x86.props')" />
<Import Project="packages\cef.redist.x64.108.4.13\build\cef.redist.x64.props" Condition="Exists('packages\cef.redist.x64.108.4.13\build\cef.redist.x64.props')" />
<Import Project="packages\CefSharp.Common.117.2.40\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.117.2.40\build\CefSharp.Common.props')" />
<Import Project="packages\cef.redist.x86.117.2.4\build\cef.redist.x86.props" Condition="Exists('packages\cef.redist.x86.117.2.4\build\cef.redist.x86.props')" />
<Import Project="packages\cef.redist.x64.117.2.4\build\cef.redist.x64.props" Condition="Exists('packages\cef.redist.x64.117.2.4\build\cef.redist.x64.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -43,29 +43,17 @@
<ApplicationIcon>youtube_logo_icon_147199.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="CefSharp, Version=108.4.130.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.Common.108.4.130\lib\net452\CefSharp.dll</HintPath>
<Reference Include="CefSharp, Version=117.2.40.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.Common.117.2.40\lib\net462\CefSharp.dll</HintPath>
</Reference>
<Reference Include="CefSharp.Core, Version=108.4.130.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.Common.108.4.130\lib\net452\CefSharp.Core.dll</HintPath>
<Reference Include="CefSharp.Core, Version=117.2.40.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.Common.117.2.40\lib\net462\CefSharp.Core.dll</HintPath>
</Reference>
<Reference Include="CefSharp.Wpf, Version=108.4.130.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.Wpf.108.4.130\lib\net462\CefSharp.Wpf.dll</HintPath>
<Reference Include="CefSharp.Wpf, Version=117.2.40.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>packages\CefSharp.Wpf.117.2.40\lib\net462\CefSharp.Wpf.dll</HintPath>
</Reference>
<Reference Include="ControlzEx, Version=5.0.0.0, Culture=neutral, PublicKeyToken=69f1c32f803d307e, processorArchitecture=MSIL">
<HintPath>packages\ControlzEx.5.0.2\lib\net462\ControlzEx.dll</HintPath>
</Reference>
<Reference Include="MahApps.Metro, Version=2.0.0.0, Culture=neutral, PublicKeyToken=51482d6f650b2b3f, processorArchitecture=MSIL">
<HintPath>packages\MahApps.Metro.2.4.9\lib\net47\MahApps.Metro.dll</HintPath>
</Reference>
<Reference Include="MaterialDesignColors, Version=2.0.9.0, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
<HintPath>packages\MaterialDesignColors.2.0.9\lib\net462\MaterialDesignColors.dll</HintPath>
</Reference>
<Reference Include="MaterialDesignThemes.MahApps, Version=0.2.5.0, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
<HintPath>packages\MaterialDesignThemes.MahApps.0.2.5\lib\net462\MaterialDesignThemes.MahApps.dll</HintPath>
</Reference>
<Reference Include="MaterialDesignThemes.Wpf, Version=4.6.1.0, Culture=neutral, PublicKeyToken=df2a72020bd7962a, processorArchitecture=MSIL">
<HintPath>packages\MaterialDesignThemes.4.6.1\lib\net462\MaterialDesignThemes.Wpf.dll</HintPath>
<Reference Include="ControlzEx, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69f1c32f803d307e, processorArchitecture=MSIL">
<HintPath>packages\ControlzEx.6.0.0\lib\net462\ControlzEx.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Xaml.Behaviors.Wpf.1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
Expand Down Expand Up @@ -146,12 +134,10 @@
<PropertyGroup>
<ErrorText>Este projeto faz referência a pacotes do NuGet que não estão presentes neste computador. Use a Restauração de Pacotes do NuGet para baixá-los. Para obter mais informações, consulte http://go.microsoft.com/fwlink/?LinkID=322105. O arquivo ausente é {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\cef.redist.x64.108.4.13\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.108.4.13\build\cef.redist.x64.props'))" />
<Error Condition="!Exists('packages\cef.redist.x86.108.4.13\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.108.4.13\build\cef.redist.x86.props'))" />
<Error Condition="!Exists('packages\CefSharp.Common.108.4.130\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.108.4.130\build\CefSharp.Common.props'))" />
<Error Condition="!Exists('packages\CefSharp.Common.108.4.130\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.108.4.130\build\CefSharp.Common.targets'))" />
<Error Condition="!Exists('packages\MaterialDesignThemes.4.6.1\build\MaterialDesignThemes.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\MaterialDesignThemes.4.6.1\build\MaterialDesignThemes.targets'))" />
<Error Condition="!Exists('packages\cef.redist.x64.117.2.4\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.117.2.4\build\cef.redist.x64.props'))" />
<Error Condition="!Exists('packages\cef.redist.x86.117.2.4\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.117.2.4\build\cef.redist.x86.props'))" />
<Error Condition="!Exists('packages\CefSharp.Common.117.2.40\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.117.2.40\build\CefSharp.Common.props'))" />
<Error Condition="!Exists('packages\CefSharp.Common.117.2.40\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.117.2.40\build\CefSharp.Common.targets'))" />
</Target>
<Import Project="packages\CefSharp.Common.108.4.130\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.108.4.130\build\CefSharp.Common.targets')" />
<Import Project="packages\MaterialDesignThemes.4.6.1\build\MaterialDesignThemes.targets" Condition="Exists('packages\MaterialDesignThemes.4.6.1\build\MaterialDesignThemes.targets')" />
<Import Project="packages\CefSharp.Common.117.2.40\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.117.2.40\build\CefSharp.Common.targets')" />
</Project>
14 changes: 5 additions & 9 deletions packages.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.redist.x64" version="108.4.13" targetFramework="net472" />
<package id="cef.redist.x86" version="108.4.13" targetFramework="net472" />
<package id="CefSharp.Common" version="108.4.130" targetFramework="net472" />
<package id="CefSharp.Wpf" version="108.4.130" targetFramework="net472" />
<package id="ControlzEx" version="5.0.2" targetFramework="net472" />
<package id="MahApps.Metro" version="2.4.9" targetFramework="net472" />
<package id="MaterialDesignColors" version="2.0.9" targetFramework="net472" />
<package id="MaterialDesignThemes" version="4.6.1" targetFramework="net472" />
<package id="MaterialDesignThemes.MahApps" version="0.2.5" targetFramework="net472" />
<package id="cef.redist.x64" version="117.2.4" targetFramework="net472" />
<package id="cef.redist.x86" version="117.2.4" targetFramework="net472" />
<package id="CefSharp.Common" version="117.2.40" targetFramework="net472" />
<package id="CefSharp.Wpf" version="117.2.40" targetFramework="net472" />
<package id="ControlzEx" version="6.0.0" targetFramework="net472" />
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.39" targetFramework="net472" />
</packages>

0 comments on commit 95debf0

Please sign in to comment.