diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 4c694b55a45..6bf9c2ff010 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -39,6 +39,7 @@ public string Language 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 @@ public string QuerySearchPrecisionString 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 { diff --git a/Flow.Launcher/HotkeyControl.xaml b/Flow.Launcher/HotkeyControl.xaml index 94cdc6703e5..9b5f671d8f5 100644 --- a/Flow.Launcher/HotkeyControl.xaml +++ b/Flow.Launcher/HotkeyControl.xaml @@ -50,6 +50,7 @@ VerticalContentAlignment="Center" input:InputMethod.IsInputMethodEnabled="False" PreviewKeyDown="TbHotkey_OnPreviewKeyDown" - TabIndex="100" /> + TabIndex="100" + LostFocus="tbHotkey_LostFocus"/> \ No newline at end of file diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs index 2b6e275df92..9ba7c43681f 100644 --- a/Flow.Launcher/HotkeyControl.xaml.cs +++ b/Flow.Launcher/HotkeyControl.xaml.cs @@ -8,11 +8,16 @@ 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 @@ public partial class HotkeyControl : UserControl 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 @@ void TbHotkey_OnPreviewKeyDown(object sender, KeyEventArgs e) 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 @@ public void SetHotkey(HotkeyModel keyModel, bool triggerValidate = true) } 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 @@ public void SetHotkey(string keyStr, bool triggerValidate = true) 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; } } -} +} \ No newline at end of file diff --git a/Flow.Launcher/Images/page_img01.png b/Flow.Launcher/Images/page_img01.png new file mode 100644 index 00000000000..fdc411898cb Binary files /dev/null and b/Flow.Launcher/Images/page_img01.png differ diff --git a/Flow.Launcher/Images/wizard.png b/Flow.Launcher/Images/wizard.png new file mode 100644 index 00000000000..155de20bde5 Binary files /dev/null and b/Flow.Launcher/Images/wizard.png differ diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 5dc040004a5..926ed558b6c 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -152,6 +152,7 @@ DevTools Setting Folder Log Folder + Wizard Select File Manager @@ -231,4 +232,40 @@ Update files Update description + + Skip + Welcome to Flow Launcher + Hello, this is the first time you are running Flow Launcher! + Before starting, this wizard will assist in setting up Flow Launcher. You can skip this if you wish. Please choose a language + Search and run all files and applications on your PC + Search everything from applications, files, bookmarks, YouTube, Twitter and more. All from the comfort of your keyboard without ever touching the mouse. + 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. + Hotkeys + Action Keyword and Commands + 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. + Let's Start Flow Launcher + Finished. Enjoy Flow Launcher. Don't forget the hotkey to start :) + + + + Back / Context Menu + Item Navigation + Open Context Menu + Open Contaning Folder + Run as Admin + Query History + Back to Result in Context Menu + Open / Run Selected Item + Open Setting Window + Reload Plugin Data + + Weather + Weather in Google Result + > ping 8.8.8.8 + Shell Command + Bluetooth + Bluetooth in Windows Setting + sn + Sticky Notes + diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml index 237d632ae87..66d101a5a46 100644 --- a/Flow.Launcher/Languages/ko.xaml +++ b/Flow.Launcher/Languages/ko.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib"> - 핫키 등록 실패: {0} + 단축키 등록 실패: {0} {0}을 실행할 수 없습니다. Flow Launcher 플러그인 파일 형식이 유효하지 않습니다. 이 쿼리의 최상위로 설정 @@ -16,7 +16,7 @@ 종료 닫기 게임 모드 - 핫키 사용을 일시중단합니다. + 단축키 사용을 일시중단합니다. Flow Launcher 설정 @@ -34,7 +34,7 @@ 직전 쿼리 내용 선택 직전 쿼리 지우기 표시할 결과 수 - 전체화면 모드에서는 핫키 무시 + 전체화면 모드에서는 단축키 무시 게이머라면 켜는 것을 추천합니다. 기본 파일관리자 폴더를 열 때 사용할 파일관리자를 선택하세요. @@ -97,20 +97,20 @@ 일부 UI에 애니메이션을 사용합니다. - 핫키 - Flow Launcher 핫키 + 단축키 + Flow Launcher 단축키 Flow Launcher를 열 때 사용할 단축키를 입력합니다. 결과 선택 단축키 결과 목록을 선택하는 단축키입니다. 단축키 표시 결과창에서 결과 선택 단축키를 표시합니다. - 사용자지정 쿼리 핫키 + 사용자지정 쿼리 단축키 쿼리 삭제 편집 추가 항목을 선택하세요. - {0} 플러그인 핫키를 삭제하시겠습니까? + {0} 플러그인 단축키를 삭제하시겠습니까? 그림자 효과 그림자 효과는 GPU를 사용합니다. 컴퓨터 퍼포먼스가 제한적인 경우 사용을 추천하지 않습니다. 창 넓이 @@ -152,6 +152,7 @@ 개발자도구 설정 폴더 로그 폴더 + 마법사 파일관리자 선택 @@ -180,15 +181,15 @@ 플러그인을 시작하는데 필요한 액션 키워드를 입력하세요. 액션 키워드를 지정하지 않으려면 *를 사용하세요. 이 경우 키워드를 입력하지 않아도 동작합니다. - 커스텀 플러그인 핫키 + 커스텀 플러그인 단축키 단축키를 지정하여 특정 쿼리를 자동으로 입력할 수 있습니다. 사용하고 싶은 단축키를 눌러 지정한 후, 사용할 쿼리를 입력하세요. 미리보기 - 핫키를 사용할 수 없습니다. 다른 핫키를 입력하세요. - 플러그인 핫키가 유효하지 않습니다. + 단축키를 사용할 수 없습니다. 다른 단축키를 입력하세요. + 플러그인 단축키가 유효하지 않습니다. 업데이트 - 핫키를 사용할 수 없습니다. + 단축키를 사용할 수 없습니다. 버전 @@ -229,4 +230,41 @@ 업데이트 파일 업데이트 설명 + + + 건너뛰기 + Flow Launcher에 오신 것을 환영합니다 + 안녕하세요, Flow Launcher를 처음 실행하시네요! + 시작하기전에 이 마법사가 간단한 설정을 도와드릴겁니다. 물론 건너 뛰셔도 됩니다. 사용하시는 언어를 선택해주세요. + PC에서 모든 파일과 프로그램을 검색하고 실행합니다 + 프로그램, 파일, 즐겨찾기, YouTube, Twitter 등 모든 것을 검색하세요. 마우스에 손대지 않고 키보드만으로 모든 것을 얻을 수 있습니다. + Flow는 아래의 단축키로 실행합니다. 변경하려면 입력창을 선택하고 키보드에서 원하는 단축키를 누릅니다. + 단축키 + 액션 키워드와 명령어 + Flow Launcher는 플러그인을 통해 웹 검색, 프로그램 실행, 다양한 기능을 실행합니다. 특정 기능은 액션 키워드로 시작하며, 필요한 경우 액션 키워드 없이 사용할 수 있습니다. Flow Launcher에서 아래 쿼리를 사용해 보세요. + Flow Launcher를 시작합시다 + 끝났습니다. Flow Launcher를 즐겨주세요. 시작하는 단축키를 잊지마세요 :) + + + + 뒤로/ 콘텍스트 메뉴 + 아이템 이동 + 콘텍스트 메뉴 열기 + 포함된 폴더 열기 + 관리자 권한으로 실행 + 검색 기록 + 콘텍스트 메뉴에서 뒤로 가기 + 선택한 아이템 열기 + 설정창 열기 + 플러그인 데이터 새로고침 + + 날씨 + 구글 날씨 검색 + > ping 8.8.8.8 + 쉘 명령어 + 블루투스 + 윈도우 블루투스 설정 + 스메 + 스티커 메모 + \ No newline at end of file diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index ba0b63a5211..c27cccd5c8a 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -65,6 +65,7 @@ private void OnInitialized(object sender, EventArgs e) private void OnLoaded(object sender, RoutedEventArgs _) { + CheckFirstLaunch(); HideStartup(); // show notify icon when flowlauncher is hidden InitializeNotifyIcon(); @@ -232,6 +233,20 @@ private void InitializeNotifyIcon() }; } + 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) diff --git a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml new file mode 100644 index 00000000000..1728195bde9 --- /dev/null +++ b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Flow Launcher + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs new file mode 100644 index 00000000000..98fb47288ea --- /dev/null +++ b/Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs @@ -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 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; + } + } + + } +} \ No newline at end of file diff --git a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml new file mode 100644 index 00000000000..033f9fe6606 --- /dev/null +++ b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs new file mode 100644 index 00000000000..a433611f605 --- /dev/null +++ b/Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs @@ -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; + } + } +} \ No newline at end of file diff --git a/Flow.Launcher/Resources/Pages/WelcomePage3.xaml b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml new file mode 100644 index 00000000000..b424af3d8eb --- /dev/null +++ b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + Enter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs new file mode 100644 index 00000000000..9051e7c2798 --- /dev/null +++ b/Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs @@ -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; } + } +} diff --git a/Flow.Launcher/Resources/Pages/WelcomePage4.xaml b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml new file mode 100644 index 00000000000..13f0030860f --- /dev/null +++ b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs new file mode 100644 index 00000000000..11bbcd6ed22 --- /dev/null +++ b/Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs @@ -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; } + } +} diff --git a/Flow.Launcher/Resources/Pages/WelcomePage5.xaml b/Flow.Launcher/Resources/Pages/WelcomePage5.xaml new file mode 100644 index 00000000000..c898ac9a02e --- /dev/null +++ b/Flow.Launcher/Resources/Pages/WelcomePage5.xaml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +