Revision 20e9a378

b/trunk/Pithos.Client.WPF/App.xaml.cs
12 12
using Caliburn.Micro;
13 13
using Microsoft.Win32;
14 14
using Pithos.Client.WPF.Caliburn.Micro.Logging;
15
using WPF.Themes;
15

  
16 16

  
17 17
namespace Pithos.Client.WPF
18 18
{
b/trunk/Pithos.Client.WPF/Configuration/PithosSettings.cs
50 50
            get { return Settings.Default.PithosSite; }
51 51
        }
52 52

  
53
        public string PithosLoginUrl
54
        {
55
            get { return Settings.Default.PithosLoginUrl; }
56
        }
57

  
53 58
        public string IconsPath
54 59
        {
55 60
            get { return Settings.Default.IconPath; }
......
105 110
            get { return Settings.Default.ProxyAuthentication; }
106 111
            set { Settings.Default.ProxyAuthentication = value; }
107 112
        }
113

  
114
        
108 115
        
109 116
        public bool ExtensionsActivated
110 117
        {
b/trunk/Pithos.Client.WPF/FileProperties/ContainerPropertiesView.xaml
2 2
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3 3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cal="http://www.caliburnproject.org"
4 4
        Title="ContainerPropertiesView" Height="500" Width="300"
5
        Background="#FFD4D0C8" Icon="/Pithos.Client.WPF;component/Images/PithosTaskbar.png">
5
        Icon="/Pithos.Client.WPF;component/Images/PithosTaskbar.png"
6
        Background="{StaticResource {x:Static SystemColors.ControlBrushKey}}">
6 7
    <Window.Resources>
7 8
        <ResourceDictionary>
8 9
            <ResourceDictionary.MergedDictionaries>
b/trunk/Pithos.Client.WPF/FileProperties/ContainerPropertiesViewModel.cs
114 114

  
115 115

  
116 116

  
117
        public void Refresh()
117
        public void Reload()
118 118
        {
119 119
            Container = Shell.RefreshContainerInfo(Container);
120 120
        }
b/trunk/Pithos.Client.WPF/FileProperties/FilePropertiesView.xaml
5 5
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="http://www.caliburnproject.org"
6 6
        mc:Ignorable="d" 
7 7
             d:DesignHeight="300" d:DesignWidth="300" MaxWidth="500"
8
        Background="#FFD4D0C8" Height="481" Icon="/Pithos.Client.WPF;component/Images/PithosTaskbar.png">
8
         Height="481" Icon="/Pithos.Client.WPF;component/Images/PithosTaskbar.png"
9
        Background="{StaticResource {x:Static SystemColors.ControlBrushKey}}">
9 10
    <Window.Resources>
10 11
        <ResourceDictionary>
11 12
            <ResourceDictionary.MergedDictionaries>
b/trunk/Pithos.Client.WPF/FileProperties/FilePropertiesViewModel.cs
126 126
            get { return _permissions; }
127 127
        }
128 128

  
129
        public void Refresh()
129
        public void Reload()
130 130
        {
131 131
            PithosFile=Shell.RefreshObjectInfo(PithosFile);
132 132
        }
/dev/null
1
namespace Pithos.Client.WPF {
2
    public interface IShell {}
3
}
/dev/null
1
<Window x:Class="Pithos.Client.WPF.MessageView"
2
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
        Title="MessageView" Height="300" Width="300">
5
    <Grid x:Name="LayoutRoot" Margin="2">
6
        <Grid.RowDefinitions>
7
            <RowDefinition Height="Auto"/>
8
            <RowDefinition />
9
            <RowDefinition Height="Auto" />
10
        </Grid.RowDefinitions>
11
        <TextBlock Text="{Binding Message}" Grid.Row="0" TextWrapping="WrapWithOverflow" Margin="0,5,0,10"/>
12
        <ListBox  ItemsSource="{Binding Path=UserMessages}" Grid.Row="1">
13
            <ListBox.ItemTemplate>
14
                <DataTemplate>
