Skip to content

Commit

Permalink
v8.1.26727.0-Beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
ITHitBuild committed Mar 28, 2024
1 parent f5b8996 commit 4cbd863
Show file tree
Hide file tree
Showing 48 changed files with 679 additions and 805 deletions.
4 changes: 2 additions & 2 deletions Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26224.0-Beta2" />
<PackageReference Include="ITHit.FileSystem" Version="8.1.26224.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26727.0-Beta2" />
<PackageReference Include="ITHit.FileSystem" Version="8.1.26727.0-Beta2" />
</ItemGroup>
</Project>
20 changes: 13 additions & 7 deletions Windows/Common/Core/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,28 @@ public async Task StopEngineAsync()
/// Opens Windows File Manager with both remote storage and user file system for testing.
/// </summary>
/// <param name="openRemoteStorage">True if the Remote Storage must be opened. False - otherwise.</param>
/// <param name="engineIndex">Index used to position Windows Explorer window to show this user file system.</param>
/// <param name="totalEngines">Total number of Engined that will be mounted by this app.</param>
/// <remarks>This method is provided solely for the development and testing convenience.</remarks>
public void ShowTestEnvironment(string userFileSystemWindowName, bool openRemoteStorage = true, CancellationToken cancellationToken = default)
public void ShowTestEnvironment(string userFileSystemWindowName, bool openRemoteStorage = true, CancellationToken cancellationToken = default, int engineIndex = 0, int totalEngines = 1)
{
// Open Windows File Manager with user file system.
Commands.Open(Engine.Path);
IntPtr hWndUserFileSystem = WindowManager.FindWindow(userFileSystemWindowName, cancellationToken);
WindowManager.PositionFileSystemWindow(hWndUserFileSystem, 1, 2);
int numWindowsPerEngine = 2; //openRemoteStorage ? 2 : 1; // Each engine shows 2 windows - remote storage and UFS.
int horizintalIndex = engineIndex * numWindowsPerEngine;
int totalWindows = totalEngines * numWindowsPerEngine;

// Open remote storage.
if (openRemoteStorage)
{
// Open remote storage.
Commands.Open(RemoteStorageRootPath);
string rsWindowName = Path.GetFileName(RemoteStorageRootPath.TrimEnd('\\'));
IntPtr hWndRemoteStorage = WindowManager.FindWindow(rsWindowName, cancellationToken);
WindowManager.PositionFileSystemWindow(hWndRemoteStorage, 0, 2);
WindowManager.PositionFileSystemWindow(hWndRemoteStorage, horizintalIndex, totalWindows);
}

// Open Windows File Manager with user file system.
Commands.Open(Engine.Path);
IntPtr hWndUserFileSystem = WindowManager.FindWindow(userFileSystemWindowName, cancellationToken);
WindowManager.PositionFileSystemWindow(hWndUserFileSystem, horizintalIndex + 1, totalWindows);
}

