Add Hotkey Data & List Style

This commit is contained in:
DB p 2021-12-01 07:03:44 +09:00
parent 16dc99686f
commit 39b626749c
3 changed files with 109 additions and 9 deletions

View file

@ -244,4 +244,22 @@
<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="Hotkey01">U+2B60, U+2B62</system:String>
<system:String x:Key="Hotkey01Action">Back / Context Menu</system:String>
<system:String x:Key="Hotkey02">U+2B61, U+2B63</system:String>
<system:String x:Key="Hotkey02Action">Item Navigation</system:String>
<system:String x:Key="Hotkey03">Shift+Enter</system:String>
<system:String x:Key="Hotkey03Action">Open Context Menu</system:String>
<system:String x:Key="Hotkey04">Ctrl+Enter</system:String>
<system:String x:Key="Hotkey04Action">Open Contaning Folder</system:String>
<system:String x:Key="Hotkey05">Ctrl+Shift+Enter</system:String>
<system:String x:Key="Hotkey05Action">Run as Admin</system:String>
<system:String x:Key="Hotkey06">Ctrl+C</system:String>
<system:String x:Key="Hotkey06Action">Copy File Path</system:String>
<system:String x:Key="Hotkey07">Ctrl+H</system:String>
<system:String x:Key="Hotkey07Action">Query History</system:String>
<system:String x:Key="Hotkey08">ESC</system:String>
<system:String x:Key="Hotkey08Action">Back to Result in Context Menu</system:String>
</ResourceDictionary>

View file

@ -10,6 +10,43 @@
d:DesignWidth="800"
mc:Ignorable="d">
<Page.Resources>
<Style x:Key="HotKeyPopupListStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="Focusable" Value="False" />
<Setter Property="IsHitTestVisible" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border Padding="14,8,4,8">
<DockPanel LastChildFill="True">
<TextBlock
Margin="0,0,12,0"
DockPanel.Dock="Left"
FontSize="13"
FontWeight="SemiBold"
Style="{DynamicResource ItemTitleStyle}"
Text="{Binding Path=strHotkey}"
TextAlignment="Left" />
<TextBlock
Margin="0,0,12,0"
FontSize="13"
Style="{DynamicResource ItemSubTitleStyle}"
Text="{Binding Path=strHotkeyAction}" />
</DockPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
<Setter Property="Background" Value="Transparent" />
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter Property="Background" Value="#10828282" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="StyleImageFadeIn" TargetType="{x:Type Image}">
<Setter Property="Opacity" Value="0" />
<Style.Triggers>
@ -63,12 +100,13 @@
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource Welcome_Page3_Title}" />
<TextBlock
Margin="0,10,0,0"
FontSize="14"
TextWrapping="WrapWithOverflow">
You can search the web or run various functions. Certain functions start with the expression action keyword, and if necessary, they can be used without action keywords. Type &quot;youtube bts&quot; in querybox.
</TextBlock>
<ListBox
x:Name="HotkeyList"
Padding="0,0,0,0"
AlternationCount="2"
Background="Transparent"
DockPanel.Dock="Right"
ItemContainerStyle="{DynamicResource HotKeyPopupListStyle}" />
<TextBlock
Margin="0,10,0,0"
FontSize="14"

View file

@ -6,6 +6,7 @@ using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using Flow.Launcher.Core.Resource;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
@ -15,14 +16,57 @@ using System.Windows.Shapes;
namespace Flow.Launcher.Resources.Pages
{
/// <summary>
/// WelcomePage3.xaml에 대한 상호 작용 논리
/// </summary>
public partial class WelcomePage3 : Page
{
public WelcomePage3()
{
InitializeComponent();
}
public string strHotkey { get; set; }
public string strHotkeyAction { get; set; }
private List<WelcomePage3> HotkeyListData()
{
List<WelcomePage3> list = new List<WelcomePage3>();
list.Add(new WelcomePage3()
{
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey01")),
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey01Action"))
});
list.Add(new WelcomePage3()
{
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey02")),
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey02Action"))
});
list.Add(new WelcomePage3()
{
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey03")),
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey03Action"))
});
list.Add(new WelcomePage3()
{
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey04")),
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey04Action"))
});
list.Add(new WelcomePage3()
{
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey05")),
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey05Action"))
});
list.Add(new WelcomePage3()
{
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey07")),
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey07Action"))
});
list.Add(new WelcomePage3()
{
strHotkey = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey08")),
strHotkeyAction = string.Format(InternationalizationManager.Instance.GetTranslation("Hotkey08Action"))
});
return list;
}
}
}