15
                    <Expander Header="{Binding Message}" FontWeight="Bold">
16
                        <TextBlock Text="{Binding Details}" FontWeight="Normal" />
17
                    </Expander>
18
                </DataTemplate>
19
            </ListBox.ItemTemplate>
20
        </ListBox>
21
        <Button x:Name="Copy" Content="Copy" Width="39" Height="35" HorizontalAlignment="Left" Grid.Row="2" Click="OnCopy">
22
            <ContentControl.ContentTemplate>
23
                <DataTemplate>
24
                    <Image  Source="/Pithos.Client.WPF;component/Images/copy.png"   />
25
                </DataTemplate>
26
            </ContentControl.ContentTemplate>
27
        </Button>
28
        <Button x:Name="OKButton" Content="Close"  Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="2" IsDefault="True" Command="ApplicationCommands.Close" />
29
    </Grid>
30
</Window>
/dev/null
1
using System;
2
using System.Collections.Generic;
3
using System.Collections.ObjectModel;
4
using System.ComponentModel;
5
using System.ComponentModel.Composition;
6
using System.Linq;
7
using System.Linq.Expressions;
8
using System.Text;
9
using System.Windows;
10
using System.Windows.Controls;
11
using System.Windows.Data;
12
using System.Windows.Documents;
13
using System.Windows.Input;
14
using System.Windows.Media;
15
using System.Windows.Media.Imaging;
16
using System.Windows.Shapes;
17
using Caliburn.Micro;
18

  
19
namespace Pithos.Client.WPF
20
{
21
    /// <summary>
22
    /// Interaction logic for MessageView.xaml
23
    /// </summary>
24
    public partial class MessageView : Window, INotifyPropertyChanged
25
    {
26
        public ObservableCollection<UserMessage> UserMessages { get; set; }
27

  
28
        private string _message;
29
        public string Message
30
        {
31
            get
32
            {
33
                return _message;
34
            }
35
            set
36
            {
37
                _message = value;
38
                NotifyOfPropertyChange(()=>Message);
39
            }
40
        }
41

  
42

  
43
        public MessageView(IEnumerable<UserMessage> userMessages)
44
        {
45
            UserMessages = new ObservableCollection<UserMessage>(userMessages);
46
            DataContext = this;
47
            InitializeComponent();            
48
        }
49

  
50
        /// <summary>
51
        /// Copies the messages to the clipboard
52
        /// </summary>
53
        public void OnCopy(object sender, RoutedEventArgs e)
54
        {
55
            StringBuilder clipText = new StringBuilder()
56
                .Append('-', 30)
57
                .AppendLine("\r\nProduct Map")
58
                .Append('-', 30)
59
                .AppendLine()
60
                .AppendLine();
61
            foreach (var message in UserMessages)
62
            {
63
                clipText
64
                    .Append('-', 20)
65
                    .AppendFormat("\r\n[{0,5}]\t{1}", message.Severity, message.Message)
66
                    .AppendLine()
67
                    .AppendLine(message.Details)
68
                    .AppendLine();
69
            }
70

  
71
            Clipboard.SetText(clipText.ToString());
72
        }
73

  
74

  
75
        public event PropertyChangedEventHandler PropertyChanged;
76

  
77
        private void NotifyOfPropertyChange<TProperty>(Expression<Func<TProperty>> property)
78
        {
79
            if (PropertyChanged!=null)
80
                PropertyChanged(this,new PropertyChangedEventArgs(property.GetMemberInfo().Name));
81
        }
82
    }
83

  
84
    public class UserMessage
85
    {
86
        public string Message { get; set; }
87

  
88
        public Severity Severity { get; set; }
89
        public string Details { get; set; }
90
    }
91

  
92
    public enum Severity
93
    {
94
        Info,
95
        Warn,
96
        Error
97
    }
98
}
/dev/null
1
using System.Diagnostics;
2

  
3
namespace Pithos.Client.WPF
4
{
5
    public class Notification
6
    {
7
        public string Title { get; set; }
8
        public string Message { get; set; }
9
        public TraceLevel Level { get; set; }
10
    }
11
    
12
}
b/trunk/Pithos.Client.WPF/Pithos.Client.WPF.csproj
168 168
    <Reference Include="WindowsBase" />
169 169
    <Reference Include="PresentationCore" />
170 170
    <Reference Include="PresentationFramework" />
171
    <Reference Include="WPF.Themes">
172
      <HintPath>..\packages\wpfthemes.0.0.1\lib\WPF.Themes.dll</HintPath>
171
    <Reference Include="WPFToolkit.Extended">
172
      <HintPath>..\packages\Extended.Wpf.Toolkit.1.5.0\lib\net40\WPFToolkit.Extended.dll</HintPath>
173 173
    </Reference>
174 174
  </ItemGroup>
175 175
  <ItemGroup>
......
177 177
      <Generator>MSBuild:Compile</Generator>
178 178
      <SubType>Designer</SubType>
179 179
    </ApplicationDefinition>
180
    <Compile Include="Shell\AboutView.xaml.cs">
181
      <DependentUpon>AboutView.xaml</DependentUpon>
182
    </Compile>
180 183
    <Compile Include="Caliburn\Micro\Logging\DebugLogger.cs" />
181 184
    <Compile Include="Caliburn\Micro\Logging\log4netLogger.cs" />
182 185
    <Compile Include="Configuration\PithosSettings.cs" />
......
192 195
    <Compile Include="FileProperties\Permission.cs" />
193 196
    <Compile Include="FileProperties\SizeExtensions.cs" />
194 197
    <Compile Include="FileProperties\Tag.cs" />
195
    <Compile Include="MessageView.xaml.cs">
198
    <Compile Include="Shell\AboutViewModel.cs" />
199
    <Compile Include="Shell\FeedbackView.xaml.cs">
200
      <DependentUpon>FeedbackView.xaml</DependentUpon>
201
    </Compile>
202
    <Compile Include="Shell\FeedbackViewModel.cs" />
203
    <Compile Include="Shell\MessageView.xaml.cs">
196 204
      <DependentUpon>MessageView.xaml</DependentUpon>
197 205
    </Compile>
198 206
    <Compile Include="NativeMethods.cs" />
199
    <Compile Include="Notification.cs" />
207
    <Compile Include="Shell\Notification.cs" />
200 208
    <Compile Include="PithosAccount.cs" />
201 209
    <Compile Include="PithosCommand.cs" />
202 210
    <Compile Include="Preferences\PreferencesView.xaml.cs">
......
211 219
    <Compile Include="SelectiveSynch\SelectiveSynchViewModel.cs" />
212 220
    <Compile Include="SelectiveSynch\VirtualToggleButton.cs" />
213 221
    <Compile Include="Services\Events.cs" />
214
    <Compile Include="ShellViewModel.cs" />
222
    <Compile Include="Shell\ShellViewModel.cs" />
215 223
    <Compile Include="Services\StatusService.cs" />
216 224
    <Compile Include="Wpf32Window.cs" />
225
    <Page Include="Shell\AboutView.xaml">
226
      <SubType>Designer</SubType>
227
      <Generator>MSBuild:Compile</Generator>
228
    </Page>
217 229
    <Page Include="FileProperties\ContainerPropertiesView.xaml">
218 230
      <SubType>Designer</SubType>
219 231
      <Generator>MSBuild:Compile</Generator>
......
231 243
      <SubType>Code</SubType>
232 244
    </Compile>
233 245
    <Compile Include="AppBootstrapper.cs" />
234
    <Compile Include="IShell.cs" />
246
    <Compile Include="Shell\IShell.cs" />
235 247
    <Compile Include="MainWindow.xaml.cs">
236 248
      <DependentUpon>MainWindow.xaml</DependentUpon>
237 249
      <SubType>Code</SubType>
238 250
    </Compile>
239
    <Page Include="MessageView.xaml">
251
    <Page Include="Shell\FeedbackView.xaml">
