From 3785a90c6722490ef64af8bbf95eab00bae79082 Mon Sep 17 00:00:00 2001 From: DB p Date: Tue, 30 Nov 2021 15:57:44 +0900 Subject: [PATCH 01/43] Add WelcomeWindow and temp menu in tray to test --- Flow.Launcher/MainWindow.xaml.cs | 12 ++++++++++++ Flow.Launcher/WelcomeWindow.xaml | 15 +++++++++++++++ Flow.Launcher/WelcomeWindow.xaml.cs | 27 +++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 Flow.Launcher/WelcomeWindow.xaml create mode 100644 Flow.Launcher/WelcomeWindow.xaml.cs diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 8afc07439aa..75e3fefa9da 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -171,6 +171,7 @@ private void UpdateNotifyIconText() ((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("GameMode"); ((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings"); ((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit"); + ((MenuItem)menu.Items[5]).Header = "Welcome Window"; /*Temp*/ } private void InitializeNotifyIcon() @@ -204,17 +205,23 @@ private void InitializeNotifyIcon() { Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit") }; + var WelcomeWindow = new MenuItem /*Temp*/ + { + Header = "Welcome Window" + }; open.Click += (o, e) => _viewModel.ToggleFlowLauncher(); gamemode.Click += (o, e) => ToggleGameMode(); settings.Click += (o, e) => App.API.OpenSettingDialog(); exit.Click += (o, e) => Close(); + WelcomeWindow.Click += (o, e) => OpenWelcomeWindow(); /*Temp*/ contextMenu.Items.Add(header); contextMenu.Items.Add(open); gamemode.ToolTip = InternationalizationManager.Instance.GetTranslation("GameModeToolTip"); contextMenu.Items.Add(gamemode); contextMenu.Items.Add(settings); contextMenu.Items.Add(exit); + contextMenu.Items.Add(WelcomeWindow); /*Temp*/ _notifyIcon.ContextMenuStrip = new ContextMenuStrip(); // it need for close the context menu. if not, context menu can't close. _notifyIcon.MouseClick += (o, e) => @@ -232,6 +239,11 @@ private void InitializeNotifyIcon() }; } + private void OpenWelcomeWindow() + { + Flow.Launcher.WelcomeWindow WelcomeWindow = new Flow.Launcher.WelcomeWindow(); + WelcomeWindow.Show(); + } private void ToggleGameMode() { if (_viewModel.GameModeStatus) diff --git a/Flow.Launcher/WelcomeWindow.xaml b/Flow.Launcher/WelcomeWindow.xaml new file mode 100644 index 00000000000..e23f795f93a --- /dev/null +++ b/Flow.Launcher/WelcomeWindow.xaml @@ -0,0 +1,15 @@ + + + diff --git a/Flow.Launcher/WelcomeWindow.xaml.cs b/Flow.Launcher/WelcomeWindow.xaml.cs new file mode 100644 index 00000000000..c946ae90026 --- /dev/null +++ b/Flow.Launcher/WelcomeWindow.xaml.cs @@ -0,0 +1,27 @@ +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 Flow.Launcher +{ + /// + /// WelcomeWindow.xaml에 대한 상호 작용 논리 + /// + public partial class WelcomeWindow : Window + { + public WelcomeWindow() + { + InitializeComponent(); + } + } +} From df9ddb06ac6e030f060cc9af85034962d7c2d557 Mon Sep 17 00:00:00 2001 From: DB p Date: Tue, 30 Nov 2021 16:06:30 +0900 Subject: [PATCH 02/43] Add Custom TitleBar --- Flow.Launcher/WelcomeWindow.xaml | 70 ++++++++++++++++++++++++++++- Flow.Launcher/WelcomeWindow.xaml.cs | 5 +++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/WelcomeWindow.xaml b/Flow.Launcher/WelcomeWindow.xaml index e23f795f93a..e8fdba4d042 100644 --- a/Flow.Launcher/WelcomeWindow.xaml +++ b/Flow.Launcher/WelcomeWindow.xaml @@ -9,7 +9,75 @@ Title="Welcome to Flow Launcher" Width="550" Height="650" + Background="{DynamicResource PopuBGColor}" + Foreground="{DynamicResource PopupTextColor}" + ResizeMode="NoResize" WindowStartupLocation="CenterScreen" mc:Ignorable="d"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Flow.Launcher/WelcomeWindow.xaml.cs b/Flow.Launcher/WelcomeWindow.xaml.cs index c946ae90026..e150afce633 100644 --- a/Flow.Launcher/WelcomeWindow.xaml.cs +++ b/Flow.Launcher/WelcomeWindow.xaml.cs @@ -23,5 +23,10 @@ public WelcomeWindow() { InitializeComponent(); } + + private void BtnCancel_OnClick(object sender, RoutedEventArgs e) + { + Close(); + } } } From 699bcfd8e5881859454413b641b2afc0238449b5 Mon Sep 17 00:00:00 2001 From: DB p Date: Tue, 30 Nov 2021 16:38:21 +0900 Subject: [PATCH 03/43] add button and adjust color --- Flow.Launcher/WelcomeWindow.xaml | 41 ++++++++++++++++++++++++++--- Flow.Launcher/WelcomeWindow.xaml.cs | 28 ++++++++++++++++++++ 2 files changed, 65 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher/WelcomeWindow.xaml b/Flow.Launcher/WelcomeWindow.xaml index e8fdba4d042..21137e1595a 100644 --- a/Flow.Launcher/WelcomeWindow.xaml +++ b/Flow.Launcher/WelcomeWindow.xaml @@ -5,15 +5,17 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Flow.Launcher" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:ui="http://schemas.modernwpf.com/2019" Name="FlowWelcomeWindow" Title="Welcome to Flow Launcher" Width="550" Height="650" - Background="{DynamicResource PopuBGColor}" + Background="{DynamicResource Color00B}" Foreground="{DynamicResource PopupTextColor}" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" mc:Ignorable="d"> + @@ -70,14 +72,45 @@ - + + + + + + + + + + - + +