#endif
Expand Down
6 changes: 3 additions & 3 deletions Windows/Common/Core/Common.Windows.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0-windows10.0.19041.0;net48</TargetFrameworks>
<TargetFrameworks>net8.0-windows10.0.19041.0;net48</TargetFrameworks>
<UseWindowsForms>True</UseWindowsForms>
<Description>Contains functionality common for all Windows Virtual Drive samples.</Description>
<Authors>IT Hit LTD.</Authors>
Expand All @@ -21,8 +21,8 @@
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="8.1.26224.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26224.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="8.1.26727.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26727.0-Beta2" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
</ItemGroup>
</Project>
46 changes: 15 additions & 31 deletions Windows/Common/Core/Registrar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public static async Task<bool> UnregisterSyncRootAsync(string syncRootPath, stri

if (res && !string.IsNullOrWhiteSpace(dataPath))
{
log.Debug($"Deleteing data folder {syncRootPath} {dataPath}");
log.Debug($"Deleteing data folder for {syncRootPath}");
try
{
Directory.Delete(dataPath, true);
Expand Down Expand Up @@ -172,6 +172,20 @@ private static async Task<bool> UnregisterSyncRootAsync(string syncRootPath, ILo
}
}

// Remore the read-only arrtibute. Otherwise delete fails.
var allItems = Directory.EnumerateFileSystemEntries(syncRootPath, "*", SearchOption.AllDirectories);
foreach(var path in allItems)
{
try
{
new FileInfo(path).IsReadOnly = false;
}
catch (Exception ex)
{
logger.Error($"Failed to remove read-only attribute for {path}", ex);
}
}

// Delete sync root folder.
try
{
Expand All @@ -186,36 +200,6 @@ private static async Task<bool> UnregisterSyncRootAsync(string syncRootPath, ILo
return res;
}

/*
public async Task CleanupAppFoldersAsync(EngineWindows engine)
{
Log.Info("\n\nDeleting all file and folder placeholders.");
try
{
if (Directory.Exists(UserFileSystemRootPath))
{
Directory.Delete(UserFileSystemRootPath, true);
}
}
catch (Exception ex)
{
Log.Error("Failed to delete placeholders.", ex);
}
try
{
if (engine != null && !string.IsNullOrWhiteSpace(engine.DataPath))
{
Directory.Delete(engine.DataPath, true);
}
}
catch (Exception ex)
{
Log.Error($"\n{ex}");
}
}
*/

/// <summary>
/// Unregisters all sync roots that has a provider ID and removes all components.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-windows10.0.19041.0</TargetFrameworks>
<Description>Contains functionality common for all Windows Virtual Drive samples.</Description>
<Authors>IT Hit LTD.</Authors>
<Product>IT Hit User File System</Product>
Expand All @@ -13,8 +13,8 @@
<Compile Remove="IVirtualFolder.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.AppHelper" Version="8.1.26224.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26224.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows.AppHelper" Version="8.1.26727.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="8.1.26727.0-Beta2" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Windows/Common/VirtualDrive/CustomDataExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace ITHit.FileSystem.Samples.Common.Windows
public static class CustomDataExtensions
{
/// <summary>
/// Saves all custom metadata properties (eTag, locks, etc) to storage associated with an item.
/// Saves all custom metadata properties, such as locks, to storage associated with an item.
/// This data that is displayed in custom columns in file manager.
/// </summary>
/// <param name="properties">Custom data attached to the item.</param>
Expand Down
2 changes: 2 additions & 0 deletions Windows/Common/VirtualDrive/VirtualEngineBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public VirtualEngineBase(
Debug += logFormatter.LogDebug;
}


/// <summary>
/// Fired for each file or folder change.
/// </summary>
Expand Down Expand Up @@ -160,6 +161,7 @@ private void LogItemChange(ItemsChangeEventArgs e, ChangeEventItem item)
break;
}
}


/// <inheritdoc/>
public override async Task<bool> FilterAsync(SyncDirection direction, OperationType operationType, string path, FileSystemItemType itemType, string newPath, IOperationContext operationContext)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<EnableComHosting>True</EnableComHosting>
<Platforms>x64</Platforms>
<ApplicationIcon />
Expand All @@ -19,7 +19,7 @@
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="8.1.26224.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="8.1.26727.0-Beta2" />
</ItemGroup>
<ItemGroup>
<None Update="log4net.config">
Expand Down
4 changes: 2 additions & 2 deletions Windows/VirtualDrive/VirtualDrive/VirtualDrive.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<Authors>IT Hit LTD.</Authors>
<Company>IT Hit LTD.</Company>
<Product>Virtual Drive</Product>
Expand Down Expand Up @@ -40,7 +40,7 @@ This is an advanced project with ETags support, Microsoft Office documents editi
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="8.1.26224.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="8.1.26727.0-Beta2" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
<ProjectReference Include="..\..\Common\VirtualDrive\Common.Windows.VirtualDrive.csproj" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Windows/VirtualFileSystem/VirtualFileSystem.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net7.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-windows10.0.19041.0</TargetFrameworks>
<Authors>IT Hit LTD.</Authors>
<Company>IT Hit LTD.</Company>
<Product>Virtual File System</Product>
Expand Down Expand Up @@ -35,7 +35,7 @@ This project does not support ETags, locking, Microsoft Office documents editing
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.7" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.AppHelper" Version="8.1.26224.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows.AppHelper" Version="8.1.26727.0-Beta2" />
<ProjectReference Include="..\Common\Core\Common.Windows.Core.csproj" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<EnableComHosting>True</EnableComHosting>
<Platforms>x64</Platforms>
<ApplicationIcon />
Expand All @@ -12,7 +12,7 @@
<Copyright>IT HIT LTD.</Copyright>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="8.1.26224.0-Beta2" />
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="8.1.26727.0-Beta2" />
</ItemGroup>
<ItemGroup>
<None Update="log4net.config">
Expand Down
94 changes: 0 additions & 94 deletions Windows/WebDAVDrive/WebDAVDrive.UI/ChallengeLogin.xaml

This file was deleted.

Loading

0 comments on commit 4cbd863

Please sign in to comment.