-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
161 lines (153 loc) · 7.84 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<Window x:Class="NovaSFTP2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
Icon="/icon1.png"
Title="{Binding title}" Height="410" Width="525" DataContext="{Binding Main, Source={StaticResource Locator}}" ResizeMode="NoResize" >
<Window.TaskbarItemInfo>
<TaskbarItemInfo />
</Window.TaskbarItemInfo>
<Grid>
<Grid.Resources>
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource {x:Type Label}}">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="10,0"/>
</Style>
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Padding" Value="6"/>
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="9*"/>
<ColumnDefinition Width="166*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="2*" />
<RowDefinition x:Name="rowDefAuth" Height="3*" />
<RowDefinition Height="3*" />
<RowDefinition Height="50" />
<RowDefinition Height="1*" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,0,103" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Content="Connector Type:"/>
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0" Orientation="Horizontal" Grid.ColumnSpan="2" >
<ComboBox IsEnabled="{Binding type_selector_enabled}" ItemsSource="{Binding UPLOAD_TYPES}" SelectedItem="{Binding upload_type}" Width="75"/>
<CheckBox Visibility="{Binding show_docker_options}" Content="Compression" IsChecked="{Binding use_compression, Mode=TwoWay}" VerticalAlignment="Center" Margin="10,0,0,0" />
<Label Visibility="{Binding show_docker_options}" Content=" TLS:"/>
<ComboBox Visibility="{Binding show_docker_options}" ItemsSource="{Binding TLS_MODES}" SelectedItem="{Binding tls_mode}" Width="110" Margin="5,0"/>
</StackPanel>
<Label Content="Host:" Grid.Row="1" />
<TextBox Text="{Binding hostname}" Grid.Column="1" Grid.Row="1" />
<TextBox Text="{Binding port}" Width="40" Grid.Column="2" Grid.Row="1" />
</Grid>
<Grid Grid.Row="1" Visibility="{Binding show_docker_options}" Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Content="CA Cert/User:" Grid.Row="0" />
<controls:AutoCompleteBox x:Name="txtUser" VerticalAlignment="Center" Margin="10,0" Text="{Binding username,Mode=TwoWay}" Populating="FileCRTPathBox_OnPopulating" Grid.Row="0" Grid.Column="1" />
<Label Content="Private Key/Password:" Grid.Row="1" />
<controls:AutoCompleteBox x:Name="txtPassword" VerticalAlignment="Center" Margin="10,0" Text="{Binding password,Mode=TwoWay}" Populating="FilePFXPathBox_OnPopulating" Grid.Row="1" Grid.Column="1" />
<Label Content="Container:" Grid.Row="2" />
<TextBox Text="{Binding container}" Grid.Row="2" Grid.Column="1" />
</Grid>
<Grid Grid.Row="1" Visibility="{Binding show_sftp_options}" Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Content="Username:" Grid.Row="0" />
<TextBox Text="{Binding username}" Grid.Row="0" Grid.Column="1" />
<Label Content="Password:" Grid.Row="1" />
<TextBox Grid.Row="1" Grid.Column="1" Margin="10,0" VerticalAlignment="Center">
<TextBox.Style>
<Style TargetType="TextBox" xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Style.Resources>
<VisualBrush x:Key="CueBannerBrush" AlignmentX="Left" AlignmentY="Center" Stretch="None">
<VisualBrush.Visual>
<Label Content="Password (leave blank for paegent public key)" Foreground="LightGray" />
</VisualBrush.Visual>
</VisualBrush>
</Style.Resources>
<Style.Triggers>
<Trigger Property="Text" Value="{x:Static sys:String.Empty}">
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
</Trigger>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="Background" Value="White" />
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
</Grid>
<Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0,103,0,0" Grid.RowSpan="2">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150"/>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Content="Local Folder:" Grid.Row="0" />
<controls:AutoCompleteBox x:Name="txtPath" Text="{Binding local_folder, Mode=TwoWay}" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Margin="10,0" Populating="FilePathBox_OnPopulating" />
<!-- <TextBox Text="{Binding local_folder}" Grid.Row="3" Grid.Column="1" />-->
<Label Content="Monitor Sub Folders:" Grid.Row="1" />
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1">
<CheckBox IsChecked="{Binding include_subfolders}" Margin="10,0" VerticalAlignment="Center"/>
<Label FontSize="10" Content="Ignore when TS and size same:" />
<CheckBox IsChecked="{Binding ignore_ts_size_same}" Margin="0,0,5,0" VerticalAlignment="Center"/>
<Label FontSize="10" Content="Pre-cache existing:" />
<CheckBox IsChecked="{Binding cache_existing_ts}" IsEnabled="{Binding ignore_ts_size_same}" Margin="0" VerticalAlignment="Center"/>
</StackPanel>
<Label Content="Remote Base Folder:" Grid.Row="2" />
<TextBox Text="{Binding remote_folder}" Grid.Row="2" Grid.Column="1" />
</Grid>
<StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Left" Grid.Column="1" Margin="22,103,0,0" Grid.RowSpan="2">
<ComboBox IsEnabled="{Binding type_selector_enabled}" StaysOpenOnEdit="True" IsEditable="True" ItemsSource="{Binding hosts}" SelectedItem="{Binding selected_host, Mode=TwoWay}" Width="225" VerticalAlignment="Center" />
<Button Content="Delete" Margin="20,0,0,0" Command="{Binding FavDelCmd, Mode=OneWay}" />
<Button Content="Save" Margin="20,0" Command="{Binding FavSaveCmd, Mode=OneWay}" />
<Button Content="Save As" Command="{Binding FavSaveAsCmd, Mode=OneWay}" />
</StackPanel>
<Button Content="{Binding action_button_content}" Command="{Binding ToggleConnectedCmd, Mode=OneWay}" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" Margin="207,0,0,0" />
<StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Left" Grid.ColumnSpan="2" Margin="-86,0,0,0">
<Label Content="Ignore RegEx Pattern:"/>
<TextBox Text="{Binding ignore_regex,Mode=TwoWay}" />
</StackPanel>
</Grid>
</Window>