Skip to content

Commit

Permalink
v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
user413 committed Mar 14, 2022
1 parent daea970 commit 94c989c
Show file tree
Hide file tree
Showing 21 changed files with 535 additions and 250 deletions.
23 changes: 13 additions & 10 deletions BackupHelper/BackupHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="FileControlUtility, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FileControlUtility.1.0.1\lib\netstandard2.0\FileControlUtility.dll</HintPath>
<Reference Include="FileControlUtility, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FileControlUtility.1.1.0\lib\netstandard2.0\FileControlUtility.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net46\System.Data.SQLite.dll</HintPath>
<Reference Include="System.Data.SQLite, Version=1.0.115.5, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\lib\net46\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Xml.Linq" />
Expand All @@ -85,11 +85,11 @@
<Compile Include="FormCancelExecution.Designer.cs">
<DependentUpon>FormCancelExecution.cs</DependentUpon>
</Compile>
<Compile Include="FormEditOption.cs">
<Compile Include="FormEditOptions.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FormEditOption.Designer.cs">
<DependentUpon>FormEditOption.cs</DependentUpon>
<Compile Include="FormEditOptions.Designer.cs">
<DependentUpon>FormEditOptions.cs</DependentUpon>
</Compile>
<Compile Include="FormEditProfile.cs">
<SubType>Form</SubType>
Expand Down Expand Up @@ -128,11 +128,14 @@
<DependentUpon>GroupForm.cs</DependentUpon>
</Compile>
<Compile Include="LogManager.cs" />
<Compile Include="model\Option.cs" />
<Compile Include="model\Options.cs" />
<Compile Include="model\Profile.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SQLiteAccess.cs" />
<EmbeddedResource Include="FormEditOptions.resx">
<DependentUpon>FormEditOptions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FormOptionsMenu.resx">
<DependentUpon>FormOptionsMenu.cs</DependentUpon>
</EmbeddedResource>
Expand Down Expand Up @@ -183,11 +186,11 @@
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
</Target>
</Project>
13 changes: 8 additions & 5 deletions BackupHelper/FileControlConsoleImpl.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using FileControlUtility;
using System;
using System.IO;

namespace BackupHelper
{
Expand All @@ -12,12 +13,13 @@ public FileControlConsoleImpl(bool showDialogs)
this.showDialogs = showDialogs;
}

public override void HandleCurrentFileExecution(string trimmedPathWithFileName)
protected override void HandleCurrentFileExecution(string trimmedPathWithFileName, FileInfo originFile, string destinyDir, TransferSettings settings)
{
Console.WriteLine($"Transfering: {trimmedPathWithFileName}");
//Console.WriteLine($"Transfering: {trimmedPathWithFileName}");
}

public override FileTransferErrorActionNonRepeatable HandleErrorDialogNonRepeatable(string errorMessage, Exception e, string originFile, string destinyFile)
protected override FileTransferErrorActionNonRepeatable HandleTransferErrorNonRepeatable(string errorMessage, Exception e, FileInfo originFile,
string destinyDir, TransferSettings settings)
{
if (!showDialogs) return FileTransferErrorActionNonRepeatable.JUMP;

Expand All @@ -26,7 +28,8 @@ public override FileTransferErrorActionNonRepeatable HandleErrorDialogNonRepeata
return (FileTransferErrorActionNonRepeatable)form.Result;
}

public override FileTransferErrorActionRepeatable HandleErrorDialogRepeatable(string errorMessage, Exception e, string originFile, string destinyFile)
protected override FileTransferErrorActionRepeatable HandleTransferErrorRepeatable(string errorMessage, Exception e, FileInfo originFile,
string destinyDir, TransferSettings settings)
{
if (!showDialogs) return FileTransferErrorActionRepeatable.JUMP;

Expand All @@ -35,7 +38,7 @@ public override FileTransferErrorActionRepeatable HandleErrorDialogRepeatable(st
return (FileTransferErrorActionRepeatable)form.Result;
}

public override void HandleLogMessage(string logMessage)
protected override void HandleLogMessage(string logMessage)
{
LogManager.WriteLine(logMessage);
}
Expand Down
11 changes: 7 additions & 4 deletions BackupHelper/FileControlImpl.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using FileControlUtility;
using System;
using System.IO;

namespace BackupHelper
{
Expand All @@ -12,29 +13,31 @@ public FileControlImpl(FormOptionsMenu menu)
Menu = menu;
}

public override void HandleCurrentFileExecution(string trimmedPathWithFileName)
protected override void HandleCurrentFileExecution(string trimmedPathWithFileName, FileInfo originFile, string destinyDir, TransferSettings settings)
{
if (trimmedPathWithFileName.Length > 100)
trimmedPathWithFileName = $"...{trimmedPathWithFileName.Substring(trimmedPathWithFileName.Length - 100)}";

Menu.ShowCurrentFileExecution(trimmedPathWithFileName);
}

public override FileTransferErrorActionNonRepeatable HandleErrorDialogNonRepeatable(string errorMessage, Exception e, string originFile, string destinyFile)
protected override FileTransferErrorActionNonRepeatable HandleTransferErrorNonRepeatable(string errorMessage, Exception e, FileInfo originFile,
string destinyDir, TransferSettings settings)
{
FormErrorDialog form = new FormErrorDialog(typeof(FileTransferErrorActionNonRepeatable), errorMessage);
form.ShowDialog();
return (FileTransferErrorActionNonRepeatable)form.Result;
}

public override FileTransferErrorActionRepeatable HandleErrorDialogRepeatable(string errorMessage, Exception e, string originFile, string destinyFile)
protected override FileTransferErrorActionRepeatable HandleTransferErrorRepeatable(string errorMessage, Exception e, FileInfo originFile,
string destinyDir, TransferSettings settings)
{
FormErrorDialog form = new FormErrorDialog(typeof(FileTransferErrorActionRepeatable), errorMessage);
form.ShowDialog();
return (FileTransferErrorActionRepeatable)form.Result;
}

public override void HandleLogMessage(string logMessage)
protected override void HandleLogMessage(string logMessage)
{
LogManager.WriteLine(logMessage);
}
Expand Down
Loading

0 comments on commit 94c989c

Please sign in to comment.