252
      <SubType>Designer</SubType>
253
      <Generator>MSBuild:Compile</Generator>
254
    </Page>
255
    <Page Include="Shell\MessageView.xaml">
240 256
      <SubType>Designer</SubType>
241 257
      <Generator>MSBuild:Compile</Generator>
242 258
    </Page>
......
252 268
      <SubType>Designer</SubType>
253 269
      <Generator>MSBuild:Compile</Generator>
254 270
    </Page>
255
    <Page Include="ShellView.xaml">
271
    <Page Include="Shell\ShellView.xaml">
256 272
      <Generator>MSBuild:Compile</Generator>
257 273
      <SubType>Designer</SubType>
258 274
    </Page>
b/trunk/Pithos.Client.WPF/PithosAccount.cs
32 32
        /// <summary>
33 33
        /// Asynchronously retrieves PITHOS credentials
34 34
        /// </summary>
35
        /// <param name="pithosSite">URL to retrieve the account info from PITHOS. Must end with =</param>
35
        /// <param name="loginUrl">URL to retrieve the account info from PITHOS. Must end with =</param>
36 36
        /// <returns>The credentials wrapped in a Task</returns>
37
        public static Task<NetworkCredential> RetrieveCredentialsAsync(string pithosSite)
37
        public static Task<NetworkCredential> RetrieveCredentialsAsync(string loginUrl)
38 38
        {
39
            Contract.Requires(Uri.IsWellFormedUriString(pithosSite, UriKind.Absolute));
39
            Contract.Requires(Uri.IsWellFormedUriString(loginUrl, UriKind.Absolute));
40 40

  
41
            if (!Uri.IsWellFormedUriString(pithosSite, UriKind.Absolute))
42
                throw new ArgumentException("The pithosSite parameter must be a valid absolute URL", "pithosSite");
41
            if (!Uri.IsWellFormedUriString(loginUrl, UriKind.Absolute))
42
                throw new ArgumentException("The pithosSite parameter must be a valid absolute URL", "loginUrl");
43 43
            
44 44
            int port = GetFreePort();
45 45

  
......
98 98
                    }
99 99
                });
100 100

  
101
            var uriBuilder=new UriBuilder(pithosSite);
102
            uriBuilder.Path="login";            
101
            var uriBuilder=new UriBuilder(loginUrl);                       
103 102
            uriBuilder.Query="next=" + listenerUrl;
104 103

  
105 104
            var retrieveUri = uriBuilder.Uri;
b/trunk/Pithos.Client.WPF/PithosStyles.xaml
1 1
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2 2
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
3
    
4
    <Style x:Key="ButtonStyle" TargetType="Button">
3

  
4
    <Style x:Key="ButtonStyle" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
5 5
        <Setter Property="Margin" Value="5"/>
6 6
        <Setter Property="Height" Value="25"/>
7 7
        <Setter Property="Width" Value="75" />
8 8
        <Setter Property="Padding" Value="3"/>
9 9
    </Style>
10
    
11
    <Style TargetType="Window" >
12
        <Setter Property="Background" Value="{StaticResource {x:Static SystemColors.ControlBrushKey}}"/>
13
    </Style>
14
    
15
    <Style x:Key="MediumButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
16
        <Setter Property="Width" Value="75"/>
17
        <Setter Property="Height" Value="25"/>
18
    </Style>
10 19
</ResourceDictionary>
b/trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml
1 1
<Window x:Class="Pithos.Client.WPF.PreferencesView"
2 2
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
        xmlns:tb="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification"
5
        xmlns:cal="http://www.caliburnproject.org" 
6
        x:Name="TheView"
3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        
4
        xmlns:cal="http://www.caliburnproject.org"
5
        xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" x:Name="TheView"
7 6
        Title="Pithos Preferences" Height="381" Width="600" 
8 7
        ShowInTaskbar="true"
9 8
        WindowStartupLocation="CenterScreen"
10 9
        Icon="/Pithos.Client.WPF;component/Images/Tray.ico"
11
        Background="#FFD4D0C8">
10
        Background="{StaticResource {x:Static SystemColors.ControlBrushKey}}">
11
        
12 12
    <Window.Resources>
13 13
        <ResourceDictionary>
14 14
        <ResourceDictionary.MergedDictionaries>
......
72 72
                            </ListBox.ItemTemplate>
73 73
                        </ListBox>
74 74
                        <StackPanel Orientation="Horizontal" Grid.Row="1">
75
                            <Button Name="AddPithosAccount" Content="Add Pithos" Style="{StaticResource ButtonStyle}" Width="70"/>
76
                            <Button Name="AddAccount" Content="Add Manual" Style="{StaticResource ButtonStyle}" Width="70"/>
77
                            <Button Name="RemoveAccount" Content="Remove" Style="{StaticResource ButtonStyle}" Width="50"/>                            
75
                            <extToolkit:DropDownButton Content="Add" Height="25" Width="75">
76
                                <extToolkit:DropDownButton.DropDownContent>
77
                                    <Menu>
78
                                        <Menu.ItemsPanel>                                            
79
                                                <ItemsPanelTemplate>
80
                                                    <VirtualizingStackPanel Orientation="Vertical"/>
81
                                                </ItemsPanelTemplate>                                            
82
                                        </Menu.ItemsPanel>
83

  
84
                                        <MenuItem Name="AddPithosAccount" Header="From Pithos" ToolTip="Go to Pithos site to login and retrieve the authentication token" cal:Message.Attach="AddPithosAccount"/>
85
                                        <MenuItem Name="AddAccount" Header="Manually" ToolTip="Enter account details manually" cal:Message.Attach="AddAccount"/>
86
                                    </Menu>
87
                                </extToolkit:DropDownButton.DropDownContent>
88
                            </extToolkit:DropDownButton>
89
                            <Button Name="RemoveAccount" Content="Remove" Style="{StaticResource ButtonStyle}" Width="75"/>                            
78 90
                        </StackPanel>
79 91
                    </Grid>
80 92
                    <GroupBox Header="Account" Padding="5" Margin="5" Height="231" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.Column="1">
b/trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs
230 230

  
231 231
        public async void AddPithosAccount()
232 232
       {
233
            var credentials=await PithosAccount.RetrieveCredentialsAsync(Settings.PithosSite);
233
            var credentials=await PithosAccount.RetrieveCredentialsAsync(Settings.PithosLoginUrl);
234 234
            var account = Settings.Accounts.FirstOrDefault(act => act.AccountName == credentials.UserName);
235 235
            if (account == null)
236 236
            {
b/trunk/Pithos.Client.WPF/Properties/Settings.Designer.cs
1 1
//------------------------------------------------------------------------------
2 2
// <auto-generated>
3 3
//     This code was generated by a tool.
4
//     Runtime Version:4.0.30319.239
4
//     Runtime Version:4.0.30319.488
5 5
//
6 6
//     Changes to this file may cause incorrect behavior and will be lost if
7 7
//     the code is regenerated.
......
212 212
            }
213 213
        }
214 214
        
215
        [global::System.Configuration.UserScopedSettingAttribute()]
216
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
217
        [global::System.Configuration.DefaultSettingValueAttribute("\r\n          <ArrayOfAccountSettings xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-i" +
218
            "nstance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n          </ArrayOfAccou" +
219
            "ntSettings>\r\n        ")]
220
        public global::Pithos.Interfaces.AccountsCollection Accounts {
221
            get {
222
                return ((global::Pithos.Interfaces.AccountsCollection)(this["Accounts"]));
223
            }
224
            set {
225
                this["Accounts"] = value;
226
            }
227
        }
228
        
229 215
        [global::System.Configuration.ApplicationScopedSettingAttribute()]
230 216
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
231 217
        [global::System.Configuration.DefaultSettingValueAttribute("https://pithos.dev.grnet.gr")]
......
243 229
                return ((string)(this["CloudfilesAuthenticationUrl"]));
