Add Welcome Images and Adjust Pages

This commit is contained in:
DB p 2021-12-01 04:38:57 +09:00
parent 65fe8917f1
commit e2ff4c285d
11 changed files with 522 additions and 74 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View file

@ -6,14 +6,93 @@
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="WelcomePage1"
d:DesignHeight="450"
d:DesignWidth="800"
Background="#cecece"
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="Opacity"
To="1"
Duration="0:0:2" />
</Storyboard>
</BeginStoryboard.Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
</Trigger>
</Style.Triggers>
</Style>
</Page.Resources>
<ScrollViewer>
<Grid>
<TextBlock>Page1</TextBlock>
<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">
<Image
Name="Logo"
Width="60"
Height="60"
Source="../../images/app.png"
Style="{DynamicResource StyleImageFadeIn}" />
<TextBlock
Margin="12,0,0,0"
VerticalAlignment="Center"
FontSize="30"
Foreground="White">
Flow Launcher
</TextBlock>
</StackPanel>
</Border>
<StackPanel Grid.Row="1" Margin="24,20,24,20">
<StackPanel>
<TextBlock FontSize="20" FontWeight="SemiBold">Welcome to Flow Launcher</TextBlock>
<TextBlock
Margin="0,10,0,0"
FontSize="14"
TextWrapping="WrapWithOverflow">
Hello, It's your first time to run a Flow Launcher!
</TextBlock>
<TextBlock
Margin="0,10,0,0"
FontSize="14"
TextWrapping="WrapWithOverflow">
Before starting, proceed with a simple setting. Surely, You can skip. Please choose the language you use.
</TextBlock>
<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 Language}"
SelectedValuePath="LanguageCode" />
</StackPanel>
</StackPanel>
</Grid>
</ScrollViewer>
</Page>

View file

@ -9,9 +9,16 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.IO;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Flow.Launcher.Infrastructure.UserSettings;
using System.Windows.Interop;
using Microsoft.Win32;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.ViewModel;
namespace Flow.Launcher.Resources.Pages
{
@ -22,6 +29,7 @@ namespace Flow.Launcher.Resources.Pages
{
public WelcomePage1()
{
InitializeComponent();
}
}

View file

@ -2,16 +2,128 @@
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"
d:DataContext="{d:DesignInstance vm:SettingWindowViewModel}"
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>
<TextBlock>Page2</TextBlock>
<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>
<!--
<Border Grid.Row="1" Margin="0,0,0,0">
<Rectangle
Width="Auto"
HorizontalAlignment="Stretch"
Style="{DynamicResource SeparatorStyle}"
Visibility="Visible" />
</Border>
<ContentControl Grid.Row="2">
<flowlauncher:ResultListBox DataContext="{Binding PreviewResults, Mode=OneTime}" Visibility="Visible" />
</ContentControl>-->
</Grid>
</Border>
</Border>
</StackPanel>
</StackPanel>
</Border>
<StackPanel Grid.Row="1" Margin="24,20,24,20">
<StackPanel>
<TextBlock FontSize="20" FontWeight="SemiBold">Search and run everything in everywhere</TextBlock>
<TextBlock
Margin="0,10,0,0"
FontSize="14"
TextWrapping="WrapWithOverflow">
To start Flow, start with the hotkey below. To change, select input and press the wanted hotkey in keyboard.
</TextBlock>
<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" />
</StackPanel>
</StackPanel>
</Grid>
</ScrollViewer>
</Page>

View file

@ -9,6 +9,70 @@
d:DesignHeight="450"
d:DesignWidth="800"
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="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>
<Grid />
<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="500"
Height="300"
Margin="0,30,0,0"
Source="../../images/page_img02.png" />
</StackPanel>
</Border>
<StackPanel Grid.Row="1" Margin="24,20,24,20">
<StackPanel>
<TextBlock FontSize="20" FontWeight="SemiBold">Hotkeys and Commands</TextBlock>
<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>
<TextBlock
Margin="0,10,0,0"
FontSize="14"
TextWrapping="WrapWithOverflow" />
</StackPanel>
</StackPanel>
</Grid>
</ScrollViewer>
</Page>

View file

@ -1,14 +1,57 @@
<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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="WelcomePage4">
<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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="WelcomePage4"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<ScrollViewer>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="250" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid>
</Grid>
<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">
<Image
Name="Logo"
Width="450"
Height="300"
Margin="0,20,0,0"
Source="../../images/page_img01.png" />
</StackPanel>
</Border>
<StackPanel Grid.Row="1" Margin="24,20,24,20">
<StackPanel>
<TextBlock FontSize="20" FontWeight="SemiBold">Action Keyword</TextBlock>
<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>
<TextBlock
Margin="0,10,0,0"
FontSize="14"
TextWrapping="WrapWithOverflow" />
</StackPanel>
</StackPanel>
</Grid>
</ScrollViewer>
</Page>

View file

@ -1,14 +1,109 @@
<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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher.Resources.Pages"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="WelcomePage5">
<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:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"
Title="WelcomePage5"
d:DesignHeight="450"
d:DesignWidth="800"
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="Opacity"
To="1"
Duration="0:0:2">
<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>
<Grid>
</Grid>
<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">
<Image
Name="Logo"
Width="90"
Height="90"
Source="../../images/app.png"
Style="{DynamicResource StyleImageFadeIn}" />
</StackPanel>
</Border>
<StackPanel Grid.Row="1" Margin="24,20,24,20">
<StackPanel>
<TextBlock FontSize="20" FontWeight="SemiBold">Let's Start Flow Launcher</TextBlock>
<TextBlock
Margin="0,10,0,0"
FontSize="14"
TextWrapping="WrapWithOverflow">
Finished. Enjoy Flow Launcher. Don't forget the hotkey to start :)
</TextBlock>
<StackPanel Margin="0,30,0,0" Orientation="Horizontal">
<CheckBox IsChecked="{Binding Settings.HideOnStartup}" Style="{DynamicResource DefaultCheckBoxStyle}" />
<TextBlock
Margin="0,5,0,0"
FontSize="14"
FontWeight="SemiBold"
Text="{DynamicResource hideOnStartup}" />
</StackPanel>
<StackPanel Margin="0,0,0,0" Orientation="Horizontal">
<CheckBox
Checked="OnAutoStartupChecked"
IsChecked="{Binding Settings.StartFlowLauncherOnSystemStartup}"
Style="{DynamicResource DefaultCheckBoxStyle}"
Unchecked="OnAutoStartupUncheck" />
<TextBlock
Margin="0,5,0,0"
FontSize="14"
FontWeight="SemiBold"
Text="{DynamicResource startFlowLauncherOnSystemStartup}" />
</StackPanel>
<Button
Width="150"
Height="40"
Margin="0,60,0,0"
HorizontalAlignment="Right"
Content="Done!"
Style="{DynamicResource AccentButtonStyle}" />
</StackPanel>
</StackPanel>
</Grid>
</ScrollViewer>
</Page>

View file

@ -9,9 +9,15 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.IO;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Flow.Launcher.Infrastructure.UserSettings;
using System.Windows.Interop;
using Microsoft.Win32;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.ViewModel;
namespace Flow.Launcher.Resources.Pages
{
@ -20,9 +26,33 @@ namespace Flow.Launcher.Resources.Pages
/// </summary>
public partial class WelcomePage5 : Page
{
private const string StartupPath = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
public WelcomePage5()
{
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);
}
public static void SetStartup()
{
using var key = Registry.CurrentUser.OpenSubKey(StartupPath, true);
key?.SetValue(Constant.FlowLauncher, Constant.ExecutablePath);
}
}
}

