Added Open Pithos folder for multiple accounts
[pithos-ms-client] / trunk / Pithos.Client.WPF / ShellView.xaml
index 6297c81..5550f69 100644 (file)
@@ -3,6 +3,7 @@
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:tb="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification" 
         xmlns:cal="http://www.caliburnproject.org"
+        x:Name="TheView"
          >
 
     <Window.Resources>
                         >
             <tb:TaskbarIcon.ContextMenu>
                 <ContextMenu x:Name="TaskbarMenu" >
-                    <MenuItem Header="Open PITHOS Folder" x:Name="OpenPithosFolder" cal:Message.Attach="OpenPithosFolder" FontWeight="Bold" />
-                    <MenuItem Header="Launch PITHOS Site"  x:Name="GoToSite" cal:Message.Attach="GoToSite" />
+                    <MenuItem Header="Open PITHOS Folder" x:Name="OpenPithosFolder" ItemsSource="{Binding Accounts}" >
+                        <MenuItem.ItemTemplate>
+                            <DataTemplate>
+                                <TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action OpenPithosFolder($dataContext)]" 
+                                           cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" />
+                            </DataTemplate>
+                        </MenuItem.ItemTemplate>                        
+                        </MenuItem> 
+                    <MenuItem Header="Go to Account Site" x:Name="GoToSiteMenu" ItemsSource="{Binding Accounts}" >
+                        <MenuItem.ItemTemplate>
+                            <DataTemplate>
+                                <TextBlock x:Name="AccountLink" Text="{Binding Path=UserName}" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite($dataContext)]" 
+                                           cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=2}, Path=DataContext}" />
+                            </DataTemplate>
+                        </MenuItem.ItemTemplate>
+                    </MenuItem>
+
                     <MenuItem Header="Recently Changed Files" x:Name="RecentFiles" ItemsSource="{Binding RecentFiles}">
                         <MenuItem.ItemTemplate>
                             <DataTemplate>
                             </DataTemplate>
                         </MenuItem.ItemTemplate>
                     </MenuItem>
-                    <Separator  />
-                    <MenuItem Header="{Binding UsageMessage}" x:Name="UsageMessage" />
+                    <Separator  />                    
+                    <MenuItem Header="Usage" x:Name="Usages" ItemsSource="{Binding Accounts}">
+                        <MenuItem.ItemTemplate>
+                            <DataTemplate>
+                                <StackPanel Orientation="Horizontal">
+                                    <TextBlock Text="{Binding UserName}" />
+                                    <TextBlock Text=":" Margin="5,0"/>
+                                    <TextBlock Text="{Binding Usage}" />
+                                </StackPanel>
+                            </DataTemplate>
+                        </MenuItem.ItemTemplate>
+                    </MenuItem>
                     <Separator  />
                     <MenuItem Header="{Binding StatusMessage}" x:Name="StatusMessage" />
                     <Separator  />