mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
commit
132100512f
22 changed files with 1505 additions and 31 deletions
|
|
@ -39,6 +39,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
public string ResultFontWeight { get; set; }
|
||||
public string ResultFontStretch { get; set; }
|
||||
public bool UseGlyphIcons { get; set; } = true;
|
||||
public bool FirstLaunch { get; set; } = true;
|
||||
|
||||
public int CustomExplorerIndex { get; set; } = 0;
|
||||
|
||||
|
|
@ -134,7 +135,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
public bool EnableUpdateLog { get; set; }
|
||||
|
||||
public bool StartFlowLauncherOnSystemStartup { get; set; } = false;
|
||||
public bool HideOnStartup { get; set; }
|
||||
public bool HideOnStartup { get; set; } = true;
|
||||
bool _hideNotifyIcon { get; set; }
|
||||
public bool HideNotifyIcon
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
VerticalContentAlignment="Center"
|
||||
input:InputMethod.IsInputMethodEnabled="False"
|
||||
PreviewKeyDown="TbHotkey_OnPreviewKeyDown"
|
||||
TabIndex="100" />
|
||||
TabIndex="100"
|
||||
LostFocus="tbHotkey_LostFocus"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
@ -8,11 +8,16 @@ using Flow.Launcher.Core.Resource;
|
|||
using Flow.Launcher.Helper;
|
||||
using Flow.Launcher.Infrastructure.Hotkey;
|
||||
using Flow.Launcher.Plugin;
|
||||
using System.Threading;
|
||||
|
||||
namespace Flow.Launcher
|
||||
{
|
||||
public partial class HotkeyControl : UserControl
|
||||
{
|
||||
private Brush tbMsgForegroundColorOriginal;
|
||||
|
||||
private string tbMsgTextOriginal;
|
||||
|
||||
public HotkeyModel CurrentHotkey { get; private set; }
|
||||
public bool CurrentHotkeyAvailable { get; private set; }
|
||||
|
||||
|
|
@ -23,15 +28,22 @@ namespace Flow.Launcher
|
|||
public HotkeyControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
tbMsgTextOriginal = tbMsg.Text;
|
||||
tbMsgForegroundColorOriginal = tbMsg.Foreground;
|
||||
}
|
||||
|
||||
void TbHotkey_OnPreviewKeyDown(object sender, KeyEventArgs e)
|
||||
private CancellationTokenSource hotkeyUpdateSource;
|
||||
|
||||
private void TbHotkey_OnPreviewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
hotkeyUpdateSource?.Cancel();
|
||||
hotkeyUpdateSource?.Dispose();
|
||||
hotkeyUpdateSource = new();
|
||||
var token = hotkeyUpdateSource.Token;
|
||||
e.Handled = true;
|
||||
tbMsg.Visibility = Visibility.Hidden;
|
||||
|
||||
//when alt is pressed, the real key should be e.SystemKey
|
||||
Key key = (e.Key == Key.System ? e.SystemKey : e.Key);
|
||||
Key key = e.Key == Key.System ? e.SystemKey : e.Key;
|
||||
|
||||
SpecialKeyState specialKeyState = GlobalHotkey.Instance.CheckModifiers();
|
||||
|
||||
|
|
@ -49,14 +61,15 @@ namespace Flow.Launcher
|
|||
return;
|
||||
}
|
||||
|
||||
Dispatcher.InvokeAsync(async () =>
|
||||
_ = Dispatcher.InvokeAsync(async () =>
|
||||
{
|
||||
await Task.Delay(500);
|
||||
SetHotkey(hotkeyModel);
|
||||
await Task.Delay(500, token);
|
||||
if (!token.IsCancellationRequested)
|
||||
await SetHotkey(hotkeyModel);
|
||||
});
|
||||
}
|
||||
|
||||
public void SetHotkey(HotkeyModel keyModel, bool triggerValidate = true)
|
||||
public async Task SetHotkey(HotkeyModel keyModel, bool triggerValidate = true)
|
||||
{
|
||||
CurrentHotkey = keyModel;
|
||||
|
||||
|
|
@ -78,6 +91,13 @@ namespace Flow.Launcher
|
|||
}
|
||||
tbMsg.Visibility = Visibility.Visible;
|
||||
OnHotkeyChanged();
|
||||
|
||||
var token = hotkeyUpdateSource.Token;
|
||||
await Task.Delay(500, token);
|
||||
if (token.IsCancellationRequested)
|
||||
return;
|
||||
FocusManager.SetFocusedElement(FocusManager.GetFocusScope(this), null);
|
||||
Keyboard.ClearFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -88,9 +108,12 @@ namespace Flow.Launcher
|
|||
|
||||
private bool CheckHotkeyAvailability() => HotKeyMapper.CheckAvailability(CurrentHotkey);
|
||||
|
||||
public new bool IsFocused
|
||||
public new bool IsFocused => tbHotkey.IsFocused;
|
||||
|
||||
private void tbHotkey_LostFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
get { return tbHotkey.IsFocused; }
|
||||
tbMsg.Text = tbMsgTextOriginal;
|
||||
tbMsg.Foreground = tbMsgForegroundColorOriginal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Flow.Launcher/Images/page_img01.png
Normal file
BIN
Flow.Launcher/Images/page_img01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
BIN
Flow.Launcher/Images/wizard.png
Normal file
BIN
Flow.Launcher/Images/wizard.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.9 KiB |
|
|
@ -152,6 +152,7 @@
|
|||
<system:String x:Key="devtool">DevTools</system:String>
|
||||
<system:String x:Key="settingfolder">Setting Folder</system:String>
|
||||
<system:String x:Key="logfolder">Log Folder</system:String>
|
||||
<system:String x:Key="welcomewindow">Wizard</system:String>
|
||||
|
||||
<!-- FileManager Setting Dialog -->
|
||||
<system:String x:Key="fileManagerWindow">Select File Manager</system:String>
|
||||
|
|
@ -231,4 +232,40 @@
|
|||
<system:String x:Key="update_flowlauncher_update_files">Update files</system:String>
|
||||
<system:String x:Key="update_flowlauncher_update_upadte_description">Update description</system:String>
|
||||
|
||||
<!-- Welcome Window -->
|
||||
<system:String x:Key="Skip">Skip</system:String>
|
||||
<system:String x:Key="Welcome_Page1_Title">Welcome to Flow Launcher</system:String>
|
||||
<system:String x:Key="Welcome_Page1_Text01">Hello, this is the first time you are running Flow Launcher!</system:String>
|
||||
<system:String x:Key="Welcome_Page1_Text02">Before starting, this wizard will assist in setting up Flow Launcher. You can skip this if you wish. Please choose a language</system:String>
|
||||
<system:String x:Key="Welcome_Page2_Title">Search and run all files and applications on your PC</system:String>
|
||||
<system:String x:Key="Welcome_Page2_Text01">Search everything from applications, files, bookmarks, YouTube, Twitter and more. All from the comfort of your keyboard without ever touching the mouse.</system:String>
|
||||
<system:String x:Key="Welcome_Page2_Text02">Flow Launcher starts with the hotkey below, go ahead and try it out now. To change it, click on the input and press the desired hotkey on the keyboard.</system:String>
|
||||
<system:String x:Key="Welcome_Page3_Title">Hotkeys</system:String>
|
||||
<system:String x:Key="Welcome_Page4_Title">Action Keyword and Commands</system:String>
|
||||
<system:String x:Key="Welcome_Page4_Text01">Search the web, launch applications or run various functions through Flow Launcher plugins. Certain functions start with an action keyword, and if necessary, they can be used without action keywords. Try the queries below in Flow Launcher.</system:String>
|
||||
<system:String x:Key="Welcome_Page5_Title">Let's Start Flow Launcher</system:String>
|
||||
<system:String x:Key="Welcome_Page5_Text01">Finished. Enjoy Flow Launcher. Don't forget the hotkey to start :)</system:String>
|
||||
|
||||
<!-- General Guide & Hotkey -->
|
||||
|
||||
<system:String x:Key="HotkeyUpDownDesc">Back / Context Menu</system:String>
|
||||
<system:String x:Key="HotkeyLeftRightDesc">Item Navigation</system:String>
|
||||
<system:String x:Key="HotkeyShiftEnterDesc">Open Context Menu</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">Open Contaning Folder</system:String>
|
||||
<system:String x:Key="HotkeyCtrlShiftEnterDesc">Run as Admin</system:String>
|
||||
<system:String x:Key="HotkeyCtrlHDesc">Query History</system:String>
|
||||
<system:String x:Key="HotkeyESCDesc">Back to Result in Context Menu</system:String>
|
||||
<system:String x:Key="HotkeyRunDesc">Open / Run Selected Item</system:String>
|
||||
<system:String x:Key="HotkeyCtrlIDesc">Open Setting Window</system:String>
|
||||
<system:String x:Key="HotkeyF5Desc">Reload Plugin Data</system:String>
|
||||
|
||||
<system:String x:Key="RecommendWeather">Weather</system:String>
|
||||
<system:String x:Key="RecommendWeatherDesc">Weather in Google Result</system:String>
|
||||
<system:String x:Key="RecommendShell">> ping 8.8.8.8</system:String>
|
||||
<system:String x:Key="RecommendShellDesc">Shell Command</system:String>
|
||||
<system:String x:Key="RecommendBluetooth">Bluetooth</system:String>
|
||||
<system:String x:Key="RecommendBluetoothDesc">Bluetooth in Windows Setting</system:String>
|
||||
<system:String x:Key="RecommendAcronyms">sn</system:String>
|
||||
<system:String x:Key="RecommendAcronymsDesc">Sticky Notes</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
<!-- MainWindow -->
|
||||
<system:String x:Key="registerHotkeyFailed">핫키 등록 실패: {0}</system:String>
|
||||
<system:String x:Key="registerHotkeyFailed">단축키 등록 실패: {0}</system:String>
|
||||
<system:String x:Key="couldnotStartCmd">{0}을 실행할 수 없습니다.</system:String>
|
||||
<system:String x:Key="invalidFlowLauncherPluginFileFormat">Flow Launcher 플러그인 파일 형식이 유효하지 않습니다.</system:String>
|
||||
<system:String x:Key="setAsTopMostInThisQuery">이 쿼리의 최상위로 설정</system:String>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
<system:String x:Key="iconTrayExit">종료</system:String>
|
||||
<system:String x:Key="closeWindow">닫기</system:String>
|
||||
<system:String x:Key="GameMode">게임 모드</system:String>
|
||||
<system:String x:Key="GameModeToolTip">핫키 사용을 일시중단합니다.</system:String>
|
||||
<system:String x:Key="GameModeToolTip">단축키 사용을 일시중단합니다.</system:String>
|
||||
|
||||
<!-- Setting General -->
|
||||
<system:String x:Key="flowlauncher_settings">Flow Launcher 설정</system:String>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
<system:String x:Key="LastQuerySelected">직전 쿼리 내용 선택</system:String>
|
||||
<system:String x:Key="LastQueryEmpty">직전 쿼리 지우기</system:String>
|
||||
<system:String x:Key="maxShowResults">표시할 결과 수</system:String>
|
||||
<system:String x:Key="ignoreHotkeysOnFullscreen">전체화면 모드에서는 핫키 무시</system:String>
|
||||
<system:String x:Key="ignoreHotkeysOnFullscreen">전체화면 모드에서는 단축키 무시</system:String>
|
||||
<system:String x:Key="ignoreHotkeysOnFullscreenToolTip">게이머라면 켜는 것을 추천합니다.</system:String>
|
||||
<system:String x:Key="defaultFileManager">기본 파일관리자</system:String>
|
||||
<system:String x:Key="defaultFileManagerToolTip">폴더를 열 때 사용할 파일관리자를 선택하세요.</system:String>
|
||||
|
|
@ -97,20 +97,20 @@
|
|||
<system:String x:Key="AnimationTip">일부 UI에 애니메이션을 사용합니다.</system:String>
|
||||
|
||||
<!-- Setting Hotkey -->
|
||||
<system:String x:Key="hotkey">핫키</system:String>
|
||||
<system:String x:Key="flowlauncherHotkey">Flow Launcher 핫키</system:String>
|
||||
<system:String x:Key="hotkey">단축키</system:String>
|
||||
<system:String x:Key="flowlauncherHotkey">Flow Launcher 단축키</system:String>
|
||||
<system:String x:Key="flowlauncherHotkeyToolTip">Flow Launcher를 열 때 사용할 단축키를 입력합니다.</system:String>
|
||||
<system:String x:Key="openResultModifiers">결과 선택 단축키</system:String>
|
||||
<system:String x:Key="openResultModifiersToolTip">결과 목록을 선택하는 단축키입니다.</system:String>
|
||||
<system:String x:Key="showOpenResultHotkey">단축키 표시</system:String>
|
||||
<system:String x:Key="showOpenResultHotkeyToolTip">결과창에서 결과 선택 단축키를 표시합니다.</system:String>
|
||||
<system:String x:Key="customQueryHotkey">사용자지정 쿼리 핫키</system:String>
|
||||
<system:String x:Key="customQueryHotkey">사용자지정 쿼리 단축키</system:String>
|
||||
<system:String x:Key="customQuery">쿼리</system:String>
|
||||
<system:String x:Key="delete">삭제</system:String>
|
||||
<system:String x:Key="edit">편집</system:String>
|
||||
<system:String x:Key="add">추가</system:String>
|
||||
<system:String x:Key="pleaseSelectAnItem">항목을 선택하세요.</system:String>
|
||||
<system:String x:Key="deleteCustomHotkeyWarning">{0} 플러그인 핫키를 삭제하시겠습니까?</system:String>
|
||||
<system:String x:Key="deleteCustomHotkeyWarning">{0} 플러그인 단축키를 삭제하시겠습니까?</system:String>
|
||||
<system:String x:Key="queryWindowShadowEffect">그림자 효과</system:String>
|
||||
<system:String x:Key="shadowEffectCPUUsage">그림자 효과는 GPU를 사용합니다. 컴퓨터 퍼포먼스가 제한적인 경우 사용을 추천하지 않습니다.</system:String>
|
||||
<system:String x:Key="windowWidthSize">창 넓이</system:String>
|
||||
|
|
@ -152,6 +152,7 @@
|
|||
<system:String x:Key="devtool">개발자도구</system:String>
|
||||
<system:String x:Key="settingfolder">설정 폴더</system:String>
|
||||
<system:String x:Key="logfolder">로그 폴더</system:String>
|
||||
<system:String x:Key="welcomewindow">마법사</system:String>
|
||||
|
||||
<!-- FileManager Setting Dialog -->
|
||||
<system:String x:Key="fileManagerWindow">파일관리자 선택</system:String>
|
||||
|
|
@ -180,15 +181,15 @@
|
|||
<system:String x:Key="actionkeyword_tips">플러그인을 시작하는데 필요한 액션 키워드를 입력하세요. 액션 키워드를 지정하지 않으려면 *를 사용하세요. 이 경우 키워드를 입력하지 않아도 동작합니다.</system:String>
|
||||
|
||||
<!-- Custom Query Hotkey Dialog -->
|
||||
<system:String x:Key="customeQueryHotkeyTitle">커스텀 플러그인 핫키</system:String>
|
||||
<system:String x:Key="customeQueryHotkeyTitle">커스텀 플러그인 단축키</system:String>
|
||||
<system:String x:Key="customeQueryHotkeyTips">단축키를 지정하여 특정 쿼리를 자동으로 입력할 수 있습니다. 사용하고 싶은 단축키를 눌러 지정한 후, 사용할 쿼리를 입력하세요.</system:String>
|
||||
<system:String x:Key="preview">미리보기</system:String>
|
||||
<system:String x:Key="hotkeyIsNotUnavailable">핫키를 사용할 수 없습니다. 다른 핫키를 입력하세요.</system:String>
|
||||
<system:String x:Key="invalidPluginHotkey">플러그인 핫키가 유효하지 않습니다.</system:String>
|
||||
<system:String x:Key="hotkeyIsNotUnavailable">단축키를 사용할 수 없습니다. 다른 단축키를 입력하세요.</system:String>
|
||||
<system:String x:Key="invalidPluginHotkey">플러그인 단축키가 유효하지 않습니다.</system:String>
|
||||
<system:String x:Key="update">업데이트</system:String>
|
||||
|
||||
<!-- Hotkey Control -->
|
||||
<system:String x:Key="hotkeyUnavailable">핫키를 사용할 수 없습니다.</system:String>
|
||||
<system:String x:Key="hotkeyUnavailable">단축키를 사용할 수 없습니다.</system:String>
|
||||
|
||||
<!-- Crash Reporter -->
|
||||
<system:String x:Key="reportWindow_version">버전</system:String>
|
||||
|
|
@ -229,4 +230,41 @@
|
|||
<system:String x:Key="update_flowlauncher_update_files">업데이트 파일</system:String>
|
||||
<system:String x:Key="update_flowlauncher_update_upadte_description">업데이트 설명</system:String>
|
||||
|
||||
|
||||
<!-- Welcome Window -->
|
||||
<system:String x:Key="Skip">건너뛰기</system:String>
|
||||
<system:String x:Key="Welcome_Page1_Title">Flow Launcher에 오신 것을 환영합니다</system:String>
|
||||
<system:String x:Key="Welcome_Page1_Text01">안녕하세요, Flow Launcher를 처음 실행하시네요!</system:String>
|
||||
<system:String x:Key="Welcome_Page1_Text02">시작하기전에 이 마법사가 간단한 설정을 도와드릴겁니다. 물론 건너 뛰셔도 됩니다. 사용하시는 언어를 선택해주세요.</system:String>
|
||||
<system:String x:Key="Welcome_Page2_Title">PC에서 모든 파일과 프로그램을 검색하고 실행합니다</system:String>
|
||||
<system:String x:Key="Welcome_Page2_Text01">프로그램, 파일, 즐겨찾기, YouTube, Twitter 등 모든 것을 검색하세요. 마우스에 손대지 않고 키보드만으로 모든 것을 얻을 수 있습니다.</system:String>
|
||||
<system:String x:Key="Welcome_Page2_Text02">Flow는 아래의 단축키로 실행합니다. 변경하려면 입력창을 선택하고 키보드에서 원하는 단축키를 누릅니다.</system:String>
|
||||
<system:String x:Key="Welcome_Page3_Title">단축키</system:String>
|
||||
<system:String x:Key="Welcome_Page4_Title">액션 키워드와 명령어</system:String>
|
||||
<system:String x:Key="Welcome_Page4_Text01">Flow Launcher는 플러그인을 통해 웹 검색, 프로그램 실행, 다양한 기능을 실행합니다. 특정 기능은 액션 키워드로 시작하며, 필요한 경우 액션 키워드 없이 사용할 수 있습니다. Flow Launcher에서 아래 쿼리를 사용해 보세요.</system:String>
|
||||
<system:String x:Key="Welcome_Page5_Title">Flow Launcher를 시작합시다</system:String>
|
||||
<system:String x:Key="Welcome_Page5_Text01">끝났습니다. Flow Launcher를 즐겨주세요. 시작하는 단축키를 잊지마세요 :)</system:String>
|
||||
|
||||
<!-- General Guide & Hotkey -->
|
||||
|
||||
<system:String x:Key="HotkeyUpDownDesc">뒤로/ 콘텍스트 메뉴</system:String>
|
||||
<system:String x:Key="HotkeyLeftRightDesc">아이템 이동</system:String>
|
||||
<system:String x:Key="HotkeyShiftEnterDesc">콘텍스트 메뉴 열기</system:String>
|
||||
<system:String x:Key="HotkeyCtrlEnterDesc">포함된 폴더 열기</system:String>
|
||||
<system:String x:Key="HotkeyCtrlShiftEnterDesc">관리자 권한으로 실행</system:String>
|
||||
<system:String x:Key="HotkeyCtrlHDesc">검색 기록</system:String>
|
||||
<system:String x:Key="HotkeyESCDesc">콘텍스트 메뉴에서 뒤로 가기</system:String>
|
||||
<system:String x:Key="HotkeyRunDesc">선택한 아이템 열기</system:String>
|
||||
<system:String x:Key="HotkeyCtrlIDesc">설정창 열기</system:String>
|
||||
<system:String x:Key="HotkeyF5Desc">플러그인 데이터 새로고침</system:String>
|
||||
|
||||
<system:String x:Key="RecommendWeather">날씨</system:String>
|
||||
<system:String x:Key="RecommendWeatherDesc">구글 날씨 검색</system:String>
|
||||
<system:String x:Key="RecommendShell">> ping 8.8.8.8</system:String>
|
||||
<system:String x:Key="RecommendShellDesc">쉘 명령어</system:String>
|
||||
<system:String x:Key="RecommendBluetooth">블루투스</system:String>
|
||||
<system:String x:Key="RecommendBluetoothDesc">윈도우 블루투스 설정</system:String>
|
||||
<system:String x:Key="RecommendAcronyms">스메</system:String>
|
||||
<system:String x:Key="RecommendAcronymsDesc">스티커 메모</system:String>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
|
@ -65,6 +65,7 @@ namespace Flow.Launcher
|
|||
|
||||
private void OnLoaded(object sender, RoutedEventArgs _)
|
||||
{
|
||||
CheckFirstLaunch();
|
||||
HideStartup();
|
||||
// show notify icon when flowlauncher is hidden
|
||||
InitializeNotifyIcon();
|
||||
|
|
@ -232,6 +233,20 @@ namespace Flow.Launcher
|
|||
};
|
||||
}
|
||||
|
||||
private void CheckFirstLaunch()
|
||||
{
|
||||
if (_settings.FirstLaunch)
|
||||
{
|
||||
_settings.FirstLaunch = false;
|
||||
PluginManager.API.SaveAppAllSettings();
|
||||
OpenWelcomeWindow();
|
||||
}
|
||||
}
|
||||
private void OpenWelcomeWindow()
|
||||
{
|
||||
var WelcomeWindow = new WelcomeWindow(_settings);
|
||||
WelcomeWindow.Show();
|
||||
}
|
||||
private void ToggleGameMode()
|
||||
{
|
||||
if (_viewModel.GameModeStatus)
|
||||
|
|
|
|||
189
Flow.Launcher/Resources/Pages/WelcomePage1.xaml
Normal file
189
Flow.Launcher/Resources/Pages/WelcomePage1.xaml
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
<ui:Page
|
||||
x:Class="Flow.Launcher.Resources.Pages.WelcomePage1"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
Title="WelcomePage1"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<Style x:Key="StyleImageFadeIn" TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<!-- Fades-in the image when it becomes visible -->
|
||||
<Trigger Property="IsVisible" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<BeginStoryboard.Storyboard>
|
||||
<Storyboard x:Name="FadeIn">
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="(Canvas.Top)"
|
||||
From="105"
|
||||
To="95"
|
||||
Duration="0:0:1">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<QuadraticEase EasingMode="EaseOut" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
From="0"
|
||||
To="1"
|
||||
Duration="0:0:1">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<QuadraticEase EasingMode="EaseOut" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
</Storyboard>
|
||||
</BeginStoryboard.Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="StyleImageFadeInText" TargetType="{x:Type TextBlock}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsVisible" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<BeginStoryboard.Storyboard>
|
||||
<Storyboard x:Name="FadeIn">
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="(Canvas.Top)"
|
||||
From="110"
|
||||
To="100"
|
||||
Duration="0:0:1">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<QuadraticEase EasingMode="EaseOut" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
From="0"
|
||||
To="1"
|
||||
Duration="0:0:1">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<QuadraticEase EasingMode="EaseOut" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
</Storyboard>
|
||||
</BeginStoryboard.Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="WizardMove" TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsVisible" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<BeginStoryboard.Storyboard>
|
||||
<Storyboard x:Name="Move">
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="(Canvas.Bottom)"
|
||||
From="-150"
|
||||
To="0"
|
||||
Duration="0:0:2.5">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<QuadraticEase EasingMode="EaseOut" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
</Storyboard>
|
||||
</BeginStoryboard.Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Page.Resources>
|
||||
<ScrollViewer>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="250" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" HorizontalAlignment="Stretch">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
|
||||
<LinearGradientBrush.GradientStops>
|
||||
<GradientStop Offset="0.0" Color="#1494df" />
|
||||
<GradientStop Offset="1.0" Color="#1073bd" />
|
||||
</LinearGradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Canvas Width="550" Height="250">
|
||||
<Image
|
||||
Name="Logo"
|
||||
Canvas.Left="140"
|
||||
Width="60"
|
||||
Height="60"
|
||||
Source="../../images/app.png"
|
||||
Style="{DynamicResource StyleImageFadeIn}" />
|
||||
<TextBlock
|
||||
Canvas.Left="205"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="30"
|
||||
Foreground="White"
|
||||
Opacity="0"
|
||||
Style="{DynamicResource StyleImageFadeInText}">
|
||||
Flow Launcher
|
||||
</TextBlock>
|
||||
</Canvas>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
|
||||
<Canvas Grid.Row="1" Height="288">
|
||||
<Image
|
||||
Name="wizard"
|
||||
Canvas.Right="30"
|
||||
Canvas.Bottom="0"
|
||||
Width="60"
|
||||
Height="60"
|
||||
Source="../../images/wizard.png"
|
||||
Style="{DynamicResource WizardMove}" />
|
||||
|
||||
|
||||
<StackPanel Width="550" Margin="24,20,24,20">
|
||||
<StackPanel Margin="0,0,24,0">
|
||||
<TextBlock
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource Welcome_Page1_Title}" />
|
||||
<TextBlock
|
||||
Margin="0,10,24,0"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource Welcome_Page1_Text01}"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
<TextBlock
|
||||
Margin="0,10,24,0"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource Welcome_Page1_Text02}"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
<TextBlock
|
||||
Margin="0,30,0,0"
|
||||
FontSize="14"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource language}" />
|
||||
<ComboBox
|
||||
Width="200"
|
||||
Margin="0,10,0,0"
|
||||
DisplayMemberPath="Display"
|
||||
ItemsSource="{Binding Languages}"
|
||||
SelectedValue="{Binding CustomLanguage, Mode=TwoWay}"
|
||||
SelectedValuePath="LanguageCode" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
40
Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
Normal file
40
Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Navigation;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Core.Resource;
|
||||
|
||||
namespace Flow.Launcher.Resources.Pages
|
||||
{
|
||||
public partial class WelcomePage1
|
||||
{
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (e.ExtraData is Settings settings)
|
||||
Settings = settings;
|
||||
else
|
||||
throw new ArgumentException("Unexpected Navigation Parameter for Settings");
|
||||
InitializeComponent();
|
||||
}
|
||||
private Internationalization _translater => InternationalizationManager.Instance;
|
||||
public List<Language> Languages => _translater.LoadAvailableLanguages();
|
||||
|
||||
public Settings Settings { get; set; }
|
||||
|
||||
public string CustomLanguage
|
||||
{
|
||||
get
|
||||
{
|
||||
return Settings.Language;
|
||||
}
|
||||
set
|
||||
{
|
||||
InternationalizationManager.Instance.ChangeLanguage(value);
|
||||
|
||||
if (InternationalizationManager.Instance.PromptShouldUsePinyin(value))
|
||||
Settings.ShouldUsePinyin = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
124
Flow.Launcher/Resources/Pages/WelcomePage2.xaml
Normal file
124
Flow.Launcher/Resources/Pages/WelcomePage2.xaml
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
<ui:Page
|
||||
x:Class="Flow.Launcher.Resources.Pages.WelcomePage2"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="clr-namespace:Flow.Launcher.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:flowlauncher="clr-namespace:Flow.Launcher"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
Title="WelcomePage2"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<converters:BorderClipConverter x:Key="BorderClipConverter" />
|
||||
<Style x:Key="StyleImageFadeIn" TargetType="{x:Type Image}">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
<Style.Triggers>
|
||||
<!-- Fades-in the image when it becomes visible -->
|
||||
<Trigger Property="IsVisible" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<BeginStoryboard.Storyboard>
|
||||
<Storyboard x:Name="FadeIn">
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
To="1"
|
||||
Duration="0:0:2" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard.Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Page.Resources>
|
||||
<ScrollViewer>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="250" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" HorizontalAlignment="Stretch">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="1 0" EndPoint="0 1">
|
||||
<LinearGradientBrush.GradientStops>
|
||||
<GradientStop Offset="0.0" Color="#6e34a4" />
|
||||
<GradientStop Offset="1.0" Color="#ab58f8" />
|
||||
</LinearGradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="0"
|
||||
Background="{Binding PreviewBackground}">
|
||||
<StackPanel
|
||||
Margin="0,80,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border Width="450" Style="{DynamicResource WindowBorderStyle}">
|
||||
<Border Style="{DynamicResource WindowRadius}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="54" />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0">
|
||||
<TextBox
|
||||
IsReadOnly="True"
|
||||
Style="{DynamicResource QueryBoxStyle}"
|
||||
Text="{DynamicResource hiThere}" />
|
||||
|
||||
</Border>
|
||||
<Canvas Style="{DynamicResource SearchIconPosition}">
|
||||
<Path
|
||||
Margin="0"
|
||||
Data="{DynamicResource SearchIconImg}"
|
||||
Stretch="Fill"
|
||||
Style="{DynamicResource SearchIconStyle}" />
|
||||
</Canvas>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Row="1" Margin="24,20,24,20">
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource Welcome_Page2_Title}" />
|
||||
<TextBlock
|
||||
Margin="0,10,0,0"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource Welcome_Page2_Text01}"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
<TextBlock
|
||||
Margin="0,10,0,0"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource Welcome_Page2_Text02}"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
<TextBlock
|
||||
Margin="0,30,0,0"
|
||||
FontSize="14"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource flowlauncherHotkey}" />
|
||||
<flowlauncher:HotkeyControl
|
||||
x:Name="HotkeyControl"
|
||||
Width="300"
|
||||
Height="35"
|
||||
Margin="-206,10,0,0"
|
||||
GotFocus="HotkeyControl_OnGotFocus"
|
||||
LostFocus="HotkeyControl_OnLostFocus"/>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
52
Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
Normal file
52
Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using Flow.Launcher.Helper;
|
||||
using Flow.Launcher.Infrastructure.Hotkey;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
namespace Flow.Launcher.Resources.Pages
|
||||
{
|
||||
public partial class WelcomePage2
|
||||
{
|
||||
private Settings Settings { get; set; }
|
||||
|
||||
private Brush tbMsgForegroundColorOriginal;
|
||||
|
||||
private string tbMsgTextOriginal;
|
||||
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (e.ExtraData is Settings settings)
|
||||
Settings = settings;
|
||||
else
|
||||
throw new ArgumentException("Unexpected Parameter setting.");
|
||||
|
||||
InitializeComponent();
|
||||
tbMsgTextOriginal = HotkeyControl.tbMsg.Text;
|
||||
tbMsgForegroundColorOriginal = HotkeyControl.tbMsg.Foreground;
|
||||
|
||||
HotkeyControl.SetHotkey(new Infrastructure.Hotkey.HotkeyModel(Settings.Hotkey), false);
|
||||
}
|
||||
private void HotkeyControl_OnGotFocus(object sender, RoutedEventArgs args)
|
||||
{
|
||||
HotKeyMapper.RemoveHotkey(Settings.Hotkey);
|
||||
}
|
||||
private void HotkeyControl_OnLostFocus(object sender, RoutedEventArgs args)
|
||||
{
|
||||
if (HotkeyControl.CurrentHotkeyAvailable)
|
||||
{
|
||||
HotKeyMapper.SetHotkey(HotkeyControl.CurrentHotkey, HotKeyMapper.OnToggleHotkey);
|
||||
Settings.Hotkey = HotkeyControl.CurrentHotkey.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
HotKeyMapper.SetHotkey(new HotkeyModel(Settings.Hotkey), HotKeyMapper.OnToggleHotkey);
|
||||
}
|
||||
|
||||
HotkeyControl.tbMsg.Text = tbMsgTextOriginal;
|
||||
HotkeyControl.tbMsg.Foreground = tbMsgForegroundColorOriginal;
|
||||
}
|
||||
}
|
||||
}
|
||||
307
Flow.Launcher/Resources/Pages/WelcomePage3.xaml
Normal file
307
Flow.Launcher/Resources/Pages/WelcomePage3.xaml
Normal file
|
|
@ -0,0 +1,307 @@
|
|||
<ui:Page
|
||||
x:Class="Flow.Launcher.Resources.Pages.WelcomePage3"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="WelcomePage3"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<Style x:Key="KbdLine" TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="8" />
|
||||
<Setter Property="Margin" Value="0,4,0,4" />
|
||||
<Setter Property="Background" Value="{DynamicResource Color01B}" />
|
||||
</Style>
|
||||
<Style x:Key="Kbd" TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="4" />
|
||||
<Setter Property="Padding" Value="12,4,12,4" />
|
||||
<Setter Property="Background" Value="{DynamicResource Color00B}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource Color18B}" />
|
||||
<Setter Property="BorderThickness" Value="1,1,1,2" />
|
||||
</Style>
|
||||
<Style x:Key="KbdText" TargetType="TextBlock">
|
||||
<Setter Property="TextAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
||||
</Style>
|
||||
</Page.Resources>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" HorizontalAlignment="Stretch">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
|
||||
<LinearGradientBrush.GradientStops>
|
||||
<GradientStop Offset="0.0" Color="#16af7b" />
|
||||
<GradientStop Offset="1.0" Color="#34c191" />
|
||||
</LinearGradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Image
|
||||
Width="300"
|
||||
Height="100"
|
||||
Margin="0,0,0,0"
|
||||
Source="../../images/page_img02.png"
|
||||
Style="{DynamicResource StyleImageFadeIn}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<ScrollViewer
|
||||
Grid.Row="1"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<Grid>
|
||||
<StackPanel Margin="24,20,24,20">
|
||||
<StackPanel Margin="0,0,0,20">
|
||||
<TextBlock
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource Welcome_Page3_Title}" />
|
||||
</StackPanel>
|
||||
<Border Style="{DynamicResource KbdLine}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel
|
||||
Width="210"
|
||||
Margin="20,5,4,5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border Margin="0,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}">←</TextBlock>
|
||||
</Border>
|
||||
<TextBlock VerticalAlignment="Center">,</TextBlock>
|
||||
<Border Margin="5,0,0,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}">→</TextBlock>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
Text="{DynamicResource HotkeyUpDownDesc}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource KbdLine}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel
|
||||
Width="210"
|
||||
Margin="20,5,4,5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border Margin="0,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}">↑</TextBlock>
|
||||
</Border>
|
||||
<TextBlock VerticalAlignment="Center">,</TextBlock>
|
||||
<Border Margin="5,0,0,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}">↓</TextBlock>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
Text="{DynamicResource HotkeyLeftRightDesc}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource KbdLine}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel
|
||||
Width="210"
|
||||
Margin="20,5,4,5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border Margin="0,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}">Enter</TextBlock>
|
||||
</Border>
|
||||
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
Text="{DynamicResource HotkeyRunDesc}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource KbdLine}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel
|
||||
Width="210"
|
||||
Margin="20,5,4,5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border Margin="0,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="ESC" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
Text="{DynamicResource HotkeyESCDesc}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource KbdLine}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel
|
||||
Width="210"
|
||||
Margin="20,5,4,5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border Margin="0,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="Shift" />
|
||||
</Border>
|
||||
<TextBlock VerticalAlignment="Center">+</TextBlock>
|
||||
<Border Margin="5,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="ENTER" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
Text="{DynamicResource HotkeyShiftEnterDesc}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource KbdLine}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel
|
||||
Width="210"
|
||||
Margin="20,5,4,5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border Margin="0,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="Ctrl" />
|
||||
</Border>
|
||||
<TextBlock VerticalAlignment="Center">+</TextBlock>
|
||||
<Border Margin="5,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="ENTER" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
Text="{DynamicResource HotkeyCtrlEnterDesc}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource KbdLine}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel
|
||||
Width="210"
|
||||
Margin="20,5,4,5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border Margin="0,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="Ctrl" />
|
||||
</Border>
|
||||
<TextBlock VerticalAlignment="Center">+</TextBlock>
|
||||
<Border Margin="5,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="Shift" />
|
||||
</Border>
|
||||
<TextBlock VerticalAlignment="Center">+</TextBlock>
|
||||
<Border Margin="5,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="ENTER" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
Text="{DynamicResource HotkeyCtrlShiftEnterDesc}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource KbdLine}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel
|
||||
Width="210"
|
||||
Margin="20,5,4,5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border Margin="0,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="Ctrl" />
|
||||
</Border>
|
||||
<TextBlock VerticalAlignment="Center">+</TextBlock>
|
||||
<Border Margin="5,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="H" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
Text="{DynamicResource HotkeyCtrlHDesc}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource KbdLine}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel
|
||||
Width="210"
|
||||
Margin="20,5,4,5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border Margin="0,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="Ctrl" />
|
||||
</Border>
|
||||
<TextBlock VerticalAlignment="Center">+</TextBlock>
|
||||
<Border Margin="5,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="I" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
Text="{DynamicResource HotkeyCtrlIDesc}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource KbdLine}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel
|
||||
Width="210"
|
||||
Margin="20,5,4,5"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border Margin="0,0,5,0" Style="{DynamicResource Kbd}">
|
||||
<TextBlock Style="{DynamicResource KbdText}" Text="F5" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="13"
|
||||
Text="{DynamicResource HotkeyF5Desc}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
20
Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
Normal file
20
Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Windows.Navigation;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
|
||||
namespace Flow.Launcher.Resources.Pages
|
||||
{
|
||||
public partial class WelcomePage3
|
||||
{
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (e.ExtraData is Settings settings)
|
||||
Settings = settings;
|
||||
else if(Settings is null)
|
||||
throw new ArgumentException("Unexpected Navigation Parameter for Settings");
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public Settings Settings { get; set; }
|
||||
}
|
||||
}
|
||||
136
Flow.Launcher/Resources/Pages/WelcomePage4.xaml
Normal file
136
Flow.Launcher/Resources/Pages/WelcomePage4.xaml
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
<ui:Page
|
||||
x:Class="Flow.Launcher.Resources.Pages.WelcomePage4"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="WelcomePage4"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<Style x:Key="StyleImageFadeIn" TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsVisible" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<BeginStoryboard.Storyboard>
|
||||
<Storyboard x:Name="Move">
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="(Canvas.Left)"
|
||||
From="0"
|
||||
To="100"
|
||||
Duration="0:0:20">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<QuadraticEase EasingMode="EaseOut" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
</Storyboard>
|
||||
</BeginStoryboard.Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="RecommendQuery" TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="8" />
|
||||
<Setter Property="Padding" Value="20,7,12,7" />
|
||||
<Setter Property="Margin" Value="4,4,4,4" />
|
||||
<Setter Property="Background" Value="{DynamicResource Color01B}" />
|
||||
</Style>
|
||||
<Style x:Key="QueryText" TargetType="TextBlock">
|
||||
<Setter Property="TextAlignment" Value="Left" />
|
||||
<Setter Property="TextAlignment" Value="Left" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
||||
</Style>
|
||||
<Style x:Key="ResultText" TargetType="TextBlock">
|
||||
<Setter Property="TextAlignment" Value="Left" />
|
||||
<Setter Property="TextAlignment" Value="Left" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Margin" Value="0,4,0,0" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource Color04B}" />
|
||||
</Style>
|
||||
</Page.Resources>
|
||||
<ScrollViewer>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="250" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" HorizontalAlignment="Stretch">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
|
||||
<LinearGradientBrush.GradientStops>
|
||||
<GradientStop Offset="0.0" Color="#e8457c" />
|
||||
<GradientStop Offset="1.0" Color="#bc1948" />
|
||||
</LinearGradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Canvas
|
||||
Width="600"
|
||||
Height="301"
|
||||
ClipToBounds="True">
|
||||
<Image
|
||||
Name="Logo"
|
||||
Canvas.Left="0"
|
||||
Width="450"
|
||||
Height="280"
|
||||
Margin="0,0,0,0"
|
||||
Source="../../images/page_img01.png"
|
||||
Style="{DynamicResource StyleImageFadeIn}" />
|
||||
</Canvas>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Row="1" Margin="24,20,24,20">
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource Welcome_Page4_Title}" />
|
||||
<TextBlock
|
||||
Margin="0,10,0,10"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource Welcome_Page4_Text01}"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
<UniformGrid
|
||||
Margin="0,14,0,0"
|
||||
Columns="2"
|
||||
Rows="2">
|
||||
<Border Style="{DynamicResource RecommendQuery}">
|
||||
<StackPanel>
|
||||
<TextBlock Style="{DynamicResource QueryText}" Text="{DynamicResource RecommendWeather}" />
|
||||
<TextBlock Style="{DynamicResource ResultText}" Text="{DynamicResource RecommendWeatherDesc}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{DynamicResource RecommendQuery}">
|
||||
<StackPanel>
|
||||
<TextBlock Style="{DynamicResource QueryText}" Text="{DynamicResource RecommendShell}" />
|
||||
<TextBlock Style="{DynamicResource ResultText}" Text="{DynamicResource RecommendShellDesc}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{DynamicResource RecommendQuery}">
|
||||
<StackPanel>
|
||||
<TextBlock Style="{DynamicResource QueryText}" Text="{DynamicResource RecommendBluetooth}" />
|
||||
<TextBlock Style="{DynamicResource ResultText}" Text="{DynamicResource RecommendBluetoothDesc}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{DynamicResource RecommendQuery}">
|
||||
<StackPanel>
|
||||
<TextBlock Style="{DynamicResource QueryText}" Text="{DynamicResource RecommendAcronyms}" />
|
||||
<TextBlock Style="{DynamicResource ResultText}" Text="{DynamicResource RecommendAcronymsDesc}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
20
Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
Normal file
20
Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using System;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
namespace Flow.Launcher.Resources.Pages
|
||||
{
|
||||
public partial class WelcomePage4
|
||||
{
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (e.ExtraData is Settings settings)
|
||||
Settings = settings;
|
||||
else
|
||||
throw new ArgumentException("Unexpected Navigation Parameter for Settings");
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public Settings Settings { get; set; }
|
||||
}
|
||||
}
|
||||
122
Flow.Launcher/Resources/Pages/WelcomePage5.xaml
Normal file
122
Flow.Launcher/Resources/Pages/WelcomePage5.xaml
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
<ui:Page
|
||||
x:Class="Flow.Launcher.Resources.Pages.WelcomePage5"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
|
||||
Title="WelcomePage5"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
DataContext="{Binding RelativeSource={RelativeSource Self}}"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<Style x:Key="StyleImageFadeIn" TargetType="{x:Type Image}">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
<Style.Triggers>
|
||||
<!-- Fades-in the image when it becomes visible -->
|
||||
<Trigger Property="IsVisible" Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<BeginStoryboard.Storyboard>
|
||||
<Storyboard x:Name="FadeIn">
|
||||
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="(Canvas.Top)"
|
||||
From="110"
|
||||
To="75"
|
||||
Duration="0:0:1">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<QuadraticEase EasingMode="EaseOut" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
From="0"
|
||||
To="1"
|
||||
Duration="0:0:1">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<QuadraticEase EasingMode="EaseOut" />
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
</Storyboard>
|
||||
</BeginStoryboard.Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Page.Resources>
|
||||
<ScrollViewer>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="250" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" HorizontalAlignment="Stretch">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="0 0" EndPoint="1 1">
|
||||
<LinearGradientBrush.GradientStops>
|
||||
<GradientStop Offset="0.0" Color="#7b83eb" />
|
||||
<GradientStop Offset="1.0" Color="#555dc0" />
|
||||
</LinearGradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<Canvas Width="550" Height="250">
|
||||
<Image
|
||||
Name="Logo"
|
||||
Canvas.Left="225"
|
||||
Width="100"
|
||||
Height="100"
|
||||
Source="../../images/app.png"
|
||||
Style="{DynamicResource StyleImageFadeIn}" />
|
||||
</Canvas>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Row="1" Margin="24,20,24,20">
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
FontSize="20"
|
||||
FontWeight="SemiBold"
|
||||
Text="{DynamicResource Welcome_Page5_Title}" />
|
||||
<TextBlock
|
||||
Margin="0,10,0,0"
|
||||
FontSize="14"
|
||||
Text="{DynamicResource Welcome_Page5_Text01}"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
<StackPanel Margin="0,30,0,0" Orientation="Horizontal">
|
||||
<CheckBox
|
||||
Checked="OnAutoStartupChecked"
|
||||
Content="{DynamicResource startFlowLauncherOnSystemStartup}"
|
||||
IsChecked="{Binding Settings.StartFlowLauncherOnSystemStartup}"
|
||||
Style="{DynamicResource DefaultCheckBoxStyle}"
|
||||
Unchecked="OnAutoStartupUncheck" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0,0,0,0" Orientation="Horizontal">
|
||||
<CheckBox
|
||||
Checked="OnHideOnStartupChecked"
|
||||
Content="{DynamicResource hideOnStartup}"
|
||||
IsChecked="{Binding Settings.HideOnStartup}"
|
||||
Style="{DynamicResource DefaultCheckBoxStyle}"
|
||||
Unchecked="OnHideOnStartupUnchecked" />
|
||||
</StackPanel>
|
||||
<Button
|
||||
Width="150"
|
||||
Height="40"
|
||||
Margin="0,60,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Click="BtnCancel_OnClick"
|
||||
Content="{DynamicResource done}"
|
||||
Style="{DynamicResource AccentButtonStyle}" />
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</ui:Page>
|
||||
63
Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
Normal file
63
Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Microsoft.Win32;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
|
||||
namespace Flow.Launcher.Resources.Pages
|
||||
{
|
||||
public partial class WelcomePage5
|
||||
{
|
||||
private const string StartupPath = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
|
||||
public Settings Settings { get; set; }
|
||||
public bool HideOnStartup { get; set; }
|
||||
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (e.ExtraData is Settings settings)
|
||||
Settings = settings;
|
||||
else
|
||||
throw new ArgumentException("Unexpected Navigation Parameter for Settings");
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void OnAutoStartupChecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SetStartup();
|
||||
}
|
||||
private void OnAutoStartupUncheck(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RemoveStartup();
|
||||
}
|
||||
|
||||
private void RemoveStartup()
|
||||
{
|
||||
using var key = Registry.CurrentUser.OpenSubKey(StartupPath, true);
|
||||
key?.DeleteValue(Constant.FlowLauncher, false);
|
||||
Settings.StartFlowLauncherOnSystemStartup = false;
|
||||
}
|
||||
private void SetStartup()
|
||||
{
|
||||
using var key = Registry.CurrentUser.OpenSubKey(StartupPath, true);
|
||||
key?.SetValue(Constant.FlowLauncher, Constant.ExecutablePath);
|
||||
Settings.StartFlowLauncherOnSystemStartup = true;
|
||||
}
|
||||
|
||||
private void OnHideOnStartupChecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Settings.HideOnStartup = true;
|
||||
}
|
||||
private void OnHideOnStartupUnchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Settings.HideOnStartup = false;
|
||||
}
|
||||
|
||||
private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var window = Window.GetWindow(this);
|
||||
window.Close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1991,8 +1991,8 @@
|
|||
<RowDefinition Height="80" />
|
||||
<RowDefinition Height="146" />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="250" />
|
||||
<RowDefinition Height="70" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="50" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
|
|
@ -2018,8 +2018,9 @@
|
|||
Margin="0,0,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
HorizontalContentAlignment="Right"
|
||||
HotkeyChanged="OnHotkeyChanged"
|
||||
Loaded="OnHotkeyControlLoaded" />
|
||||
GotFocus="OnHotkeyControlFocused"
|
||||
Loaded="OnHotkeyControlLoaded"
|
||||
LostFocus="OnHotkeyControlFocusLost" />
|
||||
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
|
|
@ -2482,6 +2483,10 @@
|
|||
Margin="0,0,-20,0"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Margin="0,0,12,0"
|
||||
Click="OpenWelcomeWindow"
|
||||
Content="{DynamicResource welcomewindow}" />
|
||||
<Button
|
||||
Margin="0,0,12,0"
|
||||
Click="OpenSettingFolder"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using Flow.Launcher.Core.Plugin;
|
|||
using Flow.Launcher.Core.Resource;
|
||||
using Flow.Launcher.Helper;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Infrastructure.Hotkey;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Plugin;
|
||||
using Flow.Launcher.Plugin.SharedCommands;
|
||||
|
|
@ -115,8 +116,8 @@ namespace Flow.Launcher
|
|||
|
||||
private void OnSelectFileManagerClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow(settings);
|
||||
fileManagerChangeWindow.ShowDialog();
|
||||
SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow(settings);
|
||||
fileManagerChangeWindow.ShowDialog();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
@ -128,15 +129,23 @@ namespace Flow.Launcher
|
|||
HotkeyControl.SetHotkey(viewModel.Settings.Hotkey, false);
|
||||
}
|
||||
|
||||
void OnHotkeyChanged(object sender, EventArgs e)
|
||||
private void OnHotkeyControlFocused(object sender, RoutedEventArgs e)
|
||||
{
|
||||
HotKeyMapper.RemoveHotkey(settings.Hotkey);
|
||||
}
|
||||
|
||||
private void OnHotkeyControlFocusLost(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (HotkeyControl.CurrentHotkeyAvailable)
|
||||
{
|
||||
|
||||
HotKeyMapper.SetHotkey(HotkeyControl.CurrentHotkey, HotKeyMapper.OnToggleHotkey);
|
||||
HotKeyMapper.RemoveHotkey(settings.Hotkey);
|
||||
settings.Hotkey = HotkeyControl.CurrentHotkey.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
HotKeyMapper.SetHotkey(new HotkeyModel(settings.Hotkey), HotKeyMapper.OnToggleHotkey);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDeleteCustomHotkeyClick(object sender, RoutedEventArgs e)
|
||||
|
|
@ -275,6 +284,11 @@ namespace Flow.Launcher
|
|||
PluginManager.API.OpenDirectory(Path.Combine(DataLocation.DataDirectory(), Constant.Settings));
|
||||
}
|
||||
|
||||
private void OpenWelcomeWindow(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var WelcomeWindow = new WelcomeWindow(settings);
|
||||
WelcomeWindow.Show();
|
||||
}
|
||||
private void OpenLogFolder(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PluginManager.API.OpenDirectory(Path.Combine(DataLocation.DataDirectory(), Constant.Logs, Constant.Version));
|
||||
|
|
|
|||
157
Flow.Launcher/WelcomeWindow.xaml
Normal file
157
Flow.Launcher/WelcomeWindow.xaml
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
<Window
|
||||
x:Class="Flow.Launcher.WelcomeWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
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"
|
||||
Activated="OnActivated"
|
||||
Width="550"
|
||||
Height="650"
|
||||
MouseDown="window_MouseDown"
|
||||
Background="{DynamicResource Color00B}"
|
||||
Foreground="{DynamicResource PopupTextColor}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<!--#region TitleBar-->
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
|
||||
</WindowChrome.WindowChrome>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="80" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image
|
||||
Grid.Column="0"
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="10,4,4,4"
|
||||
RenderOptions.BitmapScalingMode="HighQuality"
|
||||
Source="/Images/app.png" />
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="4,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource Color05B}"
|
||||
Text="Welcome to Flow Launcher" />
|
||||
|
||||
<Button
|
||||
Grid.Column="4"
|
||||
Click="BtnCancel_OnClick"
|
||||
Style="{StaticResource TitleBarCloseButtonStyle}">
|
||||
<Path
|
||||
Width="46"
|
||||
Height="32"
|
||||
Data="M 18,11 27,20 M 18,20 27,11"
|
||||
Stroke="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
||||
StrokeThickness="1">
|
||||
<Path.Style>
|
||||
<Style TargetType="Path">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Path.Style>
|
||||
</Path>
|
||||
</Button>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!--#endregion-->
|
||||
<StackPanel Margin="0">
|
||||
<ui:Frame
|
||||
x:Name="ContentFrame"
|
||||
HorizontalAlignment="Stretch"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Visible"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Visible">
|
||||
<ui:Frame.ContentTransitions>
|
||||
<ui:TransitionCollection>
|
||||
<ui:NavigationThemeTransition />
|
||||
</ui:TransitionCollection>
|
||||
</ui:Frame.ContentTransitions>
|
||||
</ui:Frame>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Background="{DynamicResource Color00B}"
|
||||
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
|
||||
BorderThickness="0,1,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="130" />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="130" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
Name="PageNavigation"
|
||||
Margin="0,2,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
Text="{Binding PageDisplay, Mode=OneWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"
|
||||
TextAlignment="Center" />
|
||||
</StackPanel>
|
||||
|
||||
<Button
|
||||
x:Name="SkipButton"
|
||||
Grid.Column="0"
|
||||
Width="100"
|
||||
Height="40"
|
||||
Margin="20,5,0,5"
|
||||
Click="BtnCancel_OnClick"
|
||||
Content="{DynamicResource Skip}"
|
||||
DockPanel.Dock="Right"
|
||||
FontSize="14" />
|
||||
<DockPanel
|
||||
Grid.Column="2"
|
||||
Margin="0,0,20,0"
|
||||
VerticalAlignment="Stretch">
|
||||
<Button
|
||||
x:Name="NextButton"
|
||||
Width="40"
|
||||
Height="40"
|
||||
Margin="8,5,0,5"
|
||||
Click="ForwardButton_Click"
|
||||
Content=""
|
||||
DockPanel.Dock="Right"
|
||||
FontFamily="/Resources/#Segoe Fluent Icons"
|
||||
FontSize="18" />
|
||||
<Button
|
||||
x:Name="BackButton"
|
||||
Width="40"
|
||||
Height="40"
|
||||
Click="BackwardButton_Click"
|
||||
Content=""
|
||||
DockPanel.Dock="Right"
|
||||
FontFamily="/Resources/#Segoe Fluent Icons"
|
||||
FontSize="18" />
|
||||
<StackPanel />
|
||||
</DockPanel>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Window>
|
||||
110
Flow.Launcher/WelcomeWindow.xaml.cs
Normal file
110
Flow.Launcher/WelcomeWindow.xaml.cs
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Controls;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using Flow.Launcher.Resources.Pages;
|
||||
using ModernWpf.Media.Animation;
|
||||
|
||||
namespace Flow.Launcher
|
||||
{
|
||||
public partial class WelcomeWindow : Window
|
||||
{
|
||||
private readonly Settings settings;
|
||||
|
||||
public WelcomeWindow(Settings settings)
|
||||
{
|
||||
InitializeComponent();
|
||||
BackButton.IsEnabled = false;
|
||||
this.settings = settings;
|
||||
ContentFrame.Navigate(PageTypeSelector(1), settings);
|
||||
}
|
||||
|
||||
private NavigationTransitionInfo _transitionInfo = new SlideNavigationTransitionInfo()
|
||||
{
|
||||
Effect = SlideNavigationTransitionEffect.FromRight
|
||||
};
|
||||
private NavigationTransitionInfo _backTransitionInfo = new SlideNavigationTransitionInfo()
|
||||
{
|
||||
Effect = SlideNavigationTransitionEffect.FromLeft
|
||||
};
|
||||
|
||||
private int pageNum = 1;
|
||||
private int MaxPage = 5;
|
||||
public string PageDisplay => $"{pageNum}/5";
|
||||
|
||||
private void UpdateView()
|
||||
{
|
||||
PageNavigation.Text = PageDisplay;
|
||||
if (pageNum == 1)
|
||||
{
|
||||
BackButton.IsEnabled = false;
|
||||
NextButton.IsEnabled = true;
|
||||
}
|
||||
else if (pageNum == MaxPage)
|
||||
{
|
||||
BackButton.IsEnabled = true;
|
||||
NextButton.IsEnabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
BackButton.IsEnabled = true;
|
||||
NextButton.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void ForwardButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
pageNum++;
|
||||
UpdateView();
|
||||
|
||||
ContentFrame.Navigate(PageTypeSelector(pageNum), settings, _transitionInfo);
|
||||
}
|
||||
|
||||
private void BackwardButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (pageNum > 1)
|
||||
{
|
||||
pageNum--;
|
||||
UpdateView();
|
||||
ContentFrame.Navigate(PageTypeSelector(pageNum), settings, _backTransitionInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
BackButton.IsEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private static Type PageTypeSelector(int pageNumber)
|
||||
{
|
||||
return pageNumber switch
|
||||
{
|
||||
1 => typeof(WelcomePage1),
|
||||
2 => typeof(WelcomePage2),
|
||||
3 => typeof(WelcomePage3),
|
||||
4 => typeof(WelcomePage4),
|
||||
5 => typeof(WelcomePage5),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(pageNumber), pageNumber, "Unexpected Page Number")
|
||||
};
|
||||
}
|
||||
|
||||
private void window_MouseDown(object sender, MouseButtonEventArgs e) /* for close hotkey popup */
|
||||
{
|
||||
if (Keyboard.FocusedElement is not TextBox textBox)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var tRequest = new TraversalRequest(FocusNavigationDirection.Next);
|
||||
textBox.MoveFocus(tRequest);
|
||||
}
|
||||
private void OnActivated(object sender, EventArgs e)
|
||||
{
|
||||
Keyboard.ClearFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue