Fixes to Add/Remove accounts
authorPanagiotis Kanavos <pkanavos@gmail.com>
Thu, 20 Oct 2011 20:13:53 +0000 (23:13 +0300)
committerPanagiotis Kanavos <pkanavos@gmail.com>
Thu, 20 Oct 2011 20:13:53 +0000 (23:13 +0300)
35 files changed:
trunk/Libraries/Json40r2/Source/Src/Newtonsoft.Json/Newtonsoft.Json.csproj
trunk/Libraries/ParallelExtensionsExtras/ParallelExtensionsExtras.csproj
trunk/NotifyIconWpf/NotifyIconWpf.csproj
trunk/Pithos.Client.Test/Pithos.Client.Test.csproj
trunk/Pithos.Client.WPF/FileProperties/FilePropertiesView.xaml [moved from trunk/Pithos.Client.WPF/FilePropertiesView.xaml with 100% similarity]
trunk/Pithos.Client.WPF/FileProperties/FilePropertiesView.xaml.cs [moved from trunk/Pithos.Client.WPF/FilePropertiesView.xaml.cs with 100% similarity]
trunk/Pithos.Client.WPF/FileProperties/FilePropertiesViewModel.cs [moved from trunk/Pithos.Client.WPF/FilePropertiesViewModel.cs with 89% similarity]
trunk/Pithos.Client.WPF/Pithos.Client.WPF.csproj
trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml [moved from trunk/Pithos.Client.WPF/PreferencesView.xaml with 93% similarity]
trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml.cs [moved from trunk/Pithos.Client.WPF/PreferencesView.xaml.cs with 100% similarity]
trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs [moved from trunk/Pithos.Client.WPF/PreferencesViewModel.cs with 64% similarity]
trunk/Pithos.Client.WPF/Properties/Settings.Designer.cs
trunk/Pithos.Client.WPF/Properties/Settings.settings
trunk/Pithos.Client.WPF/SelectiveSynch/SelectiveSynchViewModel.cs
trunk/Pithos.Client.WPF/ShellViewModel.cs
trunk/Pithos.Client.WPF/app.config
trunk/Pithos.Core.Test/Pithos.Core.Test.csproj
trunk/Pithos.Core/Agents/NetworkAgent.cs
trunk/Pithos.Core/Pithos.Core.csproj
trunk/Pithos.Core/PithosMonitor.cs
trunk/Pithos.Core/TaskExtensions.cs
trunk/Pithos.Interfaces/Pithos.Interfaces.csproj
trunk/Pithos.Network.Test/Pithos.Network.Test.csproj
trunk/Pithos.Network/Pithos.Network.csproj
trunk/Pithos.Setup.x64/Pithos.Setup.x64.vdproj
trunk/Pithos.ShellExtensions.Test/Pithos.ShellExtensions.Test.csproj
trunk/Pithos.ShellExtensions/IoC.cs
trunk/Pithos.ShellExtensions/Menus/FileContextMenu.cs
trunk/Pithos.ShellExtensions/Overlays/IconOverlayBase.cs
trunk/Pithos.ShellExtensions/Pithos.ShellExtensions.csproj
trunk/Pithos.ShellExtensions/ProjectInstaller.cs
trunk/Pithos.ShellExtensions/ShellExtLib.cs
trunk/Pithos.ShellExtensions/ShellSettings.cs
trunk/Pithos.ShellExtensions/ShellStatusChecker.cs
trunk/Pithos.sln

index 62b2c30..7b87e84 100644 (file)
     <CodeContractsReferenceAssembly>Build</CodeContractsReferenceAssembly>
     <CodeContractsAnalysisWarningLevel>0</CodeContractsAnalysisWarningLevel>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
+    <DocumentationFile>bin\Debug\Net\Newtonsoft.Json.xml</DocumentationFile>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <RunCodeAnalysis>true</RunCodeAnalysis>
+    <CodeAnalysisLogFile>bin\Debug\Net\Newtonsoft.Json.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Core">
index 6c9d902..a347a81 100644 (file)
     <CodeContractsReferenceAssembly>Build</CodeContractsReferenceAssembly>
     <CodeContractsAnalysisWarningLevel>0</CodeContractsAnalysisWarningLevel>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\ParallelExtensionsExtras.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Core" />
index a3596ec..61c306e 100644 (file)
     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\Hardcodet.Wpf.TaskbarNotification.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Core">
index 001be9e..8585150 100644 (file)
     <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
     <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\Pithos.Client.Test.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="nunit.framework">
       <HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
@@ -20,5 +20,9 @@ namespace Pithos.Client.WPF
     [Export(typeof(FilePropertiesViewModel))]
     public class FilePropertiesViewModel : Screen, IShell
     {
+        public FilePropertiesViewModel()
+        {
+            
+        }
     }
 }
index 2ce40e7..910ddd1 100644 (file)
     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|x86'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\Pithos.Client.WPF.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\Pithos.Client.WPF.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="Caliburn.Micro, Version=1.2.0.0, Culture=neutral, PublicKeyToken=8e5891231f2ed21f, processorArchitecture=MSIL">
       <HintPath>..\Libraries\Caliburn.Micro.dll</HintPath>
     <Compile Include="Caliburn\Micro\Logging\log4netLogger.cs" />
     <Compile Include="Configuration\PithosSettings.cs" />
     <Compile Include="FileEntry.cs" />
-    <Compile Include="FilePropertiesView.xaml.cs">
+    <Compile Include="FileProperties\FilePropertiesView.xaml.cs">
       <DependentUpon>FilePropertiesView.xaml</DependentUpon>
     </Compile>
-    <Compile Include="FilePropertiesViewModel.cs" />
+    <Compile Include="FileProperties\FilePropertiesViewModel.cs" />
     <Compile Include="NativeMethods.cs" />
     <Compile Include="Notification.cs" />
     <Compile Include="PithosAccount.cs" />
     <Compile Include="PithosCommand.cs" />
-    <Compile Include="PreferencesView.xaml.cs">
+    <Compile Include="Preferences\PreferencesView.xaml.cs">
       <DependentUpon>PreferencesView.xaml</DependentUpon>
     </Compile>
-    <Compile Include="PreferencesViewModel.cs" />
+    <Compile Include="Preferences\PreferencesViewModel.cs" />
     <Compile Include="SelectiveSynch\DirectoryRecord.cs" />
     <Compile Include="SelectiveSynch\SelectiveSynchChanges.cs" />
     <Compile Include="SelectiveSynch\SelectiveSynchView.xaml.cs">
     <Compile Include="ShellViewModel.cs" />
     <Compile Include="Services\StatusService.cs" />
     <Compile Include="Wpf32Window.cs" />
-    <Page Include="FilePropertiesView.xaml">
+    <Page Include="FileProperties\FilePropertiesView.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="PreferencesView.xaml">
+    <Page Include="Preferences\PreferencesView.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
   <ItemGroup>
     <Resource Include="Images\TraySyncPaused.ico" />
   </ItemGroup>
-  <ItemGroup />
+  <ItemGroup>
+    <COMReference Include="IWshRuntimeLibrary">
+      <Guid>{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B}</Guid>
+      <VersionMajor>1</VersionMajor>
+      <VersionMinor>0</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>tlbimp</WrapperTool>
+      <Isolated>False</Isolated>
+      <EmbedInteropTypes>False</EmbedInteropTypes>
+    </COMReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
@@ -12,7 +12,7 @@
     <Window.Resources>
         <ResourceDictionary>
         <ResourceDictionary.MergedDictionaries>
-            <ResourceDictionary Source="PithosStyles.xaml" />
+            <ResourceDictionary Source="..\PithosStyles.xaml" />
             </ResourceDictionary.MergedDictionaries>
         </ResourceDictionary>
     </Window.Resources>
@@ -43,7 +43,7 @@
                 <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="Settings_StartOnSystemStartup" Margin="5,5,5,0" />
+                        <CheckBox Content="Start on System Startup" Height="16" Name="StartOnSystemStartup" Margin="5,5,5,0" />
                     </StackPanel>
                 </GroupBox>
             </TabItem>
@@ -64,8 +64,7 @@
                             <RowDefinition Height="*"/>
                             <RowDefinition Height="Auto"/>
                         </Grid.RowDefinitions>
-                        <ListBox Name="Settings_Accounts" SelectedIndex="{Binding SelectedAccountIndex}" Grid.Row="0" 
-                                 VerticalAlignment="Stretch" >
+                        <ListBox Name="Accounts" Grid.Row="0" VerticalAlignment="Stretch" ItemsSource="{Binding Accounts,Mode=OneWay}" SelectedItem="{Binding CurrentAccount,Mode=TwoWay}" >
                             <ListBox.ItemTemplate>
                                 <DataTemplate>
                                     <TextBlock Text="{Binding AccountName}" />
                     </StackPanel>
                 </TabItem.Header>
                 <StackPanel>
-                
-                <GroupBox Header="Pithos Folder" Height="60" Name="groupBox3" Margin="5" VerticalAlignment="Top">
-                    <Grid>
-                        <TextBox Height="23" HorizontalAlignment="Left" Margin="6,6,0,0" Name="Settings_PithosPath"  VerticalAlignment="Top" Width="247" />
-                        <Button Content="Move" Height="23" HorizontalAlignment="Left" Margin="259,6,0,0" Name="ChangePithosFolder" VerticalAlignment="Top" Width="75" />
-                    </Grid>
-                </GroupBox>
                     <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>
@@ -4,34 +4,25 @@
 // </copyright>
 // -----------------------------------------------------------------------
 
-using System.Collections;
+using System.Collections.Concurrent;
 using System.ComponentModel.Composition;
-using System.Diagnostics;
 using System.IO;
-using System.IO.IsolatedStorage;
-using System.Linq.Expressions;
-using System.Net;
 using System.Reflection;
-using System.Runtime.InteropServices;
-using System.Runtime.Serialization;
 using System.Windows;
 using System.Windows.Forms;
-using System.Windows.Interop;
 using Caliburn.Micro;
-using Hardcodet.Wpf.TaskbarNotification;
+using IWshRuntimeLibrary;
 using Pithos.Client.WPF.Configuration;
 using Pithos.Client.WPF.SelectiveSynch;
 using Pithos.Core;
 using Pithos.Interfaces;
-using IWin32Window = System.Windows.Forms.IWin32Window;
+using File = System.IO.File;
 using Screen = Caliburn.Micro.Screen;
 
 namespace Pithos.Client.WPF
 {
     using System;
-    using System.Collections.Generic;
     using System.Linq;
-    using System.Text;
     using System.Threading.Tasks;
 
     /// <summary>
@@ -53,7 +44,33 @@ namespace Pithos.Client.WPF
                 NotifyOfPropertyChange(()=>Settings);
             }
         }
+
+        private ObservableConcurrentCollection<AccountSettings> _accounts;
+        public ObservableConcurrentCollection<AccountSettings> Accounts
+        {
+            get { return _accounts; }
+            set 
+            { 
+                _accounts = value;
+                NotifyOfPropertyChange(()=>Accounts);
+            }
+        }
         
+        public bool StartOnSystemStartup { get; set; }
+
+        private static void CreateShortcut(string shortcutPath)
+        {
+            var wshShell = new WshShellClass();
+            var shortcut = (IWshRuntimeLibrary.IWshShortcut) wshShell.CreateShortcut(
+                shortcutPath);
+
+            var exePath = Assembly.GetExecutingAssembly().Location;
+            shortcut.TargetPath = exePath;
+            shortcut.WorkingDirectory = Path.GetDirectoryName(exePath);
+            shortcut.Description = "Pithos";            
+            shortcut.Save();
+        }
+
         public ShellViewModel Shell { get;  set; }
         //ShellExtensionController _extensionController=new ShellExtensionController();
 
@@ -65,9 +82,16 @@ namespace Pithos.Client.WPF
             DisplayName = "Pithos Preferences";
             Shell = shell;
 
-            Settings=settings;            
+            Settings=settings;
+            Accounts = new ObservableConcurrentCollection<AccountSettings>();
+            Accounts.AddFromEnumerable(settings.Accounts);
+            
+            var startupPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
+            _shortcutPath = Path.Combine(startupPath, "Pithos.lnk");
 
 
+            StartOnSystemStartup = File.Exists(_shortcutPath);
+
         }
 
 
@@ -116,7 +140,10 @@ namespace Pithos.Client.WPF
         
         public void SelectiveSyncFolders()
         {
-            var model = new SelectiveSynchViewModel(_events,CurrentAccount);
+            var monitor = Shell.Monitors[CurrentAccount.AccountName];
+            var folders=monitor.GetRootFolders();
+
+            var model = new SelectiveSynchViewModel(folders,_events,CurrentAccount);
             if (_windowManager.ShowDialog(model) == true)
             {
                 
@@ -143,15 +170,31 @@ namespace Pithos.Client.WPF
         private void DoSave()
         {
             Settings.Save();
+            SetStartupMode();
+
+
             foreach (var account in Settings.Accounts)
-            {                
+            {                                
                 Shell.MonitorAccount(account);
             }
 
             NotifyOfPropertyChange(()=>Settings);
         }
 
-        public void ChangePithosFolder()
+        private void SetStartupMode()
+        {
+            if (StartOnSystemStartup && !File.Exists(_shortcutPath))
+            {
+                CreateShortcut(_shortcutPath);
+            }
+            else if (!StartOnSystemStartup && File.Exists(_shortcutPath))
+            {
+                if (File.Exists(_shortcutPath))
+                    File.Delete(_shortcutPath);
+            }
+        }
+
+     /*   public void ChangePithosFolder()
         {
             var browser = new FolderBrowserDialog();
             browser.SelectedPath = Settings.PithosPath;
@@ -159,19 +202,29 @@ namespace Pithos.Client.WPF
             if (result == DialogResult.OK)
             {
                 var newPath = browser.SelectedPath;
+                var accountName = CurrentAccount.AccountName;
+                var monitor = Shell.Monitors[accountName];
+                monitor.Stop();
+                
+                Shell.Monitors.Remove(accountName);
+
                 Directory.Move(Settings.PithosPath, newPath);
                 Settings.PithosPath = newPath;
                 Settings.Save();
-                NotifyOfPropertyChange(() => Settings);
 
+                Shell.MonitorAccount(CurrentAccount);
+
+                NotifyOfPropertyChange(() => Settings);                
             }
         }
-
+*/
        public void AddAccount()
         {
             var newAccount = new AccountSettings();
             Settings.Accounts.Add(newAccount);
-            SelectedAccountIndex= Settings.Accounts.Count-1;           
+            //SelectedAccountIndex= Settings.Accounts.Count-1;
+           CurrentAccount = newAccount;
+            NotifyOfPropertyChange(() => Accounts);
             NotifyOfPropertyChange(()=>Settings);
         }
 
@@ -190,13 +243,16 @@ namespace Pithos.Client.WPF
                                UsePithos=true
                            };
                            Settings.Accounts.Add(account);
+                           (Accounts as IProducerConsumerCollection<AccountSettings>).TryAdd(account);
                        }
                        else
                        {
                            account.ApiKey=credentials.Password;
                        }
-                       SelectedAccountIndex= Settings.Accounts.IndexOf(account);
-                       NotifyOfPropertyChange(()=>Settings);
+                       //SelectedAccountIndex= Settings.Accounts.IndexOf(account);
+                       CurrentAccount = account;
+                       NotifyOfPropertyChange(() => Accounts);
+                       NotifyOfPropertyChange(()=>Settings);                       
                    });
             ((Task)task).WaitWithPumping();
        }
@@ -204,12 +260,16 @@ namespace Pithos.Client.WPF
         public void RemoveAccount()
         {
             var accountName = CurrentAccount.AccountName;
-            Settings.Accounts.RemoveAll(account => account.AccountName == accountName);
-
+            Settings.Accounts.Remove(CurrentAccount);
+
+            Accounts.TryRemove(CurrentAccount);
+            
+            
+            CurrentAccount = null;
+            //Accounts = Settings.Accounts;
+            //Settings.Save();            
             Shell.RemoveMonitor(accountName);
-
-            NotifyOfPropertyChange(()=>CurrentAccount);
-            NotifyOfPropertyChange(()=>Settings);
+            
             //NotifyOfPropertyChange("Settings.Accounts");
         }
 
@@ -243,7 +303,7 @@ namespace Pithos.Client.WPF
        
         #endregion
 
-        private int _selectedAccountIndex;
+       /* private int _selectedAccountIndex;
         public int SelectedAccountIndex
         {
             get { return _selectedAccountIndex; }
@@ -261,11 +321,26 @@ namespace Pithos.Client.WPF
                 NotifyOfPropertyChange(() => CanRemoveAccount);
                 NotifyOfPropertyChange(()=>SelectedAccountIndex);
             }
-        }
+        }*/
 
         private AccountSettings _currentAccount;
         private IWindowManager _windowManager;
+        private string _shortcutPath;
+
 
+        
+        public AccountSettings CurrentAccount
+        {
+            get { return _currentAccount; }
+            set
+            {
+                _currentAccount = value;
+                NotifyOfPropertyChange(()=>CurrentAccount);
+                NotifyOfPropertyChange(() => CanRemoveAccount);
+            }
+        }
+
+/*
         public AccountSettings CurrentAccount
         {
             get {
@@ -275,6 +350,7 @@ namespace Pithos.Client.WPF
             }
 
         }
+*/
 
 
 
@@ -294,25 +370,36 @@ namespace Pithos.Client.WPF
 
             var newPath= dlg.SelectedPath;                
             //Find the account's monitor and stop it
-            var monitor = Shell.Monitors[CurrentAccount.AccountName];            
-            monitor.Stop();
-                            
-            var oldPath = monitor.RootPath;                
-            //The old directory may not exist eg. if we create an account for the first time
-            if (Directory.Exists(oldPath))
+            PithosMonitor monitor;
+            if (Shell.Monitors.TryGetValue(CurrentAccount.AccountName, out monitor))
             {
-                //If it does, do the move
-                Directory.Move(oldPath, newPath);
-                //We also need to change the path of the existing file states
-                monitor.MoveFileStates(oldPath, newPath);
+                monitor.Stop();
+
+
+                var oldPath = monitor.RootPath;
+                //The old directory may not exist eg. if we create an account for the first time
+                if (Directory.Exists(oldPath))
+                {
+                    //If it does, do the move
+                    Directory.Move(oldPath, newPath);
+                    //We also need to change the path of the existing file states
+                    if (monitor != null)
+                        monitor.MoveFileStates(oldPath, newPath);
+                }
             }
             //Replace the old rootpath with the new
             CurrentAccount.RootPath = newPath;
             //TODO: This will save all settings changes. Too coarse grained, need to fix at a later date
             Settings.Save();            
             //And start the monitor on the new RootPath            
-            monitor.RootPath = newPath;
-            monitor.Start();
+            if (monitor != null)
+            {
+                monitor.RootPath = newPath;
+                if (CurrentAccount.IsActive)
+                    monitor.Start();
+            }
+            else
+                Shell.MonitorAccount(CurrentAccount);
             //Finally, notify that the Settings, CurrentAccount have changed
             NotifyOfPropertyChange(() => CurrentAccount);
             NotifyOfPropertyChange(() => Settings);
index 373a9d9..2498526 100644 (file)
@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.235
+//     Runtime Version:4.0.30319.239
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -212,6 +212,20 @@ namespace Pithos.Client.WPF.Properties {
             }
         }
         
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("\r\n          <ArrayOfAccountSettings xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-i" +
+            "nstance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n          </ArrayOfAccou" +
+            "ntSettings>\r\n        ")]
+        public global::Pithos.Interfaces.AccountsCollection Accounts {
+            get {
+                return ((global::Pithos.Interfaces.AccountsCollection)(this["Accounts"]));
+            }
+            set {
+                this["Accounts"] = value;
+            }
+        }
+        
         [global::System.Configuration.ApplicationScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.Configuration.DefaultSettingValueAttribute("https://pithos.dev.grnet.gr")]
@@ -229,24 +243,5 @@ namespace Pithos.Client.WPF.Properties {
                 return ((string)(this["CloudfilesAuthenticationUrl"]));
             }
         }
-        
-        [global::System.Configuration.UserScopedSettingAttribute()]
-        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute(@"<?xml version=""1.0"" encoding=""utf-16""?>
-<ArrayOfAccountSettings xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
-  <AccountSettings>
-    <IsActive>false</IsActive>
-    <UsePithos>false</UsePithos>
-    <SelectiveFolders />
-  </AccountSettings>
-</ArrayOfAccountSettings>")]
-        public global::Pithos.Interfaces.AccountsCollection Accounts {
-            get {
-                    return ((global::Pithos.Interfaces.AccountsCollection)(this["Accounts"]));
-            }
-            set {
-                this["Accounts"] = value;
-            }
-        }
     }
 }
index 1c64814..7fb8fe1 100644 (file)
@@ -53,8 +53,6 @@
     <Setting Name="Accounts" Type="Pithos.Interfaces.AccountsCollection" Scope="User">
       <Value Profile="(Default)">
           &lt;ArrayOfAccountSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
-            &lt;AccountSettings&gt;
-            &lt;/AccountSettings&gt;
           &lt;/ArrayOfAccountSettings&gt;
         </Value>
     </Setting>
index ebbd4a9..43a949d 100644 (file)
@@ -67,7 +67,7 @@ namespace Pithos.Client.WPF.SelectiveSynch
             NotifyOfPropertyChange(() => Checks);
         }
 
-        public SelectiveSynchViewModel(IEventAggregator events, AccountSettings account)
+        public SelectiveSynchViewModel(IEnumerable<string> folders, IEventAggregator events, AccountSettings account)
         {
             Account = account;
             AccountName = account.AccountName;
index 991471f..009d4f6 100644 (file)
@@ -52,73 +52,86 @@ namespace Pithos.Client.WPF {
         [ImportingConstructor]
         public ShellViewModel(IWindowManager windowManager, IEventAggregator events, IStatusChecker statusChecker, PithosSettings settings)
         {
-            _windowManager = windowManager;
-            OpenPithosFolderCommand = new PithosCommand(OpenPithosFolder);
-            _statusChecker = statusChecker;
-            _events = events;
-            _events.Subscribe(this);
+            try
+            {
 
-            Settings = settings;
-                                   
-            StatusMessage = "In Synch";
+                _windowManager = windowManager;
+                OpenPithosFolderCommand = new PithosCommand(OpenPithosFolder);
+                _statusChecker = statusChecker;
+                _events = events;
+                _events.Subscribe(this);
 
-            foreach (var account in settings.Accounts)
-            {
+                Settings = settings;
 
-                MonitorAccount(account);
-            }
+                StatusMessage = "In Synch";
+
+                foreach (var account in settings.Accounts)
+                {
+
+                    MonitorAccount(account);
+                }
 
-            StartStatusService();
+                StartStatusService();
+            }
+            catch (Exception exc)
+            {
+                Log.Error("Error while starting the ShellViewModel",exc);
+                throw;
+            }
         }
         
 
         
         public void MonitorAccount(AccountSettings account)
         {
-            PithosMonitor monitor = null;
-            var accountName = account.AccountName;
-
-            if (_monitors.TryGetValue(accountName,out monitor))
+            Task.Factory.StartNew(() =>
             {
-                //If the account is active
-                if (account.IsActive)                    
-                    //Start the monitor. It's OK to start an already started monitor,
-                    //it will just ignore the call
-                    monitor.Start();
-                else
+                PithosMonitor monitor = null;
+                var accountName = account.AccountName;
+
+                if (_monitors.TryGetValue(accountName, out monitor))
                 {
-                    //If the account is inactive
-                    //Stop and remove the monitor
-                    RemoveMonitor(accountName);
+                    //If the account is active
+                    if (account.IsActive)
+                        //Start the monitor. It's OK to start an already started monitor,
+                        //it will just ignore the call
+                        monitor.Start();
+                    else
+                    {
+                        //If the account is inactive
+                        //Stop and remove the monitor
+                        RemoveMonitor(accountName);
+                    }
+                    return;
                 }
-                return;
-            }
 
-            //PithosMonitor uses MEF so we need to resolve it
-            monitor = new PithosMonitor
-                          {
-                              UserName = accountName,
-                              ApiKey = account.ApiKey,
-                              UsePithos = account.UsePithos,
-                              StatusNotification = this,
-                              RootPath=account.RootPath                             
-                          };          
-            IoC.BuildUp(monitor);
-
-            var appSettings = Properties.Settings.Default;
-            monitor.AuthenticationUrl = account.UsePithos
-                                            ? appSettings.PithosAuthenticationUrl
-                                            : appSettings.CloudfilesAuthenticationUrl;
-
-            _monitors[accountName] = monitor;
-
-            if (account.IsActive)
-            {                
-                //Don't start a monitor if it doesn't have an account and ApiKey
-                if (String.IsNullOrWhiteSpace(monitor.UserName) || String.IsNullOrWhiteSpace(monitor.ApiKey))
-                    return;
-                StartMonitor(monitor);
-            }
+                //PithosMonitor uses MEF so we need to resolve it
+                monitor = new PithosMonitor
+                            {
+                                UserName = accountName,
+                                ApiKey = account.ApiKey,
+                                UsePithos = account.UsePithos,
+                                StatusNotification = this,
+                                RootPath = account.RootPath
+                            };
+                IoC.BuildUp(monitor);
+
+                var appSettings = Properties.Settings.Default;
+                monitor.AuthenticationUrl = account.UsePithos
+                                                ? appSettings.PithosAuthenticationUrl
+                                                : appSettings.CloudfilesAuthenticationUrl;
+
+                _monitors[accountName] = monitor;
+
+                if (account.IsActive)
+                {
+                    //Don't start a monitor if it doesn't have an account and ApiKey
+                    if (String.IsNullOrWhiteSpace(monitor.UserName) ||
+                        String.IsNullOrWhiteSpace(monitor.ApiKey))
+                        return;
+                    StartMonitor(monitor);
+                }
+            });
         }
 
 
index bd91995..d9e98b6 100644 (file)
@@ -76,8 +76,6 @@
         <value>
           <ArrayOfAccountSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-            <AccountSettings>
-            </AccountSettings>
           </ArrayOfAccountSettings>
         </value>
       </setting>
index 96b895e..33e8c3e 100644 (file)
     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\Pithos.Core.Test.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="Castle.ActiveRecord, Version=3.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL" />
     <Reference Include="Castle.Core">
index 660ce37..5a76056 100644 (file)
@@ -372,8 +372,10 @@ namespace Pithos.Core.Agents
                         //Report the number of new files
                         var remoteCount = distinctActions.Count(action=>
                             action.Action==CloudActionType.DownloadUnconditional);
+/*
                         if ( remoteCount > 0)
                             StatusNotification.NotifyChange(String.Format("Processing {0} new files", remoteCount));
+*/
 
                         Log.Info("[LISTENER] End Processing");                        
                     }
index 32e9cda..54de75b 100644 (file)
     <CodeContractsReferenceAssembly>Build</CodeContractsReferenceAssembly>
     <CodeContractsAnalysisWarningLevel>0</CodeContractsAnalysisWarningLevel>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\Pithos.Core.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="Caliburn.Micro, Version=1.2.0.0, Culture=neutral, PublicKeyToken=8e5891231f2ed21f, processorArchitecture=MSIL">
       <HintPath>..\Libraries\Caliburn.Micro.dll</HintPath>
index 5ba4e5d..fc356b6 100644 (file)
@@ -82,9 +82,11 @@ namespace Pithos.Core
         public string RootPath
         {
             get { return _rootPath; }
-            set
+            set 
             {
-                _rootPath = value.ToLower();
+                _rootPath = String.IsNullOrWhiteSpace(value) 
+                    ? String.Empty 
+                    : value.ToLower();
             }
         }
 
@@ -92,7 +94,7 @@ namespace Pithos.Core
         CancellationTokenSource _cancellationSource;
 
 
-        private bool _isInitialized;
+        private bool _started;
 
         public void Start()
         {            
@@ -105,12 +107,13 @@ namespace Pithos.Core
             Contract.EndContractBlock();
 
             StatusNotification.NotifyChange("Starting");
-            if (_isInitialized)
+            if (_started)
             {
                 if (!_cancellationSource.IsCancellationRequested)
                     return;
             }
             _cancellationSource = new CancellationTokenSource();
+            _started = true;
 
             CloudClient=new CloudFilesClient(UserName,ApiKey);
             var proxyUri = ProxyFromSettings();            
@@ -136,8 +139,7 @@ namespace Pithos.Core
             StartNetworkAgent();
 
             StartWorkflowAgent();
-            WorkflowAgent.RestartInterruptedFiles(_accountInfo);
-            _isInitialized = true;
+            WorkflowAgent.RestartInterruptedFiles(_accountInfo);            
         }
 
         private void EnsurePithosContainers()
@@ -386,6 +388,13 @@ namespace Pithos.Core
                 Directory.Delete(removedPath,true);
             }
         }
+
+        public IEnumerable<string> GetRootFolders()
+        {
+            var dirs=CloudClient.ListObjects(UserName, FolderConstants.PithosContainer, "");
+            return from dir in dirs
+                    select dir.Name;            
+        }
     }
 
 
index 59c5c07..8662d51 100644 (file)
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Diagnostics.Contracts;
 using System.Linq;
