case enclosureNode:
{
currentItem.Version = reader.GetAttribute(versionAttribute);
- currentItem.DownloadLink = reader.GetAttribute(urlAttribute);
+
+ var downloadLink = reader.GetAttribute(urlAttribute);
+ downloadLink = Environment.Is64BitOperatingSystem
+ ? downloadLink.Replace(".x86.", ".x64.")
+ : downloadLink.Replace(".x64.", ".x86.") ;
+ currentItem.DownloadLink = downloadLink;
currentItem.DSASignature = reader.GetAttribute(dasSignature);
break;
<DependentUpon>MessageView.xaml</DependentUpon>
</Compile>
<Compile Include="NativeMethods.cs" />
+ <Compile Include="Shell\MiniStatusView.xaml.cs">
+ <DependentUpon>MiniStatusView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Shell\MiniStatusViewModel.cs" />
<Compile Include="Shell\Notification.cs" />
<Compile Include="PithosAccount.cs" />
<Compile Include="Preferences\PreferencesView.xaml.cs">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Shell\MiniStatusView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Shell\PithosBalloon.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
--- /dev/null
+<Window x:Class="Pithos.Client.WPF.Shell.MiniStatusView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+
+ Title="Pithos Status" Height="100" Width="250" WindowStyle="ToolWindow" Topmost="True" Icon="/Pithos;component/Images/PithosTaskbar.png" WindowStartupLocation="CenterOwner">
+ <Border HorizontalAlignment="Stretch"
+ VerticalAlignment="Stretch" CornerRadius="2">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition/>
+ </Grid.ColumnDefinitions>
+ <Image Grid.Column="0" Width="48" Height="48" HorizontalAlignment="Right" Margin="0,5,5,0" VerticalAlignment="Top" Source="/Pithos;component/Images/PithosTaskbar.png" Stretch="Fill" Opacity="0.7" ToolTip="Close Balloon" />
+ <TextBlock TextWrapping="Wrap" x:Name="Status"
+ HorizontalAlignment="Stretch"
+ VerticalAlignment="Stretch" Grid.Column="1" Margin="2,5,2,2"/>
+ </Grid>
+ </Border>
+</Window>
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Pithos.Client.WPF.Shell
+{
+ /// <summary>
+ /// Interaction logic for MiniStatusView.xaml
+ /// </summary>
+ public partial class MiniStatusView : Window
+ {
+ public MiniStatusView()
+ {
+ InitializeComponent();
+
+ this.Top=System.Windows.SystemParameters.WorkArea.Height - this.Height;
+ this.Left = System.Windows.SystemParameters.WorkArea.Width - this.Width;
+ }
+
+ private void imgClose_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ this.Close();
+ }
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using System.Text;
+using Caliburn.Micro;
+
+namespace Pithos.Client.WPF.Shell
+{
+ [Export(typeof(MiniStatusViewModel))]
+ public class MiniStatusViewModel:Screen
+ {
+ public override string DisplayName
+ {
+ get
+ {
+ return "Pithos Status";
+ }
+ set
+ {
+ base.DisplayName = value;
+ }
+ }
+
+ public string Status
+ {
+ get { return Shell.StatusMessage; }
+ }
+
+ private ShellViewModel _shell;
+ public ShellViewModel Shell
+ {
+ get { return _shell; }
+ set
+ {
+ _shell = value;
+ _shell.PropertyChanged += OnParentChanged;
+ }
+ }
+
+ private void OnParentChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName=="StatusMessage")
+ NotifyOfPropertyChange(()=>Status);
+ }
+ }
+}
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Check For Upgrade" x:Name="CheckForUpgrade" cal:Message.Attach="CheckForUpgrade"/>
+ <MenuItem Header="Show Status Window" x:Name="ShowMiniStatus" cal:Message.Attach="ShowMiniStatus"/>
<MenuItem x:Name="GoToSiteRootMenu" cal:Message.Attach="[Event MouseLeftButtonUp]=[Action GoToSite()]"
cal:Action.TargetWithoutContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=MenuItem, AncestorLevel=1}, Path=DataContext}" >
<MenuItem.HeaderTemplate>
Process.Start(uri);
}
+ public void ShowMiniStatus()
+ {
+ var model=IoC.Get<MiniStatusViewModel>();
+ model.Shell = this;
+ _windowManager.ShowWindow(model);
+ }
+
/// <summary>
/// Open an explorer window to the target path's directory
/// and select the file
notification.Message = "Start Synchronisation";
}
+ var deleteNotification = notification as CloudDeleteNotification;
+ if (deleteNotification != null)
+ {
+ StatusMessage = String.Format("Deleted {0}", deleteNotification.Data.Name);
+ return;
+ }
+
var progress = notification as ProgressNotification;
if (progress != null)
{
[Import]
public IStatusKeeper StatusKeeper { get; set; }
+
+ public IStatusNotification StatusNotification { get; set; }
//A separate agent is used to execute delete actions immediatelly;
private readonly ActionBlock<CloudDeleteAction> _deleteAgent;
client.DeleteObject(account, container, cloudFile.Name);
StatusKeeper.ClearFileStatus(fullPath);
+ StatusNotification.Notify(new CloudNotification{Data=cloudFile});
}
}
private Agent<CloudAction> _agent;
[System.ComponentModel.Composition.Import]
- private DeleteAgent _deleteAgent=new DeleteAgent();
+ private DeleteAgent _deleteAgent { get; set; }
[System.ComponentModel.Composition.Import]
public IStatusKeeper StatusKeeper { get; set; }
-
- public IStatusNotification StatusNotification { get; set; }
+
+ private IStatusNotification _statusNotification;
+ public IStatusNotification StatusNotification
+ {
+ get { return _statusNotification; }
+ set
+ {
+ _statusNotification = value;
+ _deleteAgent.StatusNotification = value;
+ }
+ }
[System.ComponentModel.Composition.Import]
{\r
\r
}\r
+ public class CloudDeleteNotification:CloudNotification\r
+ {\r
+ \r
+ }\r
\r
public class ExpirationNotification:Notification<AccountSettings>\r
{\r