-<Window x:Class="Pithos.Client.WPF.PreferencesView"
+<Window x:Class="Pithos.Client.WPF.Preferences.PreferencesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cal="http://www.caliburnproject.org"
- xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" x:Name="TheView"
- Title="Pithos Preferences" Height="381" Width="600"
+ xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
+ xmlns:Converters="clr-namespace:Pithos.Client.WPF.Converters"
+ x:Name="TheView"
+ Title="Pithos+ Preferences" Height="436" Width="600"
ShowInTaskbar="true"
WindowStartupLocation="CenterScreen"
- Icon="/Pithos.Client.WPF;component/Images/Tray.ico"
+ Icon="/PithosPlus;component/Images/PithosTaskbar.png"
Background="{StaticResource {x:Static SystemColors.ControlBrushKey}}">
<Window.Resources>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\PithosStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
+ <Converters:NullToVisibilityConverter x:Key="NullToVisible" />
+ <BooleanToVisibilityConverter x:Key="BoolToVisible" />
</ResourceDictionary>
</Window.Resources>
<!-- <Window.TaskbarItemInfo>
</Grid.RowDefinitions>
- <TabControl Grid.Row="0">
- <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
+ <TabControl Grid.Row="0" x:Name="Tabs" >
+ <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="GeneralTab">
<TabItem.Header>
<StackPanel>
- <Image Source="/Pithos.Client.WPF;component/Images/General.png" Stretch="Uniform" Height="32"/>
+ <Image Source="/PithosPlus;component/Images/General.png" Stretch="Uniform" Height="32"/>
<TextBlock Text="General"/>
</StackPanel>
</TabItem.Header>
<GroupBox Height="66" VerticalAlignment="Top" Name="groupBox1" Margin="10,5">
<StackPanel>
<CheckBox Content="Show Desktop Notifications" Height="16" Name="Settings_ShowDesktopNotifications" Margin="5,10,5,0" />
- <CheckBox Content="Start on System Startup" Height="16" Name="StartOnSystemStartup" Margin="5,5,5,0" />
+ <CheckBox Content="Start on System Startup" Height="16" Name="Settings_StartOnSystemStartup" Margin="5,5,5,0" />
</StackPanel>
</GroupBox>
</TabItem>
- <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
+ <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="AccountTab" IsSelected="{Binding AccountTabSelected,Mode=OneWay}">
<TabItem.Header>
<StackPanel>
- <Image Source="/Pithos.Client.WPF;component/Images/Accounts.png" Stretch="Uniform" Height="32"/>
+ <Image Source="/PithosPlus;component/Images/Accounts.png" Stretch="Uniform" Height="32"/>
<TextBlock Text="Accounts"/>
</StackPanel>
</TabItem.Header>
<ListBox Name="Accounts" Grid.Row="0" VerticalAlignment="Stretch" ItemsSource="{Binding Accounts,Mode=OneWay}" SelectedItem="{Binding CurrentAccount,Mode=TwoWay}" >
<ListBox.ItemTemplate>
<DataTemplate>
+ <StackPanel Orientation="Horizontal">
+ <Image Visibility="{Binding Converter={StaticResource BoolToVisible}, Path=IsExpired,Mode=OneWay}" Source="/PithosPlus;component/Images/SmallWarning.png" Margin="2,0"/>
<TextBlock Text="{Binding AccountName}" />
+ </StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Orientation="Horizontal" Grid.Row="1">
- <extToolkit:DropDownButton Content="Add" Height="25" Width="75">
- <extToolkit:DropDownButton.DropDownContent>
- <Menu>
- <Menu.ItemsPanel>
- <ItemsPanelTemplate>
- <VirtualizingStackPanel Orientation="Vertical"/>
- </ItemsPanelTemplate>
- </Menu.ItemsPanel>
-
- <MenuItem Name="AddPithosAccount" Header="From Pithos" ToolTip="Go to Pithos site to login and retrieve the authentication token" cal:Message.Attach="AddPithosAccount"/>
- <MenuItem Name="AddAccount" Header="Manually" ToolTip="Enter account details manually" cal:Message.Attach="AddAccount"/>
- </Menu>
- </extToolkit:DropDownButton.DropDownContent>
- </extToolkit:DropDownButton>
+ <Button Name="AddAccount" Content="Add " ToolTip="Enter account details manually" Style="{StaticResource ButtonStyle}" Width="75"/>
<Button Name="RemoveAccount" Content="Remove" Style="{StaticResource ButtonStyle}" Width="75"/>
</StackPanel>
</Grid>
- <GroupBox Header="Account" Padding="5" Margin="5" Height="231" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.Column="1">
+ <GroupBox Header="Account" Padding="5" Margin="5" Height="231" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.Column="1" Visibility="{Binding Path=CurrentAccount, Converter={StaticResource NullToVisible},ConverterParameter='Invert'}"
+ HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" >
+ No account is selected. Please select an account or add a new one.
+ </TextBlock>
+ </GroupBox>
+ <GroupBox Header="Account" Padding="5" Margin="5,5,5,0" Height="266" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.Column="1" Visibility="{Binding Path=CurrentAccount, Converter={StaticResource NullToVisible}}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition />
</Grid.RowDefinitions>
- <Label Content="Account" Grid.Column="0" Grid.Row="0" Margin="0,5" HorizontalAlignment="Left"/>
- <TextBox Name="CurrentAccount_AccountName" Grid.Column="1" Grid.Row="0" Margin="5"/>
- <Label Content="API Key" Grid.Column="0" Grid.Row="1" Margin="0,5" HorizontalAlignment="Left"/>
- <TextBox Name="CurrentAccount_ApiKey" Grid.Column="1" Grid.Row="1" Margin="5"/>
- <Label Content="Folder" Grid.Column="0" Grid.Row="2" Margin="0,5" HorizontalAlignment="Left"/>
- <Grid Grid.Row="2" Grid.Column="1" >
+ <Label Content="Server" Grid.Column="0" Grid.Row="0" Margin="0,5" HorizontalAlignment="Left"/>
+ <TextBox Name="CurrentAccount_ServerUrl" Grid.Column="1" Grid.Row="0" Margin="5"/>
+ <Label Content="Account" Grid.Column="0" Grid.Row="1" Margin="0,5" HorizontalAlignment="Left"/>
+ <TextBox Name="CurrentAccount_AccountName" Grid.Column="1" Grid.Row="1" Margin="5"/>
+ <Grid Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" >
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <Label Content="API Key" Grid.Column="0" Margin="0,5" HorizontalAlignment="Left"/>
+ <TextBox Name="CurrentAccount_ApiKey" Grid.Column="1" Margin="5" />
+ <Button Name="RefreshApiKey" Grid.Column="2" Content="Refresh" Margin="5"/>
+ </Grid>
+ <Label Content="Folder" Grid.Column="0" Grid.Row="3" Margin="0,5" HorizontalAlignment="Left"/>
+ <Grid Grid.Row="3" Grid.Column="1" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
- <TextBox Name="CurrentAccount_RootPath" Margin="5" HorizontalAlignment="Stretch" Grid.Column="0"/>
- <Button Name="MoveAccountFolder" Content="Move ..." Width="60" Height="30" Grid.Column="1" />
+ <TextBox Name="CurrentAccount_RootPath" Margin="1,5,5,-30" HorizontalAlignment="Stretch" IsReadOnly="True" ToolTip="{Binding CurrentAccount.RootPath}" Height="61" TextWrapping="WrapWithOverflow" />
</Grid>
- <CheckBox Name="CurrentAccount_IsActive" Content="Account is Active" Grid.Column="1" Grid.Row="3" Margin="5"/>
- <CheckBox Name="CurrentAccount_UsePithos" Content="Use Pithos Extensions" Grid.Column="1" Grid.Row="4" Margin="5"/>
- <Button Name="SelectiveSyncFolders" Content="Selective Sync" Width="Auto" HorizontalAlignment="Left" Style="{StaticResource ButtonStyle}" Grid.Column="1" Grid.Row="5"/>
-
+ <CheckBox Name="CurrentAccount_IsActive" Content="Account is Active" Grid.Row="6" Margin="6,66,126,6" Grid.ColumnSpan="2" />
+ <Button Name="SelectiveSyncFolders" Content="Selective Sync" Width="Auto" HorizontalAlignment="Right" Style="{StaticResource ButtonStyle}" Grid.Row="6" Margin="0,40,18,24" Grid.Column="1" />
+ <Button Name="MoveAccountFolder" Content="Move ..." Margin="6,40,126,24" Grid.Row="6" Grid.Column="1" />
</Grid>
</GroupBox>
</Grid>
</TabItem>
- <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
+ <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" Visibility="Collapsed" x:Name="RateTab">
<TabItem.Header>
<StackPanel>
- <Image Source="/Pithos.Client.WPF;component/Images/Bandwidth.png" Stretch="Uniform" Height="32"/>
+ <Image Source="/PithosPlus;component/Images/Bandwidth.png" Stretch="Uniform" Height="32"/>
<TextBlock Text="Bandwidth"/>
</StackPanel>
</TabItem.Header>
</GroupBox>
</StackPanel>
</TabItem>
- <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
+ <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="ProxyTab">
<TabItem.Header>
<StackPanel>
- <Image Source="/Pithos.Client.WPF;component/Images/Network.png" Stretch="Uniform" Height="32"/>
+ <Image Source="/PithosPlus;component/Images/Network.png" Stretch="Uniform" Height="32"/>
<TextBlock Text="Proxy"/>
</StackPanel>
</TabItem.Header>
<Grid Margin="10,5">
<RadioButton Name="Settings_UseDefaultProxy" Content="Use System Defaults" Margin="5,6,5,0" Height="16" VerticalAlignment="Top"/>
- <RadioButton Name="Settings_UseManualProxy" Content="Manual" Margin="5,28,5,0" Height="16" VerticalAlignment="Top"/>
- <Label Content="Server" Height="28" HorizontalAlignment="Left" Margin="5,47,0,0" Name="label2" VerticalAlignment="Top" />
- <TextBox Height="23" HorizontalAlignment="Left" Margin="76,51,0,0" Name="Settings_ProxyServer" VerticalAlignment="Top" Width="162" IsEnabled="{Binding ElementName=Settings_UseManualProxy, Path=IsChecked}"/>
- <TextBlock Height="23" HorizontalAlignment="Left" Margin="244,51,0,0" Name="textBlock1" Text=":" VerticalAlignment="Top" />
- <TextBox Height="23" HorizontalAlignment="Left" Margin="254,51,0,0" Name="Settings_ProxyPort" VerticalAlignment="Top" Width="65" IsEnabled="{Binding ElementName=Settings_UseManualProxy, Path=IsChecked}"/>
+ <RadioButton Name="Settings_UseNoProxy" Content="No Proxy" Margin="5,25,5,0" Height="16" VerticalAlignment="Top"/>
+ <RadioButton Name="Settings_UseManualProxy" Content="Manual" Margin="5,44,5,0" Height="16" VerticalAlignment="Top"/>
+ <Label Content="Server" Height="28" HorizontalAlignment="Left" Margin="5,63,0,0" Name="label2" VerticalAlignment="Top" />
+ <TextBox Height="23" HorizontalAlignment="Left" Margin="76,67,0,0" Name="Settings_ProxyServer" VerticalAlignment="Top" Width="162" IsEnabled="{Binding ElementName=Settings_UseManualProxy, Path=IsChecked}"/>
+ <TextBlock Height="23" HorizontalAlignment="Left" Margin="244,67,0,0" Name="textBlock1" Text=":" VerticalAlignment="Top" />
+ <TextBox Height="23" HorizontalAlignment="Left" Margin="254,67,0,0" Name="Settings_ProxyPort" VerticalAlignment="Top" Width="65" IsEnabled="{Binding ElementName=Settings_UseManualProxy, Path=IsChecked}"/>
- <GroupBox Height="109" HorizontalAlignment="Left" Margin="5,80,0,0" Name="groupBox2" VerticalAlignment="Top" Width="373" IsEnabled="{Binding ElementName=Settings_UseManualProxy, Path=IsChecked}">
+ <GroupBox Height="109" HorizontalAlignment="Left" Margin="5,96,0,0" Name="groupBox2" VerticalAlignment="Top" Width="373" IsEnabled="{Binding ElementName=Settings_UseManualProxy, Path=IsChecked}">
<GroupBox.Header>
<CheckBox Content="Proxy requires authentication" Height="16" VerticalAlignment="Top" Name="Settings_ProxyAuthentication" />
</GroupBox.Header>
<Grid >
- <Label Content="Username" Height="28" HorizontalAlignment="Left" Margin="0,6,0,0" Name="label3" VerticalAlignment="Top" />
- <Label Content="Password" Height="28" HorizontalAlignment="Left" Margin="0,32,0,0" Name="label4" VerticalAlignment="Top" />
- <TextBox Height="23" HorizontalAlignment="Left" Margin="65,6,0,0" Name="Settings_ProxyUsername" VerticalAlignment="Top" Width="157" IsEnabled="{Binding IsChecked,ElementName=Settings_ProxyAuthentication}"/>
- <TextBox Height="23" HorizontalAlignment="Left" Margin="65,37,0,0" Name="Settings_ProxyPassword" VerticalAlignment="Top" Width="157" IsEnabled="{Binding IsChecked,ElementName=Settings_ProxyAuthentication}"/>
+ <Grid.RowDefinitions>
+ <RowDefinition/>
+ <RowDefinition/>
+ <RowDefinition/>
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition/>
+ <ColumnDefinition/>
+ </Grid.ColumnDefinitions>
+ <Label Content="Username" Height="28" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" />
+ <Label Content="Password" Height="28" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="0" VerticalAlignment="Top" />
+ <Label Content="Domain" Height="28" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="0" VerticalAlignment="Top" />
+ <TextBox Height="23" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="1" Name="Settings_ProxyUsername" VerticalAlignment="Top" Width="157" IsEnabled="{Binding IsChecked,ElementName=Settings_ProxyAuthentication}"/>
+ <TextBox Height="23" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="1" Name="Settings_ProxyPassword" VerticalAlignment="Top" Width="157" IsEnabled="{Binding IsChecked,ElementName=Settings_ProxyAuthentication}"/>
+ <TextBox Height="23" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="1" Name="Settings_ProxyDomain" VerticalAlignment="Top" Width="157" IsEnabled="{Binding IsChecked,ElementName=Settings_ProxyAuthentication}"/>
</Grid>
</GroupBox>
</Grid>
</TabItem>
- <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
+ <TabItem VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" x:Name="AdvancedTab">
<TabItem.Header>
<StackPanel>
- <Image Source="/Pithos.Client.WPF;component/Images/Advanced.png" Stretch="Uniform" Height="32"/>
- <TextBlock Text="Advanced"/>
+ <Image Source="/PithosPlus;component/Images/Advanced.png" Stretch="Uniform" Height="32"/>
+ <TextBlock Text="Advanced"/>
</StackPanel>
</TabItem.Header>
- <StackPanel>
+ <WrapPanel Orientation="Vertical">
<CheckBox Content="Activate Shell Extensions" Height="16" HorizontalAlignment="Left" Margin="5" Name="ExtensionsActivated" VerticalAlignment="Top" />
<Button Content="Refresh Overlays" Name="RefreshOverlays" HorizontalAlignment="Left" Margin="5" Style="{StaticResource ButtonStyle}" Width="Auto" />
- </StackPanel>
+ <TextBlock Text="Polling Interval (secs)" Margin="5"/>
+ <extToolkit:IntegerUpDown x:Name="Settings_PollingInterval" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter seconds" Minimum="10" />
+ <TextBlock Text="Hashing Parallelism" Margin="5"/>
+ <extToolkit:IntegerUpDown x:Name="Settings_HashingParallelism" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter number of tasks" Minimum="1" />
+ <TextBlock Text="Startup Delay (minutes)" Margin="5"/>
+ <extToolkit:IntegerUpDown x:Name="StartupDelay" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter number of tasks" Minimum="0" />
+ <GroupBox Header="Logging">
+ <StackPanel Margin="5">
+ <CheckBox Content="Enable Debug Logging" Height="16" HorizontalAlignment="Left" Margin="5,10,5,5" Name="DebugLoggingEnabled" VerticalAlignment="Top"/>
+ <Button x:Name="OpenLogPath" Content="Open Log Path" HorizontalAlignment="Left" Margin="5" Style="{StaticResource ButtonStyle}" Width="Auto"/>
+ <Button x:Name="OpenLogConsole" Content="Open Log Console" HorizontalAlignment="Left" Margin="5" Style="{StaticResource ButtonStyle}" Width="Auto" Visibility="Collapsed"/>
+ </StackPanel>
+ </GroupBox>
+ </WrapPanel>
</TabItem>
</TabControl>