mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add File Manager Item and popup window
This commit is contained in:
parent
fac8b76485
commit
6a2d7fc146
4 changed files with 111 additions and 0 deletions
58
Flow.Launcher/SelectFileManagerWindow.xaml
Normal file
58
Flow.Launcher/SelectFileManagerWindow.xaml
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<Window x:Class="Flow.Launcher.SelectFileManagerWindow"
|
||||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Flow.Launcher"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="SelectFileManagerWindow" Height="450" Width="500" ResizeMode="NoResize" Background="#f3f3f3">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="80"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Row="0" VerticalAlignment="Center">
|
||||
<TextBlock Grid.Column="0" FontFamily="/Resources/#Segoe Fluent Icons" FontSize="40" TextAlignment="Center"
|
||||
Margin="0 0 0 0">
|
||||

|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<Border Background="#ffffff" Grid.Row="1" BorderBrush="#cecece" BorderThickness="1" Margin="14 0 14 0" Padding="0 14 0 0" CornerRadius="5">
|
||||
<StackPanel Orientation="Vertical" >
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
|
||||
<TextBlock FontSize="14" Grid.Column="1" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left" Text="{DynamicResource currentPriority}" />
|
||||
<TextBlock x:Name="OldPriority" Grid.Row="0" Grid.Column="1" Margin="14 0 10 0" FontSize="14"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Center">
|
||||
<TextBlock FontSize="14" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right" Text="{DynamicResource newPriority}" />
|
||||
<TextBox x:Name="tbAction" Margin="14 10 15 10" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" />
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<StackPanel Grid.Row="2" VerticalAlignment="Center">
|
||||
<TextBlock Foreground="Gray"
|
||||
Text="{DynamicResource priority_tips}" TextWrapping="WrapWithOverflow" TextAlignment="Center"
|
||||
Margin="20,0,20,0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="3" Grid.Column="1">
|
||||
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="0 0 10 0" Width="80" Height="30"
|
||||
Content="{DynamicResource cancel}" />
|
||||
<Button x:Name="btnDone" Margin="10 0 0 0" Width="80" Height="30" Click="btnDone_OnClick">
|
||||
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
27
Flow.Launcher/SelectFileManagerWindow.xaml.cs
Normal file
27
Flow.Launcher/SelectFileManagerWindow.xaml.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Flow.Launcher
|
||||
{
|
||||
/// <summary>
|
||||
/// SelectFileManagerWindow.xaml에 대한 상호 작용 논리
|
||||
/// </summary>
|
||||
public partial class SelectFileManagerWindow : Window
|
||||
{
|
||||
public SelectFileManagerWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -587,6 +587,26 @@
|
|||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource SettingGroupBox}" Margin="0 30 0 0" BorderThickness="0">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
<TextBlock Grid.Column="1" Text="Default File Manager"
|
||||
VerticalAlignment="Center" />
|
||||
<TextBlock Text="Select the file manager to use when opening the folder."
|
||||
Style="{DynamicResource SettingSubTitleLabel}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<Button Margin="10 0 18 0" MaxWidth="200" Width="120"
|
||||
Content="Explorer" Click="OnSelectFileManagerClick"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock FontFamily="/Resources/#Segoe Fluent Icons" FontSize="20"
|
||||
Grid.Column="0" VerticalAlignment="Center" Margin="24 0 16 0">
|
||||

|
||||
</TextBlock>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
|
||||
<Border Style="{DynamicResource SettingGroupBox}" Margin="0 30 0 0">
|
||||
<ItemsControl Style="{StaticResource SettingGrid}">
|
||||
<StackPanel Style="{StaticResource TextPanel}">
|
||||
|
|
|
|||
|
|
@ -115,6 +115,12 @@ namespace Flow.Launcher
|
|||
}
|
||||
}
|
||||
|
||||
private void OnSelectFileManagerClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow();
|
||||
fileManagerChangeWindow.ShowDialog();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Hotkey
|
||||
|
|
|
|||
Loading…
Reference in a new issue