View file

@ -91,28 +91,64 @@
Background="{DynamicResource Color00B}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
BorderThickness="0,1,0,0">
<DockPanel>
<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="1/5"
TextAlignment="Center" />
</StackPanel>
<Button
x:Name="NextButton"
Width="50"
Height="50"
Margin="10,5,28,5"
Click="ForwardButton_Click"
Content="&#xe76c;"
x:Name="SkipButton"
Grid.Column="0"
Width="100"
Height="40"
Margin="20,5,0,5"
Click="BtnCancel_OnClick"
Content="Skip"
DockPanel.Dock="Right"
FontFamily="/Resources/#Segoe Fluent Icons"
FontSize="22" />
<Button
x:Name="BackButton"
Width="50"
Height="50"
Click="BackwardButton_Click"
Content="&#xe76b;"
DockPanel.Dock="Right"
FontFamily="/Resources/#Segoe Fluent Icons"
FontSize="22" />
<StackPanel />
</DockPanel>
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="&#xe76c;"
DockPanel.Dock="Right"
FontFamily="/Resources/#Segoe Fluent Icons"
FontSize="18" />
<Button
x:Name="BackButton"
Width="40"
Height="40"
Click="BackwardButton_Click"
Content="&#xe76b;"
DockPanel.Dock="Right"
FontFamily="/Resources/#Segoe Fluent Icons"
FontSize="18" />
<StackPanel />
</DockPanel>
</Grid>
</Border>
</Grid>
</Window>

View file

@ -9,6 +9,7 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using ModernWpf.Media.Animation;
@ -17,38 +18,16 @@ using WelcomePages = Flow.Launcher.Resources.Pages;
namespace Flow.Launcher
{
/// <summary>
/// WelcomeWindow.xaml에 대한 상호 작용 논리
/// </summary>
public partial class WelcomeWindow : Window
{
public WelcomeWindow()
{
InitializeComponent();
//ContentFrame.Navigate(typeof(SamplePages.SamplePage1));
ContentFrame.Navigate(typeof(WelcomePages.WelcomePage1));
BackButton.IsEnabled = false;
}
private int page;
private int MaxPage = 5;
/*public int Page
{
get { return this.page; }
set
{
this.page = value;
if (this.page == 1)
{
this.BackButton.IsEnabled = false;
}
else
{
this.BackButton.IsEnabled = true;
};
}
}
*/
private void ButtonDisabler()
{
@ -69,9 +48,11 @@ namespace Flow.Launcher
}
}
private NavigationTransitionInfo _transitionInfo = new SlideNavigationTransitionInfo() { Effect = SlideNavigationTransitionEffect.FromRight };
Storyboard sb = new Storyboard();
private static Type PageSelector(int a)
{
switch (a)
{
case 0: