From 95debf08b7aedac573a07983cc7161aa61326e15 Mon Sep 17 00:00:00 2001 From: Kairo Martins Date: Thu, 19 Oct 2023 22:25:31 -0400 Subject: [PATCH] =?UTF-8?q?Agora=20=C3=A9=20possivel=20alternar=20entre=20?= =?UTF-8?q?o=20modo=20tela=20cheia=20ao=20precionar=20o=20bot=C3=A3o=20f11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.xaml | 9 +-------- MainWindow.xaml | 12 +++++++---- MainWindow.xaml.cs | 28 ++++++++++++++++++++++++++ Youtube.tv.win.csproj | 46 +++++++++++++++---------------------------- packages.config | 14 +++++-------- 5 files changed, 58 insertions(+), 51 deletions(-) diff --git a/App.xaml b/App.xaml index 628cfd7..479ae99 100644 --- a/App.xaml +++ b/App.xaml @@ -4,13 +4,6 @@ xmlns:local="clr-namespace:Youtube.tv.win" StartupUri="MainWindow.xaml"> - - - - - - - - + diff --git a/MainWindow.xaml b/MainWindow.xaml index 63c7ec8..7a400ff 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -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"> - - - + 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"> + + + + + + + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index c9e30ba..722145f 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -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; + + } + + } + + + } } } diff --git a/Youtube.tv.win.csproj b/Youtube.tv.win.csproj index 09a7cf1..eb3c72c 100644 --- a/Youtube.tv.win.csproj +++ b/Youtube.tv.win.csproj @@ -1,8 +1,8 @@  - - - + + + Debug @@ -43,29 +43,17 @@ youtube_logo_icon_147199.ico - - packages\CefSharp.Common.108.4.130\lib\net452\CefSharp.dll + + packages\CefSharp.Common.117.2.40\lib\net462\CefSharp.dll - - packages\CefSharp.Common.108.4.130\lib\net452\CefSharp.Core.dll + + packages\CefSharp.Common.117.2.40\lib\net462\CefSharp.Core.dll - - packages\CefSharp.Wpf.108.4.130\lib\net462\CefSharp.Wpf.dll + + packages\CefSharp.Wpf.117.2.40\lib\net462\CefSharp.Wpf.dll - - packages\ControlzEx.5.0.2\lib\net462\ControlzEx.dll - - - packages\MahApps.Metro.2.4.9\lib\net47\MahApps.Metro.dll - - - packages\MaterialDesignColors.2.0.9\lib\net462\MaterialDesignColors.dll - - - packages\MaterialDesignThemes.MahApps.0.2.5\lib\net462\MaterialDesignThemes.MahApps.dll - - - packages\MaterialDesignThemes.4.6.1\lib\net462\MaterialDesignThemes.Wpf.dll + + packages\ControlzEx.6.0.0\lib\net462\ControlzEx.dll packages\Microsoft.Xaml.Behaviors.Wpf.1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll @@ -146,12 +134,10 @@ 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}. - - - - - + + + + - - + \ No newline at end of file diff --git a/packages.config b/packages.config index 882d94d..0f4d4ab 100644 --- a/packages.config +++ b/packages.config @@ -1,13 +1,9 @@  - - - - - - - - - + + + + + \ No newline at end of file