Skip to content

Commit 3785a90

Browse files
committed
Add WelcomeWindow and temp menu in tray to test
1 parent d8773b8 commit 3785a90

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ private void UpdateNotifyIconText()
171171
((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("GameMode");
172172
((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings");
173173
((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit");
174+
((MenuItem)menu.Items[5]).Header = "Welcome Window"; /*Temp*/
174175
}
175176

176177
private void InitializeNotifyIcon()
@@ -204,17 +205,23 @@ private void InitializeNotifyIcon()
204205
{
205206
Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit")
206207
};
208+
var WelcomeWindow = new MenuItem /*Temp*/
209+
{
210+
Header = "Welcome Window"
211+
};
207212

208213
open.Click += (o, e) => _viewModel.ToggleFlowLauncher();
209214
gamemode.Click += (o, e) => ToggleGameMode();
210215
settings.Click += (o, e) => App.API.OpenSettingDialog();
211216
exit.Click += (o, e) => Close();
217+
WelcomeWindow.Click += (o, e) => OpenWelcomeWindow(); /*Temp*/
212218
contextMenu.Items.Add(header);
213219
contextMenu.Items.Add(open);
214220
gamemode.ToolTip = InternationalizationManager.Instance.GetTranslation("GameModeToolTip");
215221
contextMenu.Items.Add(gamemode);
216222
contextMenu.Items.Add(settings);
217223
contextMenu.Items.Add(exit);
224+
contextMenu.Items.Add(WelcomeWindow); /*Temp*/
218225

219226
_notifyIcon.ContextMenuStrip = new ContextMenuStrip(); // it need for close the context menu. if not, context menu can't close.
220227
_notifyIcon.MouseClick += (o, e) =>
@@ -232,6 +239,11 @@ private void InitializeNotifyIcon()
232239
};
233240
}
234241

242+
private void OpenWelcomeWindow()
243+
{
244+
Flow.Launcher.WelcomeWindow WelcomeWindow = new Flow.Launcher.WelcomeWindow();
245+
WelcomeWindow.Show();
246+
}
235247
private void ToggleGameMode()
236248
{
237249
if (_viewModel.GameModeStatus)

Flow.Launcher/WelcomeWindow.xaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Window
2+
x:Class="Flow.Launcher.WelcomeWindow"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:local="clr-namespace:Flow.Launcher"
7+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8+
Name="FlowWelcomeWindow"
9+
Title="Welcome to Flow Launcher"
10+
Width="550"
11+
Height="650"
12+
WindowStartupLocation="CenterScreen"
13+
mc:Ignorable="d">
14+
<Grid />
15+
</Window>

Flow.Launcher/WelcomeWindow.xaml.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Shapes;
14+
15+
namespace Flow.Launcher
16+
{
17+
/// <summary>
18+
/// WelcomeWindow.xaml에 대한 상호 작용 논리
19+
/// </summary>
20+
public partial class WelcomeWindow : Window
21+
{
22+
public WelcomeWindow()
23+
{
24+
InitializeComponent();
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)