Skip to content

Commit 6a2d7fc

Browse files
committed
Add File Manager Item and popup window
1 parent fac8b76 commit 6a2d7fc

File tree

4 files changed

+111
-0
lines changed

4 files changed

+111
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<Window x:Class="Flow.Launcher.SelectFileManagerWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:Flow.Launcher"
7+
mc:Ignorable="d"
8+
WindowStartupLocation="CenterScreen"
9+
Title="SelectFileManagerWindow" Height="450" Width="500" ResizeMode="NoResize" Background="#f3f3f3">
10+
<Grid>
11+
<Grid.RowDefinitions>
12+
<RowDefinition />
13+
<RowDefinition />
14+
<RowDefinition />
15+
<RowDefinition Height="80"/>
16+
</Grid.RowDefinitions>
17+
<Grid.ColumnDefinitions>
18+
<ColumnDefinition />
19+
</Grid.ColumnDefinitions>
20+
<StackPanel Grid.Row="0" VerticalAlignment="Center">
21+
<TextBlock Grid.Column="0" FontFamily="/Resources/#Segoe Fluent Icons" FontSize="40" TextAlignment="Center"
22+
Margin="0 0 0 0">
23+
&#xe8d0;
24+
</TextBlock>
25+
</StackPanel>
26+
27+
<Border Background="#ffffff" Grid.Row="1" BorderBrush="#cecece" BorderThickness="1" Margin="14 0 14 0" Padding="0 14 0 0" CornerRadius="5">
28+
<StackPanel Orientation="Vertical" >
29+
30+
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
31+
<TextBlock FontSize="14" Grid.Column="1" VerticalAlignment="Center"
32+
HorizontalAlignment="Left" Text="{DynamicResource currentPriority}" />
33+
<TextBlock x:Name="OldPriority" Grid.Row="0" Grid.Column="1" Margin="14 0 10 0" FontSize="14"
34+
VerticalAlignment="Center" HorizontalAlignment="Left" FontWeight="Bold" />
35+
</StackPanel>
36+
37+
<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Center">
38+
<TextBlock FontSize="14" VerticalAlignment="Center"
39+
HorizontalAlignment="Right" Text="{DynamicResource newPriority}" />
40+
<TextBox x:Name="tbAction" Margin="14 10 15 10" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" />
41+
</StackPanel>
42+
43+
</StackPanel>
44+
</Border>
45+
<StackPanel Grid.Row="2" VerticalAlignment="Center">
46+
<TextBlock Foreground="Gray"
47+
Text="{DynamicResource priority_tips}" TextWrapping="WrapWithOverflow" TextAlignment="Center"
48+
Margin="20,0,20,0"/>
49+
</StackPanel>
50+
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="3" Grid.Column="1">
51+
<Button x:Name="btnCancel" Click="BtnCancel_OnClick" Margin="0 0 10 0" Width="80" Height="30"
52+
Content="{DynamicResource cancel}" />
53+
<Button x:Name="btnDone" Margin="10 0 0 0" Width="80" Height="30" Click="btnDone_OnClick">
54+
<TextBlock x:Name="lblAdd" Text="{DynamicResource done}" />
55+
</Button>
56+
</StackPanel>
57+
</Grid>
58+
</Window>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Shapes;
14+
15+
namespace Flow.Launcher
16+
{
17+
/// <summary>
18+
/// SelectFileManagerWindow.xaml에 대한 상호 작용 논리
19+
/// </summary>
20+
public partial class SelectFileManagerWindow : Window
21+
{
22+
public SelectFileManagerWindow()
23+
{
24+
InitializeComponent();
25+
}
26+
}
27+
}

Flow.Launcher/SettingWindow.xaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,26 @@
587587
</StackPanel>
588588
</Border>
589589

590+
<Border Style="{DynamicResource SettingGroupBox}" Margin="0 30 0 0" BorderThickness="0">
591+
<ItemsControl Style="{StaticResource SettingGrid}">
592+
<StackPanel Style="{StaticResource TextPanel}">
593+
<TextBlock Grid.Column="1" Text="Default File Manager"
594+
VerticalAlignment="Center" />
595+
<TextBlock Text="Select the file manager to use when opening the folder."
596+
Style="{DynamicResource SettingSubTitleLabel}" />
597+
</StackPanel>
598+
<StackPanel Grid.Column="2" Orientation="Horizontal">
599+
<Button Margin="10 0 18 0" MaxWidth="200" Width="120"
600+
Content="Explorer" Click="OnSelectFileManagerClick"/>
601+
</StackPanel>
602+
603+
<TextBlock FontFamily="/Resources/#Segoe Fluent Icons" FontSize="20"
604+
Grid.Column="0" VerticalAlignment="Center" Margin="24 0 16 0">
605+
&#xe838;
606+
</TextBlock>
607+
</ItemsControl>
608+
</Border>
609+
590610
<Border Style="{DynamicResource SettingGroupBox}" Margin="0 30 0 0">
591611
<ItemsControl Style="{StaticResource SettingGrid}">
592612
<StackPanel Style="{StaticResource TextPanel}">

Flow.Launcher/SettingWindow.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ private void OnSelectPythonDirectoryClick(object sender, RoutedEventArgs e)
115115
}
116116
}
117117

118+
private void OnSelectFileManagerClick(object sender, RoutedEventArgs e)
119+
{
120+
SelectFileManagerWindow fileManagerChangeWindow = new SelectFileManagerWindow();
121+
fileManagerChangeWindow.ShowDialog();
122+
}
123+
118124
#endregion
119125

120126
#region Hotkey

0 commit comments

Comments
 (0)