@@ -8,7 +9,7 @@ using System.Threading.Tasks;
 
 namespace Pithos.Core
 {
-    static class TaskExtensions
+    public static class TaskExtensions
     {
         public static Task<T2> Then<T1, T2>(this Task<T1> first, Func<T1, Task<T2>> next)
         {
@@ -113,5 +114,20 @@ namespace Pithos.Core
             }
         }
 
+        public static bool TryRemove<T>(this ObservableConcurrentCollection<T> collection,T item) where T:class
+        {
+            IProducerConsumerCollection<T> items= collection;
+            for (var i = 0; i < items.Count; i++)
+            {
+                T tempItem;
+                if (!items.TryTake(out tempItem)) 
+                    return false;
+                if (tempItem == item) 
+                    return true;
+                items.TryAdd(item);
+            }
+            return false;
+        }
+
     }
 }
\ No newline at end of file
index 9e964a0..850771c 100644 (file)
     <CodeContractsReferenceAssembly>Build</CodeContractsReferenceAssembly>
     <CodeContractsAnalysisWarningLevel>2</CodeContractsAnalysisWarningLevel>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\Pithos.Interfaces.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Core" />
index 2ab1543..ab643be 100644 (file)
     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\Pithos.Network.Test.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="Newtonsoft.Json, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b9a188c8922137c6, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
index 7f015a0..f0f8f3f 100644 (file)
     <CodeContractsReferenceAssembly>Build</CodeContractsReferenceAssembly>
     <CodeContractsAnalysisWarningLevel>2</CodeContractsAnalysisWarningLevel>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\Pithos.Network.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="log4net">
       <HintPath>..\Libraries\log4net.dll</HintPath>
index 5c8ddc8..229ed04 100644 (file)
         "Entry"
         {
         "MsmKey" = "8:_4CFFEFA8D3F3865F15FEA354C6BF4ECC"
+        "OwnerKey" = "8:_8046A0650A0FDBD7044C0059B48CB6EA"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_4CFFEFA8D3F3865F15FEA354C6BF4ECC"
         "OwnerKey" = "8:_C4EB6477683944848E47C160C41EA94A"
         "MsmSig" = "8:_UNDEFINED"
         }
         }
         "Entry"
         {
+        "MsmKey" = "8:_75D885F375DFDB481975C88F857E2ACF"
+        "OwnerKey" = "8:_311197E10704448D93A69A8EC39C3C80"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_75D885F375DFDB481975C88F857E2ACF"
+        "OwnerKey" = "8:_8046A0650A0FDBD7044C0059B48CB6EA"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_75D885F375DFDB481975C88F857E2ACF"
+        "OwnerKey" = "8:_C4EB6477683944848E47C160C41EA94A"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_75D885F375DFDB481975C88F857E2ACF"
+        "OwnerKey" = "8:_BBBEFA365EAA4B09B277CBDBED99E839"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_75D885F375DFDB481975C88F857E2ACF"
+        "OwnerKey" = "8:_8B189FCC1135DE71AFEBE665EBC98E1E"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
         "MsmKey" = "8:_8046A0650A0FDBD7044C0059B48CB6EA"
         "OwnerKey" = "8:_C4EB6477683944848E47C160C41EA94A"
         "MsmSig" = "8:_UNDEFINED"
         "Entry"
         {
         "MsmKey" = "8:_C9615BA8AC66AC373BB153F8A95E9DA8"
-        "OwnerKey" = "8:_8046A0650A0FDBD7044C0059B48CB6EA"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_C9615BA8AC66AC373BB153F8A95E9DA8"
         "OwnerKey" = "8:_C4EB6477683944848E47C160C41EA94A"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_UNDEFINED"
+        "OwnerKey" = "8:_75D885F375DFDB481975C88F857E2ACF"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_UNDEFINED"
         "OwnerKey" = "8:_C017F2E6E691B9F1814D8EDA1C80C44E"
         "MsmSig" = "8:_UNDEFINED"
         }
                 }
             }
         }
+        "Debug All"
+        {
+        "DisplayName" = "8:Debug All"
+        "IsDebugOnly" = "11:FALSE"
+        "IsReleaseOnly" = "11:FALSE"
+        "OutputFilename" = "8:Debug All\\Pithos.Setup.x64.msi"
+        "PackageFilesAs" = "3:2"
+        "PackageFileSize" = "3:-2147483648"
+        "CabType" = "3:1"
+        "Compression" = "3:2"
+        "SignOutput" = "11:FALSE"
+        "CertificateFile" = "8:"
+        "PrivateKeyFile" = "8:"
+        "TimeStampServer" = "8:"
+        "InstallerBootstrapper" = "3:2"
+            "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
+            {
+            "Enabled" = "11:TRUE"
+            "PromptEnabled" = "11:TRUE"
+            "PrerequisitesLocation" = "2:1"
+            "Url" = "8:"
+            "ComponentsUrl" = "8:"
+                "Items"
+                {
+                    "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.0,Profile=Client"
+                    {
+                    "Name" = "8:Microsoft .NET Framework 4 Client Profile (x86 and x64)"
+                    "ProductCode" = "8:.NETFramework,Version=v4.0,Profile=Client"
+                    }
+                    "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"
+                    {
+                    "Name" = "8:Windows Installer 3.1"
+                    "ProductCode" = "8:Microsoft.Windows.Installer.3.1"
+                    }
+                }
+            }
+        }
         "Premium Debug"
         {
         "DisplayName" = "8:Premium Debug"
             "IsDependency" = "11:TRUE"
             "IsolateTo" = "8:"
             }
