root / trunk / Pithos.Client.WPF / Preferences / PrefAccounts.xaml @ 7fcbf914
History | View | Annotate | Download (7.4 kB)
1 |
<Page x:Class="Pithos.Client.WPF.Preferences.Accounts" |
---|---|
2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 |
xmlns:mui="http://firstfloorsoftware.com/ModernUI" |
5 |
xmlns:cal="http://www.caliburnproject.org" |
6 |
xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" |
7 |
xmlns:Converters="clr-namespace:Pithos.Client.WPF.Converters" |
8 |
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" x:Name="TheView" |
9 |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
10 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
11 |
mc:Ignorable="d" |
12 |
d:DesignHeight="300" d:DesignWidth="300" |
13 |
Title="AccountsList"> |
14 |
|
15 |
<Page.Resources> |
16 |
<ResourceDictionary> |
17 |
<Converters:NullToVisibilityConverter x:Key="NullToVisible" /> |
18 |
<BooleanToVisibilityConverter x:Key="BoolToVisible" /> |
19 |
</ResourceDictionary> |
20 |
</Page.Resources> |
21 |
|
22 |
<Grid VerticalAlignment="Stretch" > |
23 |
<Grid.ColumnDefinitions> |
24 |
<ColumnDefinition Width="Auto"/> |
25 |
<ColumnDefinition Width="*"/> |
26 |
</Grid.ColumnDefinitions> |
27 |
<Grid Margin="5,10,5,5" Column="0" Width="230"> |
28 |
<Grid.RowDefinitions> |
29 |
<RowDefinition Height="*"/> |
30 |
<RowDefinition Height="Auto"/> |
31 |
</Grid.RowDefinitions> |
32 |
<ListBox Name="AccountsList" Padding="2" Margin="2,2,-18,0" Grid.Row="0" VerticalAlignment="Stretch" ItemsSource="{Binding AccountsList,Mode=OneWay}" SelectedItem="{Binding CurrentAccount,Mode=TwoWay}" > |
33 |
<ListBox.ItemTemplate> |
34 |
<DataTemplate> |
35 |
<StackPanel Orientation="Horizontal"> |
36 |
<Image Visibility="{Binding Converter={StaticResource BoolToVisible}, Path=IsExpired,Mode=OneWay}" Source="/PithosPlus;component/Images/SmallWarning.png" Margin="2,0"/> |
37 |
<StackPanel> |
38 |
<TextBlock Text="{Binding AccountName}" /> |
39 |
<TextBlock Text="{Binding ServerUrl}" FontStyle="Italic" FontSize="10" /> |
40 |
</StackPanel> |
41 |
</StackPanel> |
42 |
</DataTemplate> |
43 |
</ListBox.ItemTemplate> |
44 |
</ListBox> |
45 |
<Grid Grid.Row="1" Margin="0,0,-18,0"> |
46 |
<!-- <Grid.ColumnDefinitions> |
47 |
<ColumnDefinition Width="50*"/> |
48 |
<ColumnDefinition Width="50*"/> |
49 |
</Grid.ColumnDefinitions> --> |
50 |
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,-17,0" Width="247"> |
51 |
<Button Name="AddAccount" Grid.Column="0" Content="Add" ToolTip="Enter account details manually" Margin="5,5,10,5" Height="25" Width="100"/> |
52 |
<Button Name="RemoveAccount" Grid.Column="1" Content="Remove" Margin="5,5,10,5" Height="25" Width="100"/> |
53 |
</StackPanel> |
54 |
</Grid> |
55 |
</Grid> |
56 |
<GroupBox Header="Account" Padding="2" Margin="18,2,2,0" Height="231" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.Column="1" Visibility="{Binding Path=CurrentAccount, Converter={StaticResource NullToVisible},ConverterParameter='Invert'}" |
57 |
HorizontalContentAlignment="Center" VerticalContentAlignment="Center"> |
58 |
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" > |
59 |
No account is selected. Please select an account or add a new one. |
60 |
</TextBlock> |
61 |
</GroupBox> |
62 |
<GroupBox Header="Account" Padding="2" Margin="18,2,2,0" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.Column="1" Visibility="{Binding Path=CurrentAccount, Converter={StaticResource NullToVisible}}"> |
63 |
<Grid> |
64 |
<Grid.ColumnDefinitions> |
65 |
<ColumnDefinition Width="45"/> |
66 |
<ColumnDefinition Width="90*"/> |
67 |
</Grid.ColumnDefinitions> |
68 |
<Grid.RowDefinitions> |
69 |
<RowDefinition Height="Auto"/> |
70 |
<RowDefinition Height="Auto"/> |
71 |
<RowDefinition Height="Auto"/> |
72 |
<RowDefinition Height="Auto"/> |
73 |
<RowDefinition Height="Auto"/> |
74 |
<RowDefinition Height="Auto"/> |
75 |
<RowDefinition Height="Auto"/> |
76 |
<RowDefinition Height="Auto"/> |
77 |
<RowDefinition Height="Auto"/> |
78 |
<RowDefinition /> |
79 |
</Grid.RowDefinitions> |
80 |
<Label Content="Server" Grid.Column="0" Grid.Row="0" Margin="0,2" HorizontalAlignment="Right"/> |
81 |
<TextBox Name="CurrentAccount_ServerUrl" IsReadOnly="True" Grid.Column="1" Grid.Row="0" Margin="0,2"/> |
82 |
<Label Content="eMail" Grid.Column="0" Grid.Row="1" Margin="0,2" HorizontalAlignment="Right"/> |
83 |
<TextBox Name="CurrentAccount_DisplayName" IsReadOnly="True" Grid.Column="1" Grid.Row="1" Margin="0,2"/> |
84 |
<Label Content="UID" ToolTip="User ID" Grid.Column="0" Grid.Row="2" Margin="0,2" HorizontalAlignment="Right"/> |
85 |
<TextBox Name="CurrentAccount_AccountName" IsReadOnly="True" Grid.Column="1" Grid.Row="2" Margin="0,2"/> |
86 |
<Grid Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" > |
87 |
<Grid.ColumnDefinitions> |
88 |
<ColumnDefinition Width="45"/> |
89 |
<ColumnDefinition Width="*"/> |
90 |
<ColumnDefinition Width="Auto"/> |
91 |
</Grid.ColumnDefinitions> |
92 |
<Label Content="Token" Grid.Column="0" Margin="0,2" HorizontalAlignment="Right"/> |
93 |
<TextBox Name="CurrentAccount_ApiKey" IsReadOnly="True" Grid.Column="1" Margin="2" /> |
94 |
<Button Name="RefreshApiKey" Grid.Column="2" Content="Refresh" Margin="2"/> |
95 |
</Grid> |
96 |
<Label Content="Folder" Grid.Column="0" Grid.Row="4" Margin="0,2" HorizontalAlignment="Right"/> |
97 |
<Grid Grid.Row="4" Grid.Column="1" > |
98 |
<Grid.ColumnDefinitions> |
99 |
<ColumnDefinition Width="*"/> |
100 |
<ColumnDefinition Width="Auto"/> |
101 |
</Grid.ColumnDefinitions> |
102 |
<TextBox Name="CurrentAccount_RootPath" Margin="2" HorizontalAlignment="Stretch" IsReadOnly="True" ToolTip="{Binding CurrentAccount.RootPath}" Height="61" TextWrapping="WrapWithOverflow" /> |
103 |
</Grid> |
104 |
<CheckBox Name="CurrentAccount_IsActive" Content="Account is Active" Grid.Row="7" Grid.Column="1" /> |
105 |
<CheckBox Name="CurrentAccount_SelectiveSyncEnabled" Content="Selective Sync Enabled" Grid.Row="8" Grid.Column="1"/> |
106 |
<StackPanel Orientation="Horizontal" Grid.Row="9" Grid.Column="1" HorizontalAlignment="center"> |
107 |
<Button Name="SelectiveSyncFolders" Width="100" Height="25" Content="Selective Sync" Margin="5,5,10,5"/> |
108 |
<Button Name="MoveAccountFolder" Content="Move ..." Width="100" Height="25" IsEnabled="False" Margin="5,5,10,5"/> |
109 |
<Button x:Name="ClearAccountCache" Content="Clear Cache" Margin="5,5,10,5" Width="100" Height="25"/> |
110 |
</StackPanel> |
111 |
</Grid> |
112 |
|
113 |
</GroupBox> |
114 |
|
115 |
</Grid> |
116 |
</Page> |