244 230
            }
245 231
        }
232
        
233
        [global::System.Configuration.UserScopedSettingAttribute()]
234
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
235
        [global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ArrayOfAccountSettings xmlns:xsi=\"http:" +
236
            "//www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchem" +
237
            "a\" />")]
238
        public global::Pithos.Interfaces.AccountsCollection Accounts {
239
            get {
240
                return ((global::Pithos.Interfaces.AccountsCollection)(this["Accounts"]));
241
            }
242
            set {
243
                this["Accounts"] = value;
244
            }
245
        }
246
        
247
        [global::System.Configuration.ApplicationScopedSettingAttribute()]
248
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
249
        [global::System.Configuration.DefaultSettingValueAttribute("http://pithos.dev.grnet.gr/im/login")]
250
        public string PithosLoginUrl {
251
            get {
252
                return ((string)(this["PithosLoginUrl"]));
253
            }
254
        }
246 255
    }
247 256
}
b/trunk/Pithos.Client.WPF/Properties/Settings.settings
50 50
    <Setting Name="PithosSite" Type="System.String" Scope="Application">
51 51
      <Value Profile="(Default)">http://pithos.dev.grnet.gr</Value>
52 52
    </Setting>
53
    <Setting Name="Accounts" Type="Pithos.Interfaces.AccountsCollection" Scope="User">
54
      <Value Profile="(Default)">
55
          &lt;ArrayOfAccountSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
56
          &lt;/ArrayOfAccountSettings&gt;
57
        </Value>
58
    </Setting>
59 53
    <Setting Name="PithosAuthenticationUrl" Type="System.String" Scope="Application">
60 54
      <Value Profile="(Default)">https://pithos.dev.grnet.gr</Value>
61 55
    </Setting>
62 56
    <Setting Name="CloudfilesAuthenticationUrl" Type="System.String" Scope="Application">
63 57
      <Value Profile="(Default)">https://auth.api.rackspacecloud.com</Value>
64 58
    </Setting>
59
    <Setting Name="Accounts" Type="Pithos.Interfaces.AccountsCollection" Scope="User">
60
      <Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
61
&lt;ArrayOfAccountSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /&gt;</Value>
62
    </Setting>
63
    <Setting Name="PithosLoginUrl" Type="System.String" Scope="Application">
64
      <Value Profile="(Default)">http://pithos.dev.grnet.gr/im/login</Value>
65
    </Setting>
65 66
  </Settings>
66 67
</SettingsFile>
/dev/null
1
<Window x:Class="Pithos.Client.WPF.ShellView"
2
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
        xmlns:tb="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification" 
5
        xmlns:cal="http://www.caliburnproject.org"
6
        x:Name="TheView"
7
         >
8

  
9
    <Window.Resources>
10
        <ResourceDictionary>
11
            <ResourceDictionary.MergedDictionaries>
12
                <ResourceDictionary Source="PithosStyles.xaml" />
13
            </ResourceDictionary.MergedDictionaries>
14
        </ResourceDictionary>
15
    </Window.Resources>
16
    <Grid>
17
        <Grid.RowDefinitions>
18
            <RowDefinition Height="*"/>
19
            <RowDefinition Height="Auto"/>
20
        </Grid.RowDefinitions>
21

  
22
        <tb:TaskbarIcon x:Name="TaskbarView"                           
23
                        IconSource="{Binding StatusIcon}" 
24
                        ToolTipText="{Binding StatusMessage}"                        
25
                        MenuActivation="LeftOrRightClick" 
26
                        DoubleClickCommand="{Binding OpenPithosFolderCommand}"                         
27
                        >
28
            <tb:TaskbarIcon.ContextMenu>
29
                <ContextMenu x:Name="TaskbarMenu" >
30
                    <MenuItem Header="Open PITHOS Folder" x:Name="OpenPithosFolder" ItemsSource="{Binding Accounts}" >
31
                        <MenuItem.ItemTemplate>
32
                            <DataTemplate>
33
                                <TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action OpenPithosFolder($dataContext)]" 
34
                                           cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" />
35
                            </DataTemplate>
36
                        </MenuItem.ItemTemplate>                        
37
                        </MenuItem> 
38
                    <MenuItem Header="Go to Account Site" x:Name="GoToSiteMenu" ItemsSource="{Binding Accounts}" >
39
                        <MenuItem.ItemTemplate>
40
                            <DataTemplate>
41
                                <TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite($dataContext)]" 
42
                                           cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" />
43
                            </DataTemplate>
44
                        </MenuItem.ItemTemplate>
45
                    </MenuItem>
46

  
47
                    <MenuItem Header="Recently Changed Files" x:Name="RecentFiles" ItemsSource="{Binding RecentFiles}">
48
                        <MenuItem.ItemTemplate>
49
                            <DataTemplate>
50
                                <TextBlock Text="{Binding FileName}"/>
51
                            </DataTemplate>
52
                        </MenuItem.ItemTemplate>
53
                    </MenuItem>
54
                    <Separator  />                    
55
                    <MenuItem Header="Usage" x:Name="Usages" ItemsSource="{Binding Accounts}">
56
                        <MenuItem.ItemTemplate>
57
                            <DataTemplate>
58
                                <StackPanel Orientation="Horizontal">
59
                                    <TextBlock Text="{Binding UserName}" />
60
                                    <TextBlock Text=":" Margin="5,0"/>
61
                                    <TextBlock Text="{Binding Usage}" />
62
                                </StackPanel>
63
                            </DataTemplate>
64
                        </MenuItem.ItemTemplate>
65
                    </MenuItem>
66
                    <Separator  />
67
                    <MenuItem Header="{Binding StatusMessage}" x:Name="StatusMessage" />
68
                    <Separator  />
69
                    <MenuItem  Header="{Binding PauseSyncCaption}" x:Name="ToggleSynching" cal:Message.Attach="ToggleSynching"  />
70
                    <Separator  />
71
                    <MenuItem  Header="Preferences ..." x:Name="ShowPreferences" cal:Message.Attach="ShowPreferences"  />
72
                    <Separator  />
73
                    <MenuItem  Header="Exit" Name="ExitPithos" cal:Message.Attach="ExitPithos" />
74
                </ContextMenu>
75
            </tb:TaskbarIcon.ContextMenu>
76
        </tb:TaskbarIcon>
77
    </Grid>
78
</Window>
b/trunk/Pithos.Client.WPF/app.config
75 75
      <setting name="Accounts" serializeAs="Xml">
76 76
        <value>
77 77
          <ArrayOfAccountSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
78
            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
79
          </ArrayOfAccountSettings>
78
            xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
80 79
        </value>
81 80
      </setting>
82 81
    </Pithos.Client.WPF.Properties.Settings>
......
90 89
      <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
91 90
    </DbProviderFactories>
92 91
  </system.data>
92

  
93 93
  <startup useLegacyV2RuntimeActivationPolicy="true">
94 94
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
95 95
  </startup>
......
104 104
      <setting name="CloudfilesAuthenticationUrl" serializeAs="String">
105 105
        <value>https://auth.api.rackspacecloud.com</value>
106 106
      </setting>
107
      <setting name="PithosLoginUrl" serializeAs="String">
108
        <value>http://pithos.dev.grnet.gr/im/login</value>
109
      </setting>
107 110
    </Pithos.Client.WPF.Properties.Settings>
108 111
  </applicationSettings>
109 112
  <log4net>
b/trunk/Pithos.Client.WPF/packages.config
2 2
<packages>
3 3
  <package id="Caliburn.Micro" version="1.2.0" />
4 4
  <package id="Caliburn.Micro.Logging" version="1.2" />
5
  <package id="Extended.Wpf.Toolkit" version="1.5.0" />
5 6
  <package id="System.Data.SQLite" version="1.0.66.1" />
6
  <package id="wpfthemes" version="0.0.1" />
7 7
</packages>

Also available in: Unified diff