+            "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_75D885F375DFDB481975C88F857E2ACF"
+            {
+            "AssemblyRegister" = "3:1"
+            "AssemblyIsInGAC" = "11:FALSE"
+            "AssemblyAsmDisplayName" = "8:log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"
+                "ScatterAssemblies"
+                {
+                    "_75D885F375DFDB481975C88F857E2ACF"
+                    {
+                    "Name" = "8:log4net.dll"
+                    "Attributes" = "3:512"
+                    }
+                }
+            "SourcePath" = "8:log4net.dll"
+            "TargetName" = "8:"
+            "Tag" = "8:"
+            "Folder" = "8:_2E4412A903CE41838ECE5DCF9470F71C"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:TRUE"
+            "IsolateTo" = "8:"
+            }
             "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_8046A0650A0FDBD7044C0059B48CB6EA"
             {
             "AssemblyRegister" = "3:1"
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_311197E10704448D93A69A8EC39C3C80"
             {
-            "SourcePath" = "8:..\\Pithos.Core\\obj\\Premium Debug\\Pithos.Core.dll"
+            "SourcePath" = "8:..\\Pithos.Core\\obj\\Debug\\Pithos.Core.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_2E4412A903CE41838ECE5DCF9470F71C"
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_74535AE0FDD2421E81F24E0DB0554D26"
             {
-            "SourcePath" = "8:..\\Libraries\\Json40r2\\Source\\Src\\Newtonsoft.Json\\obj\\Premium Debug\\Newtonsoft.Json.dll"
+            "SourcePath" = "8:..\\Libraries\\Json40r2\\Source\\Src\\Newtonsoft.Json\\obj\\Debug\\Newtonsoft.Json.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_2E4412A903CE41838ECE5DCF9470F71C"
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_9419C61DF5F3441099A56E07565699F0"
             {
-            "SourcePath" = "8:..\\Libraries\\ParallelExtensionsExtras\\obj\\Premium Debug\\ParallelExtensionsExtras.dll"
+            "SourcePath" = "8:..\\Libraries\\ParallelExtensionsExtras\\obj\\Debug\\ParallelExtensionsExtras.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_2E4412A903CE41838ECE5DCF9470F71C"
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_BAA515E0FCDE402CBF2A6FF3D94A0B83"
             {
-            "SourcePath" = "8:..\\Pithos.ShellExtensions\\obj\\Premium Debug\\Pithos.ShellExtensions.dll"
+            "SourcePath" = "8:..\\Pithos.ShellExtensions\\obj\\Debug\\Pithos.ShellExtensions.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_2E4412A903CE41838ECE5DCF9470F71C"
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_BBBEFA365EAA4B09B277CBDBED99E839"
             {
-            "SourcePath" = "8:..\\Pithos.Network\\obj\\Premium Debug\\Pithos.Network.dll"
+            "SourcePath" = "8:..\\Pithos.Network\\obj\\Debug\\Pithos.Network.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_2E4412A903CE41838ECE5DCF9470F71C"
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_C4EB6477683944848E47C160C41EA94A"
             {
-            "SourcePath" = "8:..\\Pithos.Client.WPF\\obj\\Premium Debug\\Pithos.Client.WPF.exe"
+            "SourcePath" = "8:..\\Pithos.Client.WPF\\obj\\Debug\\Pithos.Client.WPF.exe"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_2E4412A903CE41838ECE5DCF9470F71C"
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_CE1C7673CEC14F70AFCF2B48FF8B3D37"
             {
-            "SourcePath" = "8:..\\Pithos.Interfaces\\obj\\Premium Debug\\Pithos.Interfaces.dll"
+            "SourcePath" = "8:..\\Pithos.Interfaces\\obj\\Debug\\Pithos.Interfaces.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_2E4412A903CE41838ECE5DCF9470F71C"
             }
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_F65AE860659D453AAFD4D6F068DAC541"
             {
-            "SourcePath" = "8:..\\NotifyIconWpf\\obj\\Premium Debug\\Hardcodet.Wpf.TaskbarNotification.dll"
+            "SourcePath" = "8:..\\NotifyIconWpf\\obj\\Debug\\Hardcodet.Wpf.TaskbarNotification.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_2E4412A903CE41838ECE5DCF9470F71C"
index 26ef99f..5be37d3 100644 (file)
     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\Pithos.ShellExtensions.Test.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
       <HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
index 4e87b31..4eab378 100644 (file)
@@ -16,6 +16,8 @@ namespace Pithos.ShellExtensions
     /// </summary>
     public class IoC
     {
+        private static readonly log4net.ILog Log = log4net.LogManager.GetLogger("Pithos.Extensions.IoC");
+
         /// <summary>
         /// The MEF Container
         /// </summary>
index 8bc2067..6be343a 100644 (file)
@@ -16,7 +16,9 @@ namespace Pithos.ShellExtensions.Menus
     [Guid("B1F1405D-94A1-4692-B72F-FC8CAF8B8700"), ComVisible(true)]
     public class FileContextMenu : IShellExtInit, IContextMenu
     {
-        private const string MenuHandlername = "CSShellExtContextMenuHandler.FileContextMenuExt";
+        private static readonly log4net.ILog Log = log4net.LogManager.GetLogger("Pithos.FileContextMenu");
+
+        private const string MenuHandlername = "Pithos.FileContextMenu";
 
 
         private readonly Dictionary<string, MenuItem> _items;
@@ -116,7 +118,7 @@ namespace Pithos.ShellExtensions.Menus
 
             System.Windows.Forms.MessageBox.Show(
                 message,
-                "CSShellExtContextMenuHandler");
+                "Pithos Shell Extensions");
             NativeMethods.SHChangeNotify(HChangeNotifyEventID.SHCNE_ASSOCCHANGED, HChangeNotifyFlags.SHCNF_IDLIST,
                                              IntPtr.Zero, IntPtr.Zero);
         }
@@ -124,7 +126,7 @@ namespace Pithos.ShellExtensions.Menus
         void OnGotoPithos(IntPtr hWnd)
         {
             var settings = Context.Settings;
-            var activeAccount = settings.Accounts.FirstOrDefault(acc => acc.IsActive);
+            var activeAccount = settings.Accounts.FirstOrDefault(acc =>  Context.CurrentFile.StartsWith(acc.RootPath,StringComparison.InvariantCultureIgnoreCase));
             var address = String.Format("{0}/ui/?token={1}&user={2}",
                                         settings.PithosSite,
                                         activeAccount.ApiKey,
index 0095470..6e2607e 100644 (file)
@@ -4,6 +4,7 @@ using System.Diagnostics.Contracts;
 using System.IO;
 
 using System.ComponentModel.Composition;
+using System.Linq;
 using Pithos.Interfaces;
 
 namespace Pithos.ShellExtensions.Overlays
@@ -11,6 +12,8 @@ namespace Pithos.ShellExtensions.Overlays
 
     public class IconOverlayBase : IShellIconOverlayIdentifier
     {
+        private static readonly log4net.ILog Log = log4net.LogManager.GetLogger("Pithos.IconOverlay");
+
         protected static string PithosPrefix = "0Pithos";
 
         public string OverlayName { get; private set; }
@@ -53,7 +56,7 @@ namespace Pithos.ShellExtensions.Overlays
 
             Debug.WriteLine(String.Format("ICON Status check for {0} - {1}", path, GetType().Name), LogCategories.ShellOverlays);
             
-            if (!path.StartsWith(Settings.PithosPath,true,null))
+            if (!Settings.Accounts.Any(account=>path.StartsWith(account.RootPath,StringComparison.InvariantCultureIgnoreCase)))
                 return WinError.S_FALSE;
 
             var status=StatusChecker.GetFileOverlayStatus(path);
index c10c59f..2238984 100644 (file)
@@ -12,7 +12,7 @@
     <AssemblyName>Pithos.ShellExtensions</AssemblyName>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
-    <CodeContractsAssemblyMode>1</CodeContractsAssemblyMode>
+    <CodeContractsAssemblyMode>0</CodeContractsAssemblyMode>
     <TargetFrameworkProfile>Client</TargetFrameworkProfile>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <RegisterForComInterop>true</RegisterForComInterop>
-    <CodeContractsEnableRuntimeChecking>True</CodeContractsEnableRuntimeChecking>
+    <CodeContractsEnableRuntimeChecking>False</CodeContractsEnableRuntimeChecking>
     <CodeContractsRuntimeOnlyPublicSurface>False</CodeContractsRuntimeOnlyPublicSurface>
     <CodeContractsRuntimeThrowOnFailure>True</CodeContractsRuntimeThrowOnFailure>
     <CodeContractsRuntimeCallSiteRequires>False</CodeContractsRuntimeCallSiteRequires>
     <CodeContractsRuntimeSkipQuantifiers>False</CodeContractsRuntimeSkipQuantifiers>
-    <CodeContractsRunCodeAnalysis>True</CodeContractsRunCodeAnalysis>
+    <CodeContractsRunCodeAnalysis>False</CodeContractsRunCodeAnalysis>
     <CodeContractsNonNullObligations>False</CodeContractsNonNullObligations>
     <CodeContractsBoundsObligations>False</CodeContractsBoundsObligations>
     <CodeContractsArithmeticObligations>False</CodeContractsArithmeticObligations>
     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug All|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug All\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <RegisterForComInterop>true</RegisterForComInterop>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\Pithos.ShellExtensions.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
   <ItemGroup>
+    <Reference Include="log4net">
+      <HintPath>..\Libraries\log4net.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.ComponentModel.Composition" />
     <Reference Include="System.Configuration.Install" />
index e538286..4260ccb 100644 (file)
@@ -1,21 +1,4 @@
-/********************************** Module Header **********************************\
-Module Name:  ProjectInstaller.cs
-Project:      CSShellExtContextMenuHandler
-Copyright (c) Microsoft Corporation.
-
-The installer class defines the custom actions in the setup. We use the custom 
-actions to register and unregister the COM-visible classes in the current managed 
-assembly.
-
-This source is subject to the Microsoft Public License.
-See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
-All other rights reserved.
-
-THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER 
-EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF 
-MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
-\***********************************************************************************/
-
+
 #region Using directives
 
 using System.Collections;
index b8b83a7..0e532d3 100644 (file)
@@ -256,7 +256,7 @@ namespace Pithos.ShellExtensions
             }
         }
 
-        public static void RemoveApproved(Guid guid, string csshellextcontextmenuhandlerFilecontextmenuext)
+        public static void RemoveApproved(Guid guid)
         {
             using (RegistryKey key = Registry.LocalMachine.OpenSubKey(_approvedKey))
             {
index db4b7d2..beb3046 100644 (file)
@@ -23,6 +23,8 @@ namespace Pithos.ShellExtensions
     [Export(typeof(IPithosSettings))]
     public class ShellSettings:IPithosSettings
     {
+        private static readonly log4net.ILog Log = log4net.LogManager.GetLogger("Pithos.ShellSettings");
+
         private Lazy<IPithosSettings> _settings;
         public ShellSettings()
         {
index 73ccac7..f3f6b46 100644 (file)
@@ -5,7 +5,6 @@
 // -----------------------------------------------------------------------
 
 using System.ComponentModel.Composition;
-using System.Diagnostics;
 using System.ServiceModel;
 using Microsoft.Win32;
 using Pithos.Interfaces;
@@ -26,6 +25,8 @@ namespace Pithos.ShellExtensions
         [Import]
         public IPithosSettings Settings { get; set; }
 
+        private static readonly log4net.ILog Log = log4net.LogManager.GetLogger("Pithos.ShellStatusChecker");
+
         public FileOverlayStatus GetFileOverlayStatus(string path)
         {
 
index 0d9148d..6611c0a 100644 (file)
@@ -36,6 +36,9 @@ Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Pithos.Setup.x64", "Pithos.
 EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug All|Any CPU = Debug All|Any CPU
+               Debug All|Mixed Platforms = Debug All|Mixed Platforms
+               Debug All|x86 = Debug All|x86
                Debug|Any CPU = Debug|Any CPU
                Debug|Mixed Platforms = Debug|Mixed Platforms
                Debug|x86 = Debug|x86
@@ -50,7 +53,13 @@ Global
                Test|x86 = Test|x86
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {240B432F-1030-4623-BCC3-FF351D6C1B63}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {240B432F-1030-4623-BCC3-FF351D6C1B63}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {240B432F-1030-4623-BCC3-FF351D6C1B63}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {240B432F-1030-4623-BCC3-FF351D6C1B63}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {240B432F-1030-4623-BCC3-FF351D6C1B63}.Debug All|x86.ActiveCfg = Debug All|Any CPU
                {240B432F-1030-4623-BCC3-FF351D6C1B63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {240B432F-1030-4623-BCC3-FF351D6C1B63}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {240B432F-1030-4623-BCC3-FF351D6C1B63}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
                {240B432F-1030-4623-BCC3-FF351D6C1B63}.Debug|x86.ActiveCfg = Debug|Any CPU
                {240B432F-1030-4623-BCC3-FF351D6C1B63}.Premium Debug|Any CPU.ActiveCfg = Premium Debug|Any CPU
@@ -66,8 +75,12 @@ Global
                {240B432F-1030-4623-BCC3-FF351D6C1B63}.Test|Mixed Platforms.ActiveCfg = Test|Any CPU
                {240B432F-1030-4623-BCC3-FF351D6C1B63}.Test|Mixed Platforms.Build.0 = Test|Any CPU
                {240B432F-1030-4623-BCC3-FF351D6C1B63}.Test|x86.ActiveCfg = Test|Any CPU
+               {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Debug All|x86.ActiveCfg = Debug All|Any CPU
                {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
                {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
                {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Debug|x86.ActiveCfg = Debug|Any CPU
@@ -84,6 +97,11 @@ Global
                {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Test|Mixed Platforms.ActiveCfg = Test|Any CPU
                {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Test|Mixed Platforms.Build.0 = Test|Any CPU
                {2CFE2DF1-20AE-47E2-B1BB-36B974600BE1}.Test|x86.ActiveCfg = Test|Any CPU
+               {7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}.Debug All|x86.ActiveCfg = Debug All|Any CPU
                {7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -104,6 +122,11 @@ Global
                {7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}.Test|Mixed Platforms.ActiveCfg = Test|Any CPU
                {7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}.Test|Mixed Platforms.Build.0 = Test|Any CPU
                {7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}.Test|x86.ActiveCfg = Test|Any CPU
+               {822F885B-83E8-4A9A-B02E-0FEAE444D960}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {822F885B-83E8-4A9A-B02E-0FEAE444D960}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {822F885B-83E8-4A9A-B02E-0FEAE444D960}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {822F885B-83E8-4A9A-B02E-0FEAE444D960}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {822F885B-83E8-4A9A-B02E-0FEAE444D960}.Debug All|x86.ActiveCfg = Debug All|Any CPU
                {822F885B-83E8-4A9A-B02E-0FEAE444D960}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {822F885B-83E8-4A9A-B02E-0FEAE444D960}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {822F885B-83E8-4A9A-B02E-0FEAE444D960}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -124,6 +147,11 @@ Global
                {822F885B-83E8-4A9A-B02E-0FEAE444D960}.Test|Mixed Platforms.ActiveCfg = Test|Any CPU
                {822F885B-83E8-4A9A-B02E-0FEAE444D960}.Test|Mixed Platforms.Build.0 = Test|Any CPU
                {822F885B-83E8-4A9A-B02E-0FEAE444D960}.Test|x86.ActiveCfg = Test|Any CPU
+               {C45218F8-09E7-4F57-85BC-5D8D2AC736A3}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {C45218F8-09E7-4F57-85BC-5D8D2AC736A3}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {C45218F8-09E7-4F57-85BC-5D8D2AC736A3}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {C45218F8-09E7-4F57-85BC-5D8D2AC736A3}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {C45218F8-09E7-4F57-85BC-5D8D2AC736A3}.Debug All|x86.ActiveCfg = Debug All|Any CPU
                {C45218F8-09E7-4F57-85BC-5D8D2AC736A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {C45218F8-09E7-4F57-85BC-5D8D2AC736A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {C45218F8-09E7-4F57-85BC-5D8D2AC736A3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -144,6 +172,11 @@ Global
                {C45218F8-09E7-4F57-85BC-5D8D2AC736A3}.Test|Mixed Platforms.ActiveCfg = Test|Any CPU
                {C45218F8-09E7-4F57-85BC-5D8D2AC736A3}.Test|Mixed Platforms.Build.0 = Test|Any CPU
                {C45218F8-09E7-4F57-85BC-5D8D2AC736A3}.Test|x86.ActiveCfg = Test|Any CPU
+               {142AF135-DF30-4563-B0AC-B604235AE874}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {142AF135-DF30-4563-B0AC-B604235AE874}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {142AF135-DF30-4563-B0AC-B604235AE874}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {142AF135-DF30-4563-B0AC-B604235AE874}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {142AF135-DF30-4563-B0AC-B604235AE874}.Debug All|x86.ActiveCfg = Debug All|Any CPU
                {142AF135-DF30-4563-B0AC-B604235AE874}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {142AF135-DF30-4563-B0AC-B604235AE874}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {142AF135-DF30-4563-B0AC-B604235AE874}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -164,6 +197,11 @@ Global
                {142AF135-DF30-4563-B0AC-B604235AE874}.Test|Mixed Platforms.ActiveCfg = Test|Any CPU
                {142AF135-DF30-4563-B0AC-B604235AE874}.Test|Mixed Platforms.Build.0 = Test|Any CPU
                {142AF135-DF30-4563-B0AC-B604235AE874}.Test|x86.ActiveCfg = Test|Any CPU
+               {E027200B-C26A-4877-BFD9-1A18CF5DF2F4}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {E027200B-C26A-4877-BFD9-1A18CF5DF2F4}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {E027200B-C26A-4877-BFD9-1A18CF5DF2F4}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {E027200B-C26A-4877-BFD9-1A18CF5DF2F4}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {E027200B-C26A-4877-BFD9-1A18CF5DF2F4}.Debug All|x86.ActiveCfg = Debug All|Any CPU
                {E027200B-C26A-4877-BFD9-1A18CF5DF2F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {E027200B-C26A-4877-BFD9-1A18CF5DF2F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {E027200B-C26A-4877-BFD9-1A18CF5DF2F4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -184,6 +222,11 @@ Global
                {E027200B-C26A-4877-BFD9-1A18CF5DF2F4}.Test|Mixed Platforms.ActiveCfg = Test|Any CPU
                {E027200B-C26A-4877-BFD9-1A18CF5DF2F4}.Test|Mixed Platforms.Build.0 = Test|Any CPU
                {E027200B-C26A-4877-BFD9-1A18CF5DF2F4}.Test|x86.ActiveCfg = Test|Any CPU
+               {C8E2BC8B-C7F1-4222-855C-4B04A57FFDFD}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {C8E2BC8B-C7F1-4222-855C-4B04A57FFDFD}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {C8E2BC8B-C7F1-4222-855C-4B04A57FFDFD}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {C8E2BC8B-C7F1-4222-855C-4B04A57FFDFD}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {C8E2BC8B-C7F1-4222-855C-4B04A57FFDFD}.Debug All|x86.ActiveCfg = Debug All|Any CPU
                {C8E2BC8B-C7F1-4222-855C-4B04A57FFDFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {C8E2BC8B-C7F1-4222-855C-4B04A57FFDFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {C8E2BC8B-C7F1-4222-855C-4B04A57FFDFD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -204,6 +247,11 @@ Global
                {C8E2BC8B-C7F1-4222-855C-4B04A57FFDFD}.Test|Mixed Platforms.ActiveCfg = Test|Any CPU
                {C8E2BC8B-C7F1-4222-855C-4B04A57FFDFD}.Test|Mixed Platforms.Build.0 = Test|Any CPU
                {C8E2BC8B-C7F1-4222-855C-4B04A57FFDFD}.Test|x86.ActiveCfg = Test|Any CPU
+               {F9AF3E97-BCB7-46B7-8014-7FC858AEE9BA}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {F9AF3E97-BCB7-46B7-8014-7FC858AEE9BA}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {F9AF3E97-BCB7-46B7-8014-7FC858AEE9BA}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {F9AF3E97-BCB7-46B7-8014-7FC858AEE9BA}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {F9AF3E97-BCB7-46B7-8014-7FC858AEE9BA}.Debug All|x86.ActiveCfg = Debug All|Any CPU
                {F9AF3E97-BCB7-46B7-8014-7FC858AEE9BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {F9AF3E97-BCB7-46B7-8014-7FC858AEE9BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {F9AF3E97-BCB7-46B7-8014-7FC858AEE9BA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -224,6 +272,11 @@ Global
                {F9AF3E97-BCB7-46B7-8014-7FC858AEE9BA}.Test|Mixed Platforms.ActiveCfg = Test|Any CPU
                {F9AF3E97-BCB7-46B7-8014-7FC858AEE9BA}.Test|Mixed Platforms.Build.0 = Test|Any CPU
                {F9AF3E97-BCB7-46B7-8014-7FC858AEE9BA}.Test|x86.ActiveCfg = Test|Any CPU
+               {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug All|x86.ActiveCfg = Debug All|Any CPU
                {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -244,6 +297,12 @@ Global
                {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Test|Mixed Platforms.ActiveCfg = Test|Any CPU
                {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Test|Mixed Platforms.Build.0 = Test|Any CPU
                {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Test|x86.ActiveCfg = Test|Any CPU
+               {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug All|x86.ActiveCfg = Debug All|x86
+               {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug All|x86.Build.0 = Debug All|x86
                {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -266,6 +325,11 @@ Global
                {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Test|Mixed Platforms.Build.0 = Release|x86
                {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Test|x86.ActiveCfg = Release|x86
                {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Test|x86.Build.0 = Release|x86
+               {7AC63864-7638-41C4-969C-D3197EF2BED9}.Debug All|Any CPU.ActiveCfg = Debug All|Any CPU
+               {7AC63864-7638-41C4-969C-D3197EF2BED9}.Debug All|Any CPU.Build.0 = Debug All|Any CPU
+               {7AC63864-7638-41C4-969C-D3197EF2BED9}.Debug All|Mixed Platforms.ActiveCfg = Debug All|Any CPU
+               {7AC63864-7638-41C4-969C-D3197EF2BED9}.Debug All|Mixed Platforms.Build.0 = Debug All|Any CPU
+               {7AC63864-7638-41C4-969C-D3197EF2BED9}.Debug All|x86.ActiveCfg = Debug All|Any CPU
                {7AC63864-7638-41C4-969C-D3197EF2BED9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {7AC63864-7638-41C4-969C-D3197EF2BED9}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {7AC63864-7638-41C4-969C-D3197EF2BED9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -286,6 +350,11 @@ Global
                {7AC63864-7638-41C4-969C-D3197EF2BED9}.Test|Mixed Platforms.ActiveCfg = Release|Any CPU
                {7AC63864-7638-41C4-969C-D3197EF2BED9}.Test|Mixed Platforms.Build.0 = Release|Any CPU
                {7AC63864-7638-41C4-969C-D3197EF2BED9}.Test|x86.ActiveCfg = Release|Any CPU
+               {C6251981-3C49-404B-BB5B-9732887388D2}.Debug All|Any CPU.ActiveCfg = Debug All
+               {C6251981-3C49-404B-BB5B-9732887388D2}.Debug All|Mixed Platforms.ActiveCfg = Debug All
+               {C6251981-3C49-404B-BB5B-9732887388D2}.Debug All|Mixed Platforms.Build.0 = Debug All
+               {C6251981-3C49-404B-BB5B-9732887388D2}.Debug All|x86.ActiveCfg = Debug All
+               {C6251981-3C49-404B-BB5B-9732887388D2}.Debug All|x86.Build.0 = Debug All
                {C6251981-3C49-404B-BB5B-9732887388D2}.Debug|Any CPU.ActiveCfg = Debug
                {C6251981-3C49-404B-BB5B-9732887388D2}.Debug|Mixed Platforms.ActiveCfg = Debug
                {C6251981-3C49-404B-BB5B-9732887388D2}.Debug|x86.ActiveCfg = Debug