Revision b12f73e8

b/trunk/Pithos.Client.WPF/FileProperties/NewContainerView.xaml
1
<Window x:Class="Pithos.Client.WPF.FileProperties.NewContainerView"
2
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
        Title="NewContainerView" Height="300" Width="300">
5
    <Grid>
6
        
7
    </Grid>
8
</Window>
b/trunk/Pithos.Client.WPF/FileProperties/NewContainerView.xaml.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Windows;
6
using System.Windows.Controls;
7
using System.Windows.Data;
8
using System.Windows.Documents;
9
using System.Windows.Input;
10
using System.Windows.Media;
11
using System.Windows.Media.Imaging;
12
using System.Windows.Shapes;
13

  
14
namespace Pithos.Client.WPF.FileProperties
15
{
16
    /// <summary>
17
    /// Interaction logic for NewContainerView.xaml
18
    /// </summary>
19
    public partial class NewContainerView : Window
20
    {
21
        public NewContainerView()
22
        {
23
            InitializeComponent();
24
        }
25
    }
26
}
b/trunk/Pithos.Client.WPF/FileProperties/NewContainerViewModel.cs
1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel.Composition;
4
using System.Linq;
5
using System.Text;
6
using Caliburn.Micro;
7
using Pithos.Core;
8

  
9
namespace Pithos.Client.WPF.FileProperties
10
{
11
    [Export(typeof(NewContainerViewModel))]
12
    public class NewContainerViewModel:Screen
13
    {
14
        public IEnumerable<string> Accounts { get; set; }
15

  
16
        private string _currentAccount;
17
        public string CurrentAccount
18
        {
19
            get { return _currentAccount; }
20
            set
21
            {
22
                _currentAccount = value;
23
                NotifyOfPropertyChange(()=>CurrentAccount);
24
            }
25
        }
26

  
27
        private string _containerName;
28
        public string ContainerName
29
        {
30
            get { return _containerName; }
31
            set
32
            {
33
                _containerName = value;
34
                NotifyOfPropertyChange(()=>ContainerName);
35
            }
36
        }
37

  
38
        public NewContainerViewModel(ShellViewModel shell)
39
        {
40
            Accounts=shell.Monitors.Select(pair => pair.Value.UserName);
41

  
42
        }
43

  
44
        public bool CanCreateContainer
45
        {
46
            get { return !String.IsNullOrWhiteSpace(CurrentAccount) && !String.IsNullOrWhiteSpace(ContainerName); }
47
        }
48

  
49
        public void CreateContainer()
50
        {
51
            
52
        }
53

  
54
    }
55
}
b/trunk/Pithos.Client.WPF/Pithos.Client.WPF.csproj
251 251
    </ApplicationDefinition>
252 252
    <Compile Include="Converters\EmptyToVisibilityConverter.cs" />
253 253
    <Compile Include="FileProperties\ContainerPolicy.cs" />
254
    <Compile Include="FileProperties\NewContainerView.xaml.cs">
255
      <DependentUpon>NewContainerView.xaml</DependentUpon>
256
    </Compile>
257
    <Compile Include="FileProperties\NewContainerViewModel.cs" />
254 258
    <Compile Include="Shell\AboutView.xaml.cs">
255 259
      <DependentUpon>AboutView.xaml</DependentUpon>
256 260
    </Compile>
......
296 300
    <Compile Include="Shell\ShellViewModel.cs" />
297 301
    <Compile Include="Services\StatusService.cs" />
298 302
    <Compile Include="Wpf32Window.cs" />
303
    <Page Include="FileProperties\NewContainerView.xaml">
304
      <SubType>Designer</SubType>
305
      <Generator>MSBuild:Compile</Generator>
306
    </Page>
299 307
    <Page Include="Shell\AboutView.xaml">
300 308
      <SubType>Designer</SubType>
301 309
      <Generator>MSBuild:Compile</Generator>
b/trunk/Pithos.Network/CloudFilesClient.cs
819 819
        }
820 820

  
821 821
        public void CreateContainer(string account, string container)
822
        {            
822
        {
823
            if (String.IsNullOrWhiteSpace(account))
824
                throw new ArgumentNullException("account");
823 825
            if (String.IsNullOrWhiteSpace(container))
824
                throw new ArgumentNullException("container", "The container property can't be empty");
826
                throw new ArgumentNullException("container");
825 827
            Contract.EndContractBlock();
826 828

  
827 829
            using (var client = new RestClient(_baseClient))

Also available in: Unified diff