Restructured the database, upgrades are no longer possible.
Fixed many minor issues with the wizard. git-svn-id: https://duplicati.googlecode.com/svn/trunk@80 59da171f-624f-0410-aa54-27559c288bec
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<settings>
|
||||
<FullBackupInterval>1M</FullBackupInterval>
|
||||
<MaxFullBackups>4</MaxFullBackups>
|
||||
<BackupExpireInterval></BackupExpireInterval>
|
||||
<RepeatInterval>1D</RepeatInterval>
|
||||
<VolumeSize>5MB</VolumeSize>
|
||||
<BackupTimeOffset>13h</BackupTimeOffset>
|
||||
</settings>
|
||||
@@ -1,4 +0,0 @@
|
||||
ALTER TABLE "Schedule" ADD COLUMN "MaxUploadsize" TEXT NULL;
|
||||
ALTER TABLE "Schedule" ADD COLUMN "VolumeSize" TEXT NULL;
|
||||
ALTER TABLE "Schedule" ADD COLUMN "UploadBandwidth" TEXT NULL;
|
||||
ALTER TABLE "Schedule" ADD COLUMN "DownloadBandwidth" TEXT NULL;
|
||||
@@ -1,7 +0,0 @@
|
||||
CREATE TABLE "TaskFilter" (
|
||||
"ID" INTEGER PRIMARY KEY,
|
||||
"SortOrder" INTEGER NULL,
|
||||
"Include" BOOLEAN NULL,
|
||||
"Filter" TEXT NULL,
|
||||
"TaskID" INTEGER NULL
|
||||
);
|
||||
@@ -4,7 +4,16 @@ CREATE TABLE "Task" (
|
||||
"Encryptionkey" TEXT NULL,
|
||||
"Signaturekey" TEXT NULL,
|
||||
"SourcePath" TEXT NULL,
|
||||
"ScheduleID" INTEGER NULL
|
||||
"ScheduleID" INTEGER NULL,
|
||||
"KeepFull" INTEGER NULL,
|
||||
"KeepTime" TEXT NULL,
|
||||
"MaxUploadsize" TEXT NULL,
|
||||
"UploadBandwidth" TEXT NULL,
|
||||
"DownloadBandwidth" TEXT NULL,
|
||||
"VolumeSize" TEXT NULL,
|
||||
"FullAfter" TEXT NULL,
|
||||
"ThreadPriority" TEXT NULL,
|
||||
"AsyncTransfer" BOOLEAN NULL
|
||||
);
|
||||
|
||||
CREATE TABLE "Schedule" (
|
||||
@@ -13,14 +22,7 @@ CREATE TABLE "Schedule" (
|
||||
"Path" TEXT NULL,
|
||||
"When" DATETIME NULL,
|
||||
"Repeat" TEXT NULL,
|
||||
"Weekdays" TEXT NULL,
|
||||
"KeepFull" INTEGER NULL,
|
||||
"KeepTime" TEXT NULL,
|
||||
"MaxUploadsize" TEXT NULL,
|
||||
"UploadBandwidth" TEXT NULL,
|
||||
"DownloadBandwidth" TEXT NULL,
|
||||
"VolumeSize" TEXT NULL,
|
||||
"FullAfter" TEXT
|
||||
"Weekdays" TEXT NULL
|
||||
);
|
||||
|
||||
|
||||
@@ -75,4 +77,4 @@ CREATE TABLE "TaskFilter" (
|
||||
);
|
||||
|
||||
|
||||
INSERT INTO "Version" ("Version") VALUES (2);
|
||||
INSERT INTO "Version" ("Version") VALUES (0);
|
||||
@@ -1,119 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{B60D0993-B0C5-457A-90D9-DB6EEB33CE47}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon />
|
||||
<AssemblyKeyContainerName />
|
||||
<AssemblyName>Datamodel</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>LightDatamodel.snk</AssemblyOriginatorKeyFile>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Duplicati.Datamodel</RootNamespace>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<StartupObject />
|
||||
<FileUpgradeFlags />
|
||||
<UpgradeBackupLocation />
|
||||
<SignAssembly>true</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<NoStdLib>false</NoStdLib>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>none</DebugType>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.XML">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="Backends\File.cs" />
|
||||
<Compile Include="Backends\IBackend.cs" />
|
||||
<Compile Include="Backends\S3.cs" />
|
||||
<Compile Include="Backends\SSH.cs" />
|
||||
<Compile Include="SettingsHelper.cs" />
|
||||
<Compile Include="Task.Extension.cs" />
|
||||
<Compile Include="Task.cs" />
|
||||
<Compile Include="Schedule.cs" />
|
||||
<Compile Include="TaskSetting.cs" />
|
||||
<Compile Include="CommandQueue.cs" />
|
||||
<Compile Include="Log.cs" />
|
||||
<Compile Include="LogBlob.cs" />
|
||||
<Compile Include="ApplicationSettings.cs" />
|
||||
<Compile Include="ApplicationSetting.cs" />
|
||||
<Compile Include="TaskFilter.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="LightDatamodel.snk" />
|
||||
<Compile Include="Backends\FTP.cs" />
|
||||
<Compile Include="Log.Extension.cs" />
|
||||
<Compile Include="LogBlob.Extension.cs" />
|
||||
<Compile Include="Schedule.Extension.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\LightDatamodel\LightDatamodel\LightDatamodel.csproj">
|
||||
<Project>{CAE8433B-F013-474E-B7FC-4DE0D5933AD1}</Project>
|
||||
<Name>LightDatamodel</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Library\Core\Duplicati.Library.Core.csproj">
|
||||
<Project>{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}</Project>
|
||||
<Name>Duplicati.Library.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
<?xml version="1.0" encoding="utf-8"?><Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><ProjectType>Local</ProjectType><ProductVersion>8.0.50727</ProductVersion><SchemaVersion>2.0</SchemaVersion><ProjectGuid>{B60D0993-B0C5-457A-90D9-DB6EEB33CE47}</ProjectGuid><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform><ApplicationIcon /><AssemblyKeyContainerName /><AssemblyName>Datamodel</AssemblyName><AssemblyOriginatorKeyFile>LightDatamodel.snk</AssemblyOriginatorKeyFile><DefaultClientScript>JScript</DefaultClientScript><DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout><DefaultTargetSchema>IE50</DefaultTargetSchema><DelaySign>false</DelaySign><OutputType>Library</OutputType><RootNamespace>Duplicati.Datamodel</RootNamespace><RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent><StartupObject /><FileUpgradeFlags /><UpgradeBackupLocation /><SignAssembly>true</SignAssembly></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "><OutputPath>bin\Debug\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>DEBUG;TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>true</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>false</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>full</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "><OutputPath>bin\Release\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>false</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>true</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>none</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><ItemGroup><Reference Include="System"><Name>System</Name></Reference><Reference Include="System.Data"><Name>System.Data</Name></Reference><Reference Include="System.XML"><Name>System.XML</Name></Reference></ItemGroup><ItemGroup><Compile Include="AssemblyInfo.cs" /><Compile Include="Backends\File.cs" /><Compile Include="Backends\IBackend.cs" /><Compile Include="Backends\S3.cs" /><Compile Include="Backends\SSH.cs" /><Compile Include="SettingsHelper.cs" /><Compile Include="Task.Extension.cs" /><Compile Include="Task.cs" /><Compile Include="Schedule.cs" /><Compile Include="TaskSetting.cs" /><Compile Include="CommandQueue.cs" /><Compile Include="Log.cs" /><Compile Include="LogBlob.cs" /><Compile Include="ApplicationSettings.cs" /><Compile Include="ApplicationSetting.cs" /><Compile Include="TaskFilter.cs" /></ItemGroup><ItemGroup><None Include="LightDatamodel.snk" /><Compile Include="Backends\FTP.cs" /><Compile Include="Log.Extension.cs" /><Compile Include="LogBlob.Extension.cs" /><Compile Include="Schedule.Extension.cs" /></ItemGroup><ItemGroup><ProjectReference Include="..\..\..\..\LightDatamodel\LightDatamodel\LightDatamodel.csproj"><Project>{CAE8433B-F013-474E-B7FC-4DE0D5933AD1}</Project><Name>LightDatamodel</Name></ProjectReference><ProjectReference Include="..\..\Library\Core\Duplicati.Library.Core.csproj"><Project>{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}</Project><Name>Duplicati.Library.Core</Name></ProjectReference></ItemGroup><Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /></Project>
|
||||
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><ProjectType>Local</ProjectType><ProductVersion>8.0.50727</ProductVersion><SchemaVersion>2.0</SchemaVersion><ProjectGuid>{ed5d597c-99b5-4aeb-bfeb-ba6d13b3e349}</ProjectGuid><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform><ApplicationIcon /><AssemblyKeyContainerName /><AssemblyName>Duplicati</AssemblyName><AssemblyOriginatorKeyFile>LightDatamodel.snk</AssemblyOriginatorKeyFile><DefaultClientScript>JScript</DefaultClientScript><DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout><DefaultTargetSchema>IE50</DefaultTargetSchema><DelaySign>false</DelaySign><OutputType>Library</OutputType><RootNamespace>Datamodel.Duplicati</RootNamespace><RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent><StartupObject /><FileUpgradeFlags /><UpgradeBackupLocation /><SignAssembly>true</SignAssembly></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "><OutputPath>bin\Debug\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>DEBUG;TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>true</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>false</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>full</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "><OutputPath>bin\Release\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>false</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>true</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>none</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><ItemGroup><Reference Include="System"><Name>System</Name></Reference><Reference Include="System.Data"><Name>System.Data</Name></Reference><Reference Include="System.XML"><Name>System.XML</Name></Reference><Reference Include="LightDatamodel"><Name>LightDatamodel</Name><HintPath>.\LightDatamodel.dll</HintPath></Reference></ItemGroup><ItemGroup><Compile Include="AssemblyInfo.cs" /><Compile Include="Task.cs" /><Compile Include="Schedule.cs" /><Compile Include="TaskSetting.cs" /><Compile Include="CommandQueue.cs" /><Compile Include="Log.cs" /><Compile Include="LogBlob.cs" /><EmbeddedResource Include="C:\Documents and Settings\Kenneth\Dokumenter\duplicati\Duplicati\Datamodel\LightDataModel.Mapping.xml" /><Compile Include="ApplicationSetting.cs" /></ItemGroup><ItemGroup><None Include="LightDatamodel.snk" /></ItemGroup><Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /></Project>
|
||||
<?xml version="1.0" encoding="UTF-8"?><Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><ProjectType>Local</ProjectType><ProductVersion>8.0.50727</ProductVersion><SchemaVersion>2.0</SchemaVersion><ProjectGuid>{ed5d597c-99b5-4aeb-bfeb-ba6d13b3e349}</ProjectGuid><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform><ApplicationIcon /><AssemblyKeyContainerName /><AssemblyName>Duplicati</AssemblyName><AssemblyOriginatorKeyFile>LightDatamodel.snk</AssemblyOriginatorKeyFile><DefaultClientScript>JScript</DefaultClientScript><DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout><DefaultTargetSchema>IE50</DefaultTargetSchema><DelaySign>false</DelaySign><OutputType>Library</OutputType><RootNamespace>Datamodel.Duplicati</RootNamespace><RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent><StartupObject /><FileUpgradeFlags /><UpgradeBackupLocation /><SignAssembly>true</SignAssembly></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "><OutputPath>bin\Debug\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>DEBUG;TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>true</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>false</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>full</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "><OutputPath>bin\Release\</OutputPath><AllowUnsafeBlocks>false</AllowUnsafeBlocks><BaseAddress>285212672</BaseAddress><CheckForOverflowUnderflow>false</CheckForOverflowUnderflow><ConfigurationOverrideFile></ConfigurationOverrideFile><DefineConstants>TRACE</DefineConstants><DocumentationFile></DocumentationFile><DebugSymbols>false</DebugSymbols><FileAlignment>4096</FileAlignment><NoStdLib>false</NoStdLib><NoWarn></NoWarn><Optimize>true</Optimize><RegisterForComInterop>false</RegisterForComInterop><RemoveIntegerChecks>false</RemoveIntegerChecks><TreatWarningsAsErrors>false</TreatWarningsAsErrors><WarningLevel>4</WarningLevel><DebugType>none</DebugType><ErrorReport>prompt</ErrorReport></PropertyGroup><ItemGroup><Reference Include="System"><Name>System</Name></Reference><Reference Include="System.Data"><Name>System.Data</Name></Reference><Reference Include="System.XML"><Name>System.XML</Name></Reference><Reference Include="LightDatamodel"><Name>LightDatamodel</Name><HintPath>.\LightDatamodel.dll</HintPath></Reference></ItemGroup><ItemGroup><Compile Include="AssemblyInfo.cs" /><Compile Include="Task.cs" /><Compile Include="Schedule.cs" /><Compile Include="TaskSetting.cs" /><Compile Include="CommandQueue.cs" /><Compile Include="Log.cs" /><Compile Include="LogBlob.cs" /><EmbeddedResource Include="C:\Documents and Settings\Kenneth\Dokumenter\duplicati\Duplicati\Datamodel\LightDataModel.Mapping.xml" /><Compile Include="ApplicationSetting.cs" /><Compile Include="TaskFilter.cs" /></ItemGroup><ItemGroup><None Include="LightDatamodel.snk" /></ItemGroup><Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /></Project>
|
||||
Binary file not shown.
@@ -72,6 +72,105 @@
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.Int64</Typename>
|
||||
<Name>KeepFull</Name>
|
||||
<Fieldname>KeepFull</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>KeepTime</Name>
|
||||
<Fieldname>KeepTime</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>MaxUploadsize</Name>
|
||||
<Fieldname>MaxUploadsize</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>UploadBandwidth</Name>
|
||||
<Fieldname>UploadBandwidth</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>DownloadBandwidth</Name>
|
||||
<Fieldname>DownloadBandwidth</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>VolumeSize</Name>
|
||||
<Fieldname>VolumeSize</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>FullAfter</Name>
|
||||
<Fieldname>FullAfter</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>ThreadPriority</Name>
|
||||
<Fieldname>ThreadPriority</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.Boolean</Typename>
|
||||
<Name>AsyncTransfer</Name>
|
||||
<Fieldname>AsyncTransfer</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
</Columns>
|
||||
<Ignore>false</Ignore>
|
||||
<Relations>
|
||||
@@ -79,10 +178,10 @@
|
||||
<Name>TaskSchedule</Name>
|
||||
<Databasefield>ScheduleID</Databasefield>
|
||||
<Propertyname>Schedule</Propertyname>
|
||||
<Type>OneToMany</Type>
|
||||
<Type>OneToOne</Type>
|
||||
<ReverseTablename>Schedule</ReverseTablename>
|
||||
<ReverseDatabasefield>ID</ReverseDatabasefield>
|
||||
<ReversePropertyname>Tasks</ReversePropertyname>
|
||||
<ReversePropertyname>Task</ReversePropertyname>
|
||||
<Tablename>Task</Tablename>
|
||||
</Relation>
|
||||
</Relations>
|
||||
@@ -158,86 +257,6 @@
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.Int64</Typename>
|
||||
<Name>KeepFull</Name>
|
||||
<Fieldname>KeepFull</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>KeepTime</Name>
|
||||
<Fieldname>KeepTime</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>FullAfter</Name>
|
||||
<Fieldname>FullAfter</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>DownloadBandwidth</Name>
|
||||
<Fieldname>DownloadBandwidth</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<Default xsi:type="xsd:string" />
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>UploadBandwidth</Name>
|
||||
<Fieldname>UploadBandwidth</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<Default xsi:type="xsd:string" />
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>VolumeSize</Name>
|
||||
<Fieldname>VolumeSize</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<Default xsi:type="xsd:string" />
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
<Column>
|
||||
<Typename>System.String</Typename>
|
||||
<Name>MaxUploadsize</Name>
|
||||
<Fieldname>MaxUploadsize</Fieldname>
|
||||
<Autonumber>false</Autonumber>
|
||||
<PrimaryKey>false</PrimaryKey>
|
||||
<IgnoreWithSelect>false</IgnoreWithSelect>
|
||||
<IgnoreWithUpdate>false</IgnoreWithUpdate>
|
||||
<IgnoreWithInsert>false</IgnoreWithInsert>
|
||||
<Index>false</Index>
|
||||
</Column>
|
||||
</Columns>
|
||||
<Ignore>false</Ignore>
|
||||
<Relations />
|
||||
|
||||
@@ -13,14 +13,6 @@ namespace Duplicati.Datamodel
|
||||
|
||||
public void GetOptions(Dictionary<string, string> options)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.MaxUploadsize))
|
||||
options["totalsize"] = this.MaxUploadsize;
|
||||
if (!string.IsNullOrEmpty(this.VolumeSize))
|
||||
options["volsize"] = this.VolumeSize;
|
||||
if (!string.IsNullOrEmpty(this.DownloadBandwidth))
|
||||
options["max-download-pr-second"] = this.DownloadBandwidth;
|
||||
if (!string.IsNullOrEmpty(this.UploadBandwidth))
|
||||
options["max-upload-pr-second"] = this.UploadBandwidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,20 +31,6 @@ namespace Duplicati.Datamodel
|
||||
private System.String m_Repeat = "";
|
||||
[DatabaseField("Weekdays")]
|
||||
private System.String m_Weekdays = "";
|
||||
[DatabaseField("KeepFull")]
|
||||
private System.Int64 m_KeepFull = long.MinValue;
|
||||
[DatabaseField("KeepTime")]
|
||||
private System.String m_KeepTime = "";
|
||||
[DatabaseField("FullAfter")]
|
||||
private System.String m_FullAfter = "";
|
||||
[Default(""), DatabaseField("DownloadBandwidth")]
|
||||
private System.String m_DownloadBandwidth = "";
|
||||
[Default(""), DatabaseField("UploadBandwidth")]
|
||||
private System.String m_UploadBandwidth = "";
|
||||
[Default(""), DatabaseField("VolumeSize")]
|
||||
private System.String m_VolumeSize = "";
|
||||
[DatabaseField("MaxUploadsize")]
|
||||
private System.String m_MaxUploadsize = "";
|
||||
#endregion
|
||||
|
||||
#region " properties "
|
||||
@@ -85,59 +71,15 @@ namespace Duplicati.Datamodel
|
||||
set{object oldvalue = m_Weekdays;OnBeforeDataChange(this, "Weekdays", oldvalue, value);m_Weekdays = value;OnAfterDataChange(this, "Weekdays", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.Int64 KeepFull
|
||||
{
|
||||
get{return m_KeepFull;}
|
||||
set{object oldvalue = m_KeepFull;OnBeforeDataChange(this, "KeepFull", oldvalue, value);m_KeepFull = value;OnAfterDataChange(this, "KeepFull", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String KeepTime
|
||||
{
|
||||
get{return m_KeepTime;}
|
||||
set{object oldvalue = m_KeepTime;OnBeforeDataChange(this, "KeepTime", oldvalue, value);m_KeepTime = value;OnAfterDataChange(this, "KeepTime", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String FullAfter
|
||||
{
|
||||
get{return m_FullAfter;}
|
||||
set{object oldvalue = m_FullAfter;OnBeforeDataChange(this, "FullAfter", oldvalue, value);m_FullAfter = value;OnAfterDataChange(this, "FullAfter", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String DownloadBandwidth
|
||||
{
|
||||
get{return m_DownloadBandwidth;}
|
||||
set{object oldvalue = m_DownloadBandwidth;OnBeforeDataChange(this, "DownloadBandwidth", oldvalue, value);m_DownloadBandwidth = value;OnAfterDataChange(this, "DownloadBandwidth", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String UploadBandwidth
|
||||
{
|
||||
get{return m_UploadBandwidth;}
|
||||
set{object oldvalue = m_UploadBandwidth;OnBeforeDataChange(this, "UploadBandwidth", oldvalue, value);m_UploadBandwidth = value;OnAfterDataChange(this, "UploadBandwidth", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String VolumeSize
|
||||
{
|
||||
get{return m_VolumeSize;}
|
||||
set{object oldvalue = m_VolumeSize;OnBeforeDataChange(this, "VolumeSize", oldvalue, value);m_VolumeSize = value;OnAfterDataChange(this, "VolumeSize", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String MaxUploadsize
|
||||
{
|
||||
get{return m_MaxUploadsize;}
|
||||
set{object oldvalue = m_MaxUploadsize;OnBeforeDataChange(this, "MaxUploadsize", oldvalue, value);m_MaxUploadsize = value;OnAfterDataChange(this, "MaxUploadsize", oldvalue, value);}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " referenced properties "
|
||||
|
||||
[Affects(typeof(Task))]
|
||||
public System.Collections.Generic.IList<Task> Tasks
|
||||
public Task Task
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((DataFetcherWithRelations)m_dataparent).GetRelatedObjects<Task>("TaskSchedule", this);
|
||||
}
|
||||
get{ return ((DataFetcherWithRelations)m_dataparent).GetRelatedObject<Task>("TaskSchedule", this); }
|
||||
set{ ((DataFetcherWithRelations)m_dataparent).SetRelatedObject("TaskSchedule", this, value); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -72,6 +72,14 @@ namespace Duplicati.Datamodel
|
||||
|
||||
if (this.Filters.Count > 0)
|
||||
options["filter"] = this.EncodedFilter; ;
|
||||
if (!string.IsNullOrEmpty(this.MaxUploadsize))
|
||||
options["totalsize"] = this.MaxUploadsize;
|
||||
if (!string.IsNullOrEmpty(this.VolumeSize))
|
||||
options["volsize"] = this.VolumeSize;
|
||||
if (!string.IsNullOrEmpty(this.DownloadBandwidth))
|
||||
options["max-download-pr-second"] = this.DownloadBandwidth;
|
||||
if (!string.IsNullOrEmpty(this.UploadBandwidth))
|
||||
options["max-upload-pr-second"] = this.UploadBandwidth;
|
||||
}
|
||||
|
||||
public string EncodedFilter
|
||||
@@ -95,6 +103,7 @@ namespace Duplicati.Datamodel
|
||||
TaskFilter tf = this.DataParent.Add<TaskFilter>();
|
||||
tf.Filter = f.Value;
|
||||
tf.Include = f.Key;
|
||||
filters.Add(tf);
|
||||
}
|
||||
|
||||
this.SortedFilters = filters.ToArray();
|
||||
|
||||
@@ -31,6 +31,24 @@ namespace Duplicati.Datamodel
|
||||
private System.String m_SourcePath = "";
|
||||
[Relation("TaskSchedule", typeof(Schedule), "ID"), DatabaseField("ScheduleID")]
|
||||
private System.Int64 m_ScheduleID = long.MinValue;
|
||||
[DatabaseField("KeepFull")]
|
||||
private System.Int64 m_KeepFull = long.MinValue;
|
||||
[DatabaseField("KeepTime")]
|
||||
private System.String m_KeepTime = "";
|
||||
[DatabaseField("MaxUploadsize")]
|
||||
private System.String m_MaxUploadsize = "";
|
||||
[DatabaseField("UploadBandwidth")]
|
||||
private System.String m_UploadBandwidth = "";
|
||||
[DatabaseField("DownloadBandwidth")]
|
||||
private System.String m_DownloadBandwidth = "";
|
||||
[DatabaseField("VolumeSize")]
|
||||
private System.String m_VolumeSize = "";
|
||||
[DatabaseField("FullAfter")]
|
||||
private System.String m_FullAfter = "";
|
||||
[DatabaseField("ThreadPriority")]
|
||||
private System.String m_ThreadPriority = "";
|
||||
[DatabaseField("AsyncTransfer")]
|
||||
private System.Boolean m_AsyncTransfer = false;
|
||||
#endregion
|
||||
|
||||
#region " properties "
|
||||
@@ -71,6 +89,60 @@ namespace Duplicati.Datamodel
|
||||
set{object oldvalue = m_ScheduleID;OnBeforeDataChange(this, "ScheduleID", oldvalue, value);m_ScheduleID = value;OnAfterDataChange(this, "ScheduleID", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.Int64 KeepFull
|
||||
{
|
||||
get{return m_KeepFull;}
|
||||
set{object oldvalue = m_KeepFull;OnBeforeDataChange(this, "KeepFull", oldvalue, value);m_KeepFull = value;OnAfterDataChange(this, "KeepFull", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String KeepTime
|
||||
{
|
||||
get{return m_KeepTime;}
|
||||
set{object oldvalue = m_KeepTime;OnBeforeDataChange(this, "KeepTime", oldvalue, value);m_KeepTime = value;OnAfterDataChange(this, "KeepTime", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String MaxUploadsize
|
||||
{
|
||||
get{return m_MaxUploadsize;}
|
||||
set{object oldvalue = m_MaxUploadsize;OnBeforeDataChange(this, "MaxUploadsize", oldvalue, value);m_MaxUploadsize = value;OnAfterDataChange(this, "MaxUploadsize", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String UploadBandwidth
|
||||
{
|
||||
get{return m_UploadBandwidth;}
|
||||
set{object oldvalue = m_UploadBandwidth;OnBeforeDataChange(this, "UploadBandwidth", oldvalue, value);m_UploadBandwidth = value;OnAfterDataChange(this, "UploadBandwidth", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String DownloadBandwidth
|
||||
{
|
||||
get{return m_DownloadBandwidth;}
|
||||
set{object oldvalue = m_DownloadBandwidth;OnBeforeDataChange(this, "DownloadBandwidth", oldvalue, value);m_DownloadBandwidth = value;OnAfterDataChange(this, "DownloadBandwidth", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String VolumeSize
|
||||
{
|
||||
get{return m_VolumeSize;}
|
||||
set{object oldvalue = m_VolumeSize;OnBeforeDataChange(this, "VolumeSize", oldvalue, value);m_VolumeSize = value;OnAfterDataChange(this, "VolumeSize", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String FullAfter
|
||||
{
|
||||
get{return m_FullAfter;}
|
||||
set{object oldvalue = m_FullAfter;OnBeforeDataChange(this, "FullAfter", oldvalue, value);m_FullAfter = value;OnAfterDataChange(this, "FullAfter", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.String ThreadPriority
|
||||
{
|
||||
get{return m_ThreadPriority;}
|
||||
set{object oldvalue = m_ThreadPriority;OnBeforeDataChange(this, "ThreadPriority", oldvalue, value);m_ThreadPriority = value;OnAfterDataChange(this, "ThreadPriority", oldvalue, value);}
|
||||
}
|
||||
|
||||
public System.Boolean AsyncTransfer
|
||||
{
|
||||
get{return m_AsyncTransfer;}
|
||||
set{object oldvalue = m_AsyncTransfer;OnBeforeDataChange(this, "AsyncTransfer", oldvalue, value);m_AsyncTransfer = value;OnAfterDataChange(this, "AsyncTransfer", oldvalue, value);}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " referenced properties "
|
||||
|
||||
@@ -508,9 +508,8 @@
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>SelectBackup.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<Content Include="Database schema\1.Throttle options.sql" />
|
||||
<EmbeddedResource Include="Database schema\2.Filter support.sql" />
|
||||
<Content Include="TrayUnknown.ico" />
|
||||
<EmbeddedResource Include="Backup defaults.xml" />
|
||||
<EmbeddedResource Include="TrayUnknown.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Wizard pages\Rearrange\" />
|
||||
|
||||
@@ -70,10 +70,10 @@ namespace Duplicati.GUI
|
||||
|
||||
if (task.TaskType == DuplicityTaskType.FullBackup || task.TaskType == DuplicityTaskType.IncrementalBackup)
|
||||
{
|
||||
if (task.Schedule.KeepFull > 0)
|
||||
ExecuteTask(new RemoveAllButNFullTask(task.Schedule, (int)task.Schedule.KeepFull));
|
||||
if (!string.IsNullOrEmpty(task.Schedule.KeepTime))
|
||||
ExecuteTask(new RemoveOlderThanTask(task.Schedule, task.Schedule.KeepTime));
|
||||
if (task.Schedule.Task.KeepFull > 0)
|
||||
ExecuteTask(new RemoveAllButNFullTask(task.Schedule, (int)task.Schedule.Task.KeepFull));
|
||||
if (!string.IsNullOrEmpty(task.Schedule.Task.KeepTime))
|
||||
ExecuteTask(new RemoveOlderThanTask(task.Schedule, task.Schedule.Task.KeepTime));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -188,8 +188,8 @@ namespace Duplicati.GUI.HelperControls
|
||||
Schedule s;
|
||||
lock(Program.MainLock)
|
||||
s = m_connection.Add<Schedule>();
|
||||
s.FullAfter = "6M";
|
||||
s.KeepFull = 4;
|
||||
s.Task.FullAfter = "6M";
|
||||
s.Task.KeepFull = 4;
|
||||
s.Path = string.IsNullOrEmpty(name) ? "New backup" : name;
|
||||
s.Repeat = "1W";
|
||||
s.Weekdays = "sun,mon,tue,wed,thu,fri,sat";
|
||||
|
||||
@@ -153,6 +153,7 @@ namespace Duplicati.GUI
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
//TODO: shows the wrong icon... Should run under Application.Run() ...
|
||||
MessageBox.Show("Since this is the first time Duplicati is being run, the Wizard will now be shown.\r\nIf you wish to access the wizard again at some other time, you can right click the Duplicati icon in your system tray.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
ShowWizard();
|
||||
}
|
||||
|
||||
@@ -83,19 +83,19 @@ namespace Duplicati.GUI.Service_controls
|
||||
|
||||
UpdateCompositeDays();
|
||||
|
||||
KeepNFullCheckbox.Checked = m_schedule.KeepFull > 0;
|
||||
CleanupFullCount.Value = Math.Max(Math.Min(m_schedule.KeepFull, CleanupFullCount.Maximum), CleanupFullCount.Minimum);
|
||||
KeepNFullCheckbox.Checked = m_schedule.Task.KeepFull > 0;
|
||||
CleanupFullCount.Value = Math.Max(Math.Min(m_schedule.Task.KeepFull, CleanupFullCount.Maximum), CleanupFullCount.Minimum);
|
||||
|
||||
KeepIntervalCheckbox.Checked = !string.IsNullOrEmpty(m_schedule.KeepTime);
|
||||
CleanupDuration.Text = m_schedule.KeepTime;
|
||||
KeepIntervalCheckbox.Checked = !string.IsNullOrEmpty(m_schedule.Task.KeepTime);
|
||||
CleanupDuration.Text = m_schedule.Task.KeepTime;
|
||||
|
||||
ForceFullBackup.Checked = !string.IsNullOrEmpty(m_schedule.FullAfter);
|
||||
ForceFullBackupTimespan.Text = m_schedule.FullAfter;
|
||||
ForceFullBackup.Checked = !string.IsNullOrEmpty(m_schedule.Task.FullAfter);
|
||||
ForceFullBackupTimespan.Text = m_schedule.Task.FullAfter;
|
||||
|
||||
MaxUploaded.Text = m_schedule.MaxUploadsize;
|
||||
VolumeSize.Text = m_schedule.VolumeSize;
|
||||
DownloadBandwidth.Text = m_schedule.DownloadBandwidth;
|
||||
UploadBandwidth.Text =m_schedule.UploadBandwidth;
|
||||
MaxUploaded.Text = m_schedule.Task.MaxUploadsize;
|
||||
VolumeSize.Text = m_schedule.Task.VolumeSize;
|
||||
DownloadBandwidth.Text = m_schedule.Task.DownloadBandwidth;
|
||||
UploadBandwidth.Text =m_schedule.Task.UploadBandwidth;
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -202,7 +202,7 @@ namespace Duplicati.GUI.Service_controls
|
||||
|
||||
KeepIntervalCheckbox.Checked = (CleanupDuration.Text.Trim().Length > 0);
|
||||
if (Interval_TextChanged(sender, e))
|
||||
m_schedule.KeepTime = CleanupDuration.Text;
|
||||
m_schedule.Task.KeepTime = CleanupDuration.Text;
|
||||
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace Duplicati.GUI.Service_controls
|
||||
|
||||
ForceFullBackup.Checked = (ForceFullBackupTimespan.Text.Trim().Length > 0);
|
||||
if (Interval_TextChanged(sender, e))
|
||||
m_schedule.FullAfter = ForceFullBackupTimespan.Text;
|
||||
m_schedule.Task.FullAfter = ForceFullBackupTimespan.Text;
|
||||
|
||||
}
|
||||
|
||||
@@ -222,8 +222,8 @@ namespace Duplicati.GUI.Service_controls
|
||||
if (m_isUpdating || m_schedule == null)
|
||||
return;
|
||||
|
||||
m_schedule.KeepFull = Convert.ToInt32(CleanupFullCount.Value);
|
||||
KeepNFullCheckbox.Checked = m_schedule.KeepFull > 0;
|
||||
m_schedule.Task.KeepFull = Convert.ToInt32(CleanupFullCount.Value);
|
||||
KeepNFullCheckbox.Checked = m_schedule.Task.KeepFull > 0;
|
||||
}
|
||||
|
||||
private void MaxUploaded_TextChanged(object sender, EventArgs e)
|
||||
@@ -234,7 +234,7 @@ namespace Duplicati.GUI.Service_controls
|
||||
try
|
||||
{
|
||||
Library.Core.Sizeparser.ParseSize(MaxUploaded.Text);
|
||||
m_schedule.MaxUploadsize = MaxUploaded.Text;
|
||||
m_schedule.Task.MaxUploadsize = MaxUploaded.Text;
|
||||
errorProvider.SetError(MaxUploaded, "");
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -251,7 +251,7 @@ namespace Duplicati.GUI.Service_controls
|
||||
try
|
||||
{
|
||||
Library.Core.Sizeparser.ParseSize(VolumeSize.Text);
|
||||
m_schedule.VolumeSize = VolumeSize.Text;
|
||||
m_schedule.Task.VolumeSize = VolumeSize.Text;
|
||||
errorProvider.SetError(VolumeSize, "");
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -268,7 +268,7 @@ namespace Duplicati.GUI.Service_controls
|
||||
try
|
||||
{
|
||||
Library.Core.Sizeparser.ParseSize(UploadBandwidth.Text);
|
||||
m_schedule.UploadBandwidth = UploadBandwidth.Text;
|
||||
m_schedule.Task.UploadBandwidth = UploadBandwidth.Text;
|
||||
errorProvider.SetError(UploadBandwidth, "");
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -286,7 +286,7 @@ namespace Duplicati.GUI.Service_controls
|
||||
try
|
||||
{
|
||||
Library.Core.Sizeparser.ParseSize(DownloadBandwidth.Text);
|
||||
m_schedule.DownloadBandwidth = DownloadBandwidth.Text;
|
||||
m_schedule.Task.DownloadBandwidth = DownloadBandwidth.Text;
|
||||
errorProvider.SetError(DownloadBandwidth, "");
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -55,18 +55,13 @@ namespace Duplicati.GUI.Service_controls
|
||||
{
|
||||
m_isUpdating = true;
|
||||
m_schedule = schedule;
|
||||
if (m_schedule.Tasks.Count == 0)
|
||||
if (m_schedule.Task == null)
|
||||
{
|
||||
m_task = m_schedule.DataParent.Add<Task>();
|
||||
m_schedule.Tasks.Add(m_task);
|
||||
m_schedule.Task = m_task;
|
||||
}
|
||||
else if (m_schedule.Tasks.Count == 1)
|
||||
m_task = m_schedule.Tasks[0];
|
||||
else
|
||||
{
|
||||
MessageBox.Show(this, "This schedule is using a feature that is not supported by the editor. If you save this setup, the schedule may be damaged", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
m_task = m_schedule.Tasks[0];
|
||||
}
|
||||
m_task = m_schedule.Task;
|
||||
|
||||
if (!m_task.ExistsInDb)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Duplicati.GUI
|
||||
public abstract DuplicityTaskType TaskType { get; }
|
||||
public abstract void GetArguments(List<string> args);
|
||||
public Schedule Schedule { get { return m_schedule; } }
|
||||
public Task Task { get { return m_schedule.Tasks[0]; } }
|
||||
public Task Task { get { return m_schedule.Task; } }
|
||||
public event TaskCompletedHandler TaskCompleted;
|
||||
public virtual DateTime BeginTime
|
||||
{
|
||||
@@ -181,7 +181,7 @@ namespace Duplicati.GUI
|
||||
|
||||
public string FullAfter
|
||||
{
|
||||
get { return m_fullAfter == null ? m_schedule.FullAfter : m_fullAfter; }
|
||||
get { return m_fullAfter == null ? m_schedule.Task.FullAfter : m_fullAfter; }
|
||||
}
|
||||
|
||||
public IncrementalBackupTask(Schedule schedule, string fullAfter)
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
m_wrapper = new WizardSettingsWrapper(m_settings);
|
||||
|
||||
filterEditor1.BasePath = m_wrapper.SourcePath;
|
||||
filterEditor1.Filter = m_wrapper.SourceFilter;
|
||||
filterEditor1.Filter = m_wrapper.EncodedFilters;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,6 +131,7 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
//
|
||||
// CleanupDuration
|
||||
//
|
||||
this.CleanupDuration.Enabled = false;
|
||||
this.CleanupDuration.Location = new System.Drawing.Point(248, 160);
|
||||
this.CleanupDuration.Name = "CleanupDuration";
|
||||
this.CleanupDuration.Size = new System.Drawing.Size(221, 21);
|
||||
|
||||
@@ -157,6 +157,8 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
|
||||
CleanupDuration.Value = m_wrapper.BackupExpireInterval;
|
||||
EnableCleanupDuration.Checked = !string.IsNullOrEmpty(m_wrapper.BackupExpireInterval);
|
||||
if (!EnableCleanupDuration.Checked)
|
||||
CleanupDuration.Value = m_wrapper.FullBackupInterval;
|
||||
}
|
||||
|
||||
if (m_settings.ContainsKey("Incremental:WarnedFull"))
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
|
||||
if (!m_valuesAutoLoaded)
|
||||
{
|
||||
EnablePassword.Checked = !string.IsNullOrEmpty(m_wrapper.BackupPassword);
|
||||
EnablePassword.Checked = !string.IsNullOrEmpty(m_wrapper.BackupPassword) || m_wrapper.PrimayAction == WizardSettingsWrapper.MainAction.Add;
|
||||
Password.Text = m_wrapper.BackupPassword;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
|
||||
private void EnablePassword_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Password.Enabled = PasswordHelptext.Enabled = PasswordGeneratorSettings.Enabled = EnablePassword.Checked;
|
||||
Password.Enabled = PasswordGeneratorSettings.Enabled = EnablePassword.Checked;
|
||||
m_warnedNoPassword = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -205,37 +205,49 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
|
||||
if (!m_valuesAutoLoaded)
|
||||
{
|
||||
List<string> filters = new List<string>();
|
||||
foreach (KeyValuePair<bool, string> tf in Library.Core.FilenameFilter.DecodeFilter(m_wrapper.EncodedFilters))
|
||||
if (tf.Key && tf.Value.StartsWith(Library.Core.FilenameFilter.ConvertGlobbingToRegExp(m_wrapper.SourcePath)))
|
||||
filters.Add(tf.Value);
|
||||
|
||||
List<string> included = new List<string>();
|
||||
foreach (string s in m_specialFolders)
|
||||
if (filters.Contains(Library.Core.FilenameFilter.ConvertGlobbingToRegExp(s + "*")))
|
||||
included.Add(s);
|
||||
|
||||
if (included.Count == 0)
|
||||
if (string.IsNullOrEmpty(m_wrapper.SourcePath))
|
||||
{
|
||||
FolderRadio.Checked = true;
|
||||
TargetFolder.Text = m_wrapper.SourcePath;
|
||||
DocumentsRadio.Checked = true;
|
||||
IncludeDocuments.Checked = true;
|
||||
IncludeImages.Checked = true;
|
||||
IncludeMusic.Checked = false;
|
||||
IncludeDesktop.Checked = true;
|
||||
IncludeSettings.Checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
DocumentsRadio.Checked = true;
|
||||
IncludeDocuments.Checked = included.Contains(m_myDocuments.Substring(1));
|
||||
IncludeImages.Checked = included.Contains(m_myPictures.Substring(1));
|
||||
IncludeMusic.Checked = included.Contains(m_myMusic.Substring(1));
|
||||
IncludeDesktop.Checked = included.Contains(m_desktop.Substring(1));
|
||||
IncludeSettings.Checked = included.Contains(m_appData.Substring(1));
|
||||
|
||||
if (!(IncludeDocuments.Checked || IncludeMusic.Checked || IncludeImages.Checked || IncludeDesktop.Checked || IncludeSettings.Checked))
|
||||
List<string> filters = new List<string>();
|
||||
foreach (KeyValuePair<bool, string> tf in Library.Core.FilenameFilter.DecodeFilter(m_wrapper.EncodedFilters))
|
||||
if (tf.Key && tf.Value.StartsWith(Library.Core.FilenameFilter.ConvertGlobbingToRegExp(m_wrapper.SourcePath)))
|
||||
filters.Add(tf.Value);
|
||||
|
||||
List<string> included = new List<string>();
|
||||
foreach (string s in m_specialFolders)
|
||||
if (filters.Contains(Library.Core.FilenameFilter.ConvertGlobbingToRegExp(s + "*")))
|
||||
included.Add(s);
|
||||
|
||||
if (included.Count == 0)
|
||||
{
|
||||
FolderRadio.Checked = true;
|
||||
TargetFolder.Text = m_wrapper.SourcePath;
|
||||
}
|
||||
else
|
||||
{
|
||||
DocumentsRadio.Checked = true;
|
||||
IncludeDocuments.Checked = included.Contains(m_myDocuments.Substring(1));
|
||||
IncludeImages.Checked = included.Contains(m_myPictures.Substring(1));
|
||||
IncludeMusic.Checked = included.Contains(m_myMusic.Substring(1));
|
||||
IncludeDesktop.Checked = included.Contains(m_desktop.Substring(1));
|
||||
IncludeSettings.Checked = included.Contains(m_appData.Substring(1));
|
||||
|
||||
if (!(IncludeDocuments.Checked || IncludeMusic.Checked || IncludeImages.Checked || IncludeDesktop.Checked || IncludeSettings.Checked))
|
||||
{
|
||||
FolderRadio.Checked = true;
|
||||
TargetFolder.Text = m_wrapper.SourcePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (FolderRadio.Checked)
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
//
|
||||
this.BackupFolder.Location = new System.Drawing.Point(24, 80);
|
||||
this.BackupFolder.Name = "BackupFolder";
|
||||
this.BackupFolder.SelectedBackup = null;
|
||||
this.BackupFolder.SelectedFolder = "";
|
||||
this.BackupFolder.Size = new System.Drawing.Size(440, 120);
|
||||
this.BackupFolder.TabIndex = 0;
|
||||
//
|
||||
@@ -88,6 +90,7 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
this.Controls.Add(this.BackupFolder);
|
||||
this.Name = "SelectName";
|
||||
this.Size = new System.Drawing.Size(506, 242);
|
||||
this.Load += new System.EventHandler(this.SelectName_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
||||
@@ -41,6 +41,17 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
|
||||
base.PageEnter += new PageChangeHandler(SelectName_PageEnter);
|
||||
base.PageLeave += new PageChangeHandler(SelectName_PageLeave);
|
||||
base.PageDisplay += new PageChangeHandler(SelectName_PageDisplay);
|
||||
}
|
||||
|
||||
void SelectName_PageDisplay(object sender, PageChangedArgs args)
|
||||
{
|
||||
//Hide the initial page
|
||||
if (Program.DataConnection.GetObjects<Datamodel.Schedule>().Length == 0)
|
||||
m_owner.BackButton.Enabled = false;
|
||||
|
||||
try { BackupName.Focus(); }
|
||||
catch { }
|
||||
}
|
||||
|
||||
void SelectName_PageLeave(object sender, PageChangedArgs args)
|
||||
@@ -91,5 +102,12 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
//BackupFolder.Focus();
|
||||
BackupFolder.AddFolder(null).BeginEdit();
|
||||
}
|
||||
|
||||
private void SelectName_Load(object sender, EventArgs e)
|
||||
{
|
||||
try { BackupName.Focus(); }
|
||||
catch { }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,6 +191,7 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
this.VolumeSizeLimitNumber.Size = new System.Drawing.Size(88, 20);
|
||||
this.VolumeSizeLimitNumber.TabIndex = 13;
|
||||
this.VolumeSizeLimitNumber.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
this.VolumeSizeLimitNumber.ValueChanged += new System.EventHandler(this.VolumeSizeLimitNumber_ValueChanged);
|
||||
//
|
||||
// AsyncEnabled
|
||||
//
|
||||
@@ -224,9 +225,16 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
//
|
||||
// ThreadPriority
|
||||
//
|
||||
this.ThreadPriority.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.ThreadPriority.Enabled = false;
|
||||
this.ThreadPriority.FormattingEnabled = true;
|
||||
this.ThreadPriority.Location = new System.Drawing.Point(184, 192);
|
||||
this.ThreadPriority.Items.AddRange(new object[] {
|
||||
"High (Not recommended)",
|
||||
"Above normal",
|
||||
"Normal",
|
||||
"Below normal",
|
||||
"Low"});
|
||||
this.ThreadPriority.Location = new System.Drawing.Point(184, 200);
|
||||
this.ThreadPriority.Name = "ThreadPriority";
|
||||
this.ThreadPriority.Size = new System.Drawing.Size(168, 21);
|
||||
this.ThreadPriority.TabIndex = 18;
|
||||
|
||||
@@ -13,6 +13,14 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
{
|
||||
private WizardSettingsWrapper m_wrapper;
|
||||
|
||||
private readonly string[] THREAD_PRIORITIES = new string[] {
|
||||
System.Threading.ThreadPriority.Highest.ToString(),
|
||||
System.Threading.ThreadPriority.AboveNormal.ToString(),
|
||||
System.Threading.ThreadPriority.Normal.ToString(),
|
||||
System.Threading.ThreadPriority.BelowNormal.ToString(),
|
||||
System.Threading.ThreadPriority.Lowest.ToString()
|
||||
};
|
||||
|
||||
public ThrottleOptions()
|
||||
: base("Select how to limit the backup", "On this page you may select limits that prevent the backup procedure from using too many resources")
|
||||
{
|
||||
@@ -20,20 +28,32 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
|
||||
base.PageLeave += new System.Windows.Forms.Wizard.PageChangeHandler(ThrottleOptions_PageLeave);
|
||||
base.PageEnter += new System.Windows.Forms.Wizard.PageChangeHandler(ThrottleOptions_PageEnter);
|
||||
base.PageDisplay += new System.Windows.Forms.Wizard.PageChangeHandler(ThrottleOptions_PageDisplay);
|
||||
}
|
||||
|
||||
void ThrottleOptions_PageDisplay(object sender, System.Windows.Forms.Wizard.PageChangedArgs args)
|
||||
{
|
||||
//Reload due to annoying bug with the numerics
|
||||
if (m_valuesAutoLoaded)
|
||||
base.LoadDialogSettings();
|
||||
}
|
||||
|
||||
private void LoadItem(string name, int defaultSuffix, string value)
|
||||
{
|
||||
ComboBox combo = (ComboBox)this.Controls[name + "LimitSuffix"];
|
||||
NumericUpDown number = (NumericUpDown)this.Controls[name + "LimitNumber"];
|
||||
|
||||
if (this.Controls.ContainsKey(name + "LimitEnabled"))
|
||||
{
|
||||
((CheckBox)this.Controls[name + "LimitEnabled"]).Checked = !string.IsNullOrEmpty(value) && value != "0";
|
||||
if (!((CheckBox)this.Controls[name + "LimitEnabled"]).Checked)
|
||||
{
|
||||
number.Value = 0;
|
||||
combo.SelectedIndex = defaultSuffix;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ComboBox combo = (ComboBox)this.Controls[name + "LimitSuffix"];
|
||||
NumericUpDown number = (NumericUpDown)this.Controls[name + "LimitNumber"];
|
||||
|
||||
long size = 0;
|
||||
|
||||
size = Duplicati.Library.Core.Sizeparser.ParseSize(value);
|
||||
@@ -69,6 +89,10 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
LoadItem("Download", 1, m_wrapper.DownloadSpeedLimit);
|
||||
LoadItem("Backup", 2, m_wrapper.BackupSizeLimit);
|
||||
LoadItem("VolumeSize", 2, m_wrapper.VolumeSize);
|
||||
|
||||
AsyncEnabled.Checked = m_wrapper.AsyncTransfer;
|
||||
ThreadPriority.SelectedIndex = Array.IndexOf<string>(THREAD_PRIORITIES, Library.Core.Utility.ParsePriority(m_wrapper.ThreadPriority).ToString());
|
||||
ThreadPriorityEnabled.Checked = !string.IsNullOrEmpty(m_wrapper.ThreadPriority);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +117,8 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
"";
|
||||
|
||||
m_wrapper.VolumeSize = VolumeSizeLimitNumber.Value.ToString() + VolumeSizeLimitSuffix.Text;
|
||||
m_wrapper.AsyncTransfer = AsyncEnabled.Checked;
|
||||
m_wrapper.ThreadPriority = ThreadPriorityEnabled.Enabled ? THREAD_PRIORITIES[ThreadPriority.SelectedIndex] : "";
|
||||
|
||||
if ((bool)m_settings["Advanced:Filters"])
|
||||
args.NextPage = new Wizard_pages.Add_backup.EditFilters();
|
||||
@@ -120,6 +146,11 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
{
|
||||
ThreadPriority.Enabled = ThreadPriorityEnabled.Checked;
|
||||
}
|
||||
|
||||
private void VolumeSizeLimitNumber_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int a = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,6 @@ namespace Duplicati.GUI.Wizard_pages.Backends.File
|
||||
{
|
||||
FileSettings m_wrapper;
|
||||
|
||||
private bool m_isUpdating = false;
|
||||
|
||||
public FileOptions()
|
||||
: base("Backup storage options", "On this page you can select where to store the backup data.")
|
||||
{
|
||||
|
||||
+1
@@ -139,6 +139,7 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "MainPage";
|
||||
this.Size = new System.Drawing.Size(506, 242);
|
||||
this.Load += new System.EventHandler(this.MainPage_Load);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -39,6 +39,18 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
|
||||
base.PageEnter += new PageChangeHandler(MainPage_PageEnter);
|
||||
base.PageLeave += new PageChangeHandler(MainPage_PageLeave);
|
||||
base.PageDisplay += new PageChangeHandler(MainPage_PageDisplay);
|
||||
}
|
||||
|
||||
void MainPage_PageDisplay(object sender, PageChangedArgs args)
|
||||
{
|
||||
//Skip this, as there is only one valid option
|
||||
if (Program.DataConnection.GetObjects<Datamodel.Schedule>().Length == 0)
|
||||
{
|
||||
CreateNew.Checked = true;
|
||||
try { m_owner.NextButton.PerformClick(); }
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
void MainPage_PageEnter(object sender, PageChangedArgs args)
|
||||
@@ -114,16 +126,43 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
{
|
||||
m_settings.Clear();
|
||||
|
||||
//TODO: These settings should be read from a file,
|
||||
//so they are customizable by the end user
|
||||
m_wrapper.FullBackupInterval = "1M";
|
||||
m_wrapper.MaxFullBackups = 4;
|
||||
m_wrapper.BackupExpireInterval = "";
|
||||
m_wrapper.RepeatInterval = "1D";
|
||||
m_wrapper.VolumeSize = "5MB";
|
||||
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
|
||||
doc.Load(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(typeof(Program), "Backup defaults.xml"));
|
||||
|
||||
//Run each day at 13:00 (1 pm)
|
||||
m_wrapper.BackupTimeOffset = DateTime.Now.Date.AddHours(13);
|
||||
System.Xml.XmlNode root = doc.SelectSingleNode("settings");
|
||||
|
||||
List<System.Xml.XmlNode> nodes = new List<System.Xml.XmlNode>();
|
||||
|
||||
if (root != null)
|
||||
foreach(System.Xml.XmlNode n in root.ChildNodes)
|
||||
nodes.Add(n);
|
||||
|
||||
//Load user supplied settings
|
||||
string filename = System.IO.Path.Combine(Application.StartupPath, "Backup defaults.xml");
|
||||
if (System.IO.File.Exists(filename))
|
||||
{
|
||||
doc.Load(filename);
|
||||
root = doc.SelectSingleNode("settings");
|
||||
if (root != null)
|
||||
foreach (System.Xml.XmlNode n in root.ChildNodes)
|
||||
nodes.Add(n);
|
||||
}
|
||||
|
||||
foreach(System.Xml.XmlNode n in nodes)
|
||||
if (n.NodeType == System.Xml.XmlNodeType.Element)
|
||||
{
|
||||
System.Reflection.PropertyInfo pi = m_wrapper.GetType().GetProperty(n.Name);
|
||||
if (pi != null && pi.CanWrite)
|
||||
if (pi.PropertyType == typeof(DateTime))
|
||||
pi.SetValue(m_wrapper,Library.Core.Timeparser.ParseTimeInterval(n.InnerText, DateTime.Now.Date), null);
|
||||
else
|
||||
pi.SetValue(m_wrapper, Convert.ChangeType(n.InnerText, pi.PropertyType), null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void MainPage_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -39,6 +39,12 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
InitializeComponent();
|
||||
base.PageEnter += new PageChangeHandler(SelectBackend_PageEnter);
|
||||
base.PageLeave += new PageChangeHandler(SelectBackend_PageLeave);
|
||||
base.PageDisplay += new PageChangeHandler(SelectBackend_PageDisplay);
|
||||
}
|
||||
|
||||
void SelectBackend_PageDisplay(object sender, PageChangedArgs args)
|
||||
{
|
||||
Item_CheckChanged(null, null);
|
||||
}
|
||||
|
||||
void SelectBackend_PageLeave(object sender, PageChangedArgs args)
|
||||
|
||||
@@ -49,21 +49,21 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
this.ScheduleID = schedule.ID;
|
||||
this.ScheduleName = schedule.Name;
|
||||
this.SchedulePath = schedule.Path;
|
||||
this.SourcePath = schedule.Tasks[0].SourcePath;
|
||||
this.SourceFilter = schedule.Tasks[0].EncodedFilter;
|
||||
this.BackupPassword = schedule.Tasks[0].Encryptionkey;
|
||||
this.SourcePath = schedule.Task.SourcePath;
|
||||
this.EncodedFilters = schedule.Task.EncodedFilter;
|
||||
this.BackupPassword = schedule.Task.Encryptionkey;
|
||||
|
||||
switch (schedule.Tasks[0].Service.ToLower())
|
||||
switch (schedule.Task.Service.ToLower())
|
||||
{
|
||||
case "file":
|
||||
Datamodel.Backends.File file = new Datamodel.Backends.File(schedule.Tasks[0]);
|
||||
Datamodel.Backends.File file = new Datamodel.Backends.File(schedule.Task);
|
||||
this.FileSettings.Username = file.Username;
|
||||
this.FileSettings.Password = file.Password;
|
||||
this.FileSettings.Path = file.DestinationFolder;
|
||||
this.Backend = BackendType.File;
|
||||
break;
|
||||
case "ftp":
|
||||
Datamodel.Backends.FTP ftp = new Duplicati.Datamodel.Backends.FTP(schedule.Tasks[0]);
|
||||
Datamodel.Backends.FTP ftp = new Duplicati.Datamodel.Backends.FTP(schedule.Task);
|
||||
this.FTPSettings.Username = ftp.Username;
|
||||
this.FTPSettings.Password = ftp.Password;
|
||||
this.FTPSettings.Path = ftp.Folder;
|
||||
@@ -72,7 +72,7 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
this.Backend = BackendType.FTP;
|
||||
break;
|
||||
case "ssh":
|
||||
Datamodel.Backends.SSH ssh = new Duplicati.Datamodel.Backends.SSH(schedule.Tasks[0]);
|
||||
Datamodel.Backends.SSH ssh = new Duplicati.Datamodel.Backends.SSH(schedule.Task);
|
||||
this.SSHSettings.Username = ssh.Username;
|
||||
this.SSHSettings.Password = ssh.Password;
|
||||
this.SSHSettings.Path = ssh.Folder;
|
||||
@@ -82,7 +82,7 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
this.Backend = BackendType.SSH;
|
||||
break;
|
||||
case "s3":
|
||||
Datamodel.Backends.S3 s3 = new Duplicati.Datamodel.Backends.S3(schedule.Tasks[0]);
|
||||
Datamodel.Backends.S3 s3 = new Duplicati.Datamodel.Backends.S3(schedule.Task);
|
||||
this.S3Settings.Username = s3.AccessID;
|
||||
this.S3Settings.Password = s3.AccessKey;
|
||||
this.S3Settings.UseEuroServer = s3.UseEuroBucket;
|
||||
@@ -99,16 +99,16 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
|
||||
this.BackupTimeOffset = schedule.When;
|
||||
this.RepeatInterval = schedule.Repeat;
|
||||
this.FullBackupInterval = schedule.FullAfter;
|
||||
this.MaxFullBackups = (int)schedule.KeepFull;
|
||||
this.BackupExpireInterval = schedule.KeepTime;
|
||||
this.UploadSpeedLimit = schedule.UploadBandwidth;
|
||||
this.DownloadSpeedLimit = schedule.DownloadBandwidth;
|
||||
this.BackupSizeLimit = schedule.MaxUploadsize;
|
||||
this.VolumeSize = schedule.VolumeSize;
|
||||
//this.ThreadPriority = schedule.ThreadPriority;
|
||||
//this.AsyncTransfer = schedule.AsyncTransfer;
|
||||
this.EncodedFilters = schedule.Tasks[0].EncodedFilter;
|
||||
this.FullBackupInterval = schedule.Task.FullAfter;
|
||||
this.MaxFullBackups = (int)schedule.Task.KeepFull;
|
||||
this.BackupExpireInterval = schedule.Task.KeepTime;
|
||||
this.UploadSpeedLimit = schedule.Task.UploadBandwidth;
|
||||
this.DownloadSpeedLimit = schedule.Task.DownloadBandwidth;
|
||||
this.BackupSizeLimit = schedule.Task.MaxUploadsize;
|
||||
this.VolumeSize = schedule.Task.VolumeSize;
|
||||
this.ThreadPriority = schedule.Task.ThreadPriority;
|
||||
this.AsyncTransfer = schedule.Task.AsyncTransfer;
|
||||
this.EncodedFilters = schedule.Task.EncodedFilter;
|
||||
|
||||
this.PrimayAction = action;
|
||||
}
|
||||
@@ -122,37 +122,41 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
{
|
||||
schedule.Name = this.ScheduleName;
|
||||
schedule.Path = this.SchedulePath;
|
||||
schedule.Tasks[0].SourcePath = this.SourcePath;
|
||||
schedule.Tasks[0].EncodedFilter = this.SourceFilter;
|
||||
schedule.Tasks[0].Encryptionkey = this.BackupPassword;
|
||||
schedule.Task = schedule.DataParent.Add<Datamodel.Task>();
|
||||
schedule.Task.SourcePath = this.SourcePath;
|
||||
schedule.Task.EncodedFilter = this.EncodedFilters;
|
||||
schedule.Task.Encryptionkey = this.BackupPassword;
|
||||
|
||||
switch (this.Backend)
|
||||
{
|
||||
case BackendType.File:
|
||||
Datamodel.Backends.File file = new Datamodel.Backends.File(schedule.Tasks[0]);
|
||||
Datamodel.Backends.File file = new Datamodel.Backends.File(schedule.Task);
|
||||
file.Username = this.FileSettings.Username;
|
||||
file.Password = this.FileSettings.Password;
|
||||
file.DestinationFolder = this.FileSettings.Path;
|
||||
file.SetService();
|
||||
break;
|
||||
case BackendType.FTP:
|
||||
Datamodel.Backends.FTP ftp = new Duplicati.Datamodel.Backends.FTP(schedule.Tasks[0]);
|
||||
Datamodel.Backends.FTP ftp = new Duplicati.Datamodel.Backends.FTP(schedule.Task);
|
||||
ftp.Username = this.FTPSettings.Username;
|
||||
ftp.Password = this.FTPSettings.Password;
|
||||
ftp.Folder = this.FTPSettings.Path;
|
||||
ftp.Host = this.FTPSettings.Server;
|
||||
ftp.Port = this.FTPSettings.Port;
|
||||
ftp.SetService();
|
||||
break;
|
||||
case BackendType.SSH:
|
||||
Datamodel.Backends.SSH ssh = new Duplicati.Datamodel.Backends.SSH(schedule.Tasks[0]);
|
||||
Datamodel.Backends.SSH ssh = new Duplicati.Datamodel.Backends.SSH(schedule.Task);
|
||||
ssh.Username = this.SSHSettings.Username;
|
||||
ssh.Password = this.SSHSettings.Password;
|
||||
ssh.Folder = this.SSHSettings.Path;
|
||||
ssh.Host = this.SSHSettings.Server;
|
||||
ssh.Port = this.SSHSettings.Port;
|
||||
ssh.Passwordless = this.SSHSettings.Passwordless;
|
||||
ssh.SetService();
|
||||
break;
|
||||
case BackendType.S3:
|
||||
Datamodel.Backends.S3 s3 = new Duplicati.Datamodel.Backends.S3(schedule.Tasks[0]);
|
||||
Datamodel.Backends.S3 s3 = new Duplicati.Datamodel.Backends.S3(schedule.Task);
|
||||
s3.AccessID = this.S3Settings.Username;
|
||||
s3.AccessKey = this.S3Settings.Password;
|
||||
s3.UseEuroBucket = this.S3Settings.UseEuroServer;
|
||||
@@ -168,6 +172,7 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
s3.BucketName = this.S3Settings.Path;
|
||||
s3.Prefix = "";
|
||||
}
|
||||
s3.SetService();
|
||||
break;
|
||||
case BackendType.WebDav:
|
||||
break;
|
||||
@@ -175,18 +180,18 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
|
||||
schedule.When = this.BackupTimeOffset;
|
||||
schedule.Repeat = this.RepeatInterval;
|
||||
schedule.FullAfter = this.FullBackupInterval;
|
||||
schedule.KeepFull = this.MaxFullBackups;
|
||||
schedule.Task.FullAfter = this.FullBackupInterval;
|
||||
schedule.Task.KeepFull = this.MaxFullBackups;
|
||||
|
||||
schedule.KeepTime = this.BackupExpireInterval;
|
||||
schedule.UploadBandwidth = this.UploadSpeedLimit;
|
||||
schedule.DownloadBandwidth = this.DownloadSpeedLimit;
|
||||
schedule.MaxUploadsize = this.BackupSizeLimit;
|
||||
schedule.Task.KeepTime = this.BackupExpireInterval;
|
||||
schedule.Task.UploadBandwidth = this.UploadSpeedLimit;
|
||||
schedule.Task.DownloadBandwidth = this.DownloadSpeedLimit;
|
||||
schedule.Task.MaxUploadsize = this.BackupSizeLimit;
|
||||
|
||||
schedule.VolumeSize = this.VolumeSize;
|
||||
//schedule.ThreadPriority = this.ThreadPriority;
|
||||
//schedule.AsyncTransfer = this.AsyncTransfer;
|
||||
schedule.Tasks[0].EncodedFilter = this.EncodedFilters;
|
||||
schedule.Task.VolumeSize = this.VolumeSize;
|
||||
schedule.Task.ThreadPriority = this.ThreadPriority;
|
||||
schedule.Task.AsyncTransfer = this.AsyncTransfer;
|
||||
schedule.Task.EncodedFilter = this.EncodedFilters;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -251,15 +256,6 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
set { SetItem("SourcePath", value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The encoded filter string
|
||||
/// </summary>
|
||||
public string SourceFilter
|
||||
{
|
||||
get { return GetItem<string>("SourceFilter", ""); }
|
||||
set { SetItem("SourceFilter", value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The password that protects the backup
|
||||
/// </summary>
|
||||
@@ -399,7 +395,7 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The size of each volume in the backup set
|
||||
/// The filter applied to files being backed up
|
||||
/// </summary>
|
||||
public string EncodedFilters
|
||||
{
|
||||
|
||||
@@ -96,8 +96,16 @@ namespace Duplicati.GUI
|
||||
else if (m_form.CurrentPage is Wizard_pages.Delete_backup.DeleteFinished)
|
||||
{
|
||||
Schedule schedule = Program.DataConnection.GetObjectById<Schedule>(wrapper.ScheduleID);
|
||||
Program.DataConnection.DeleteObject(schedule);
|
||||
Program.DataConnection.Commit(schedule);
|
||||
List<IDataClass> items = new List<IDataClass>();
|
||||
items.Add(schedule);
|
||||
items.Add(schedule.Task);
|
||||
foreach(TaskSetting ts in schedule.Task.TaskSettings)
|
||||
items.Add(ts);
|
||||
foreach (TaskFilter tf in schedule.Task.Filters)
|
||||
items.Add(tf);
|
||||
foreach(IDataClass o in items)
|
||||
Program.DataConnection.DeleteObject(o);
|
||||
Program.DataConnection.Commit(items.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +201,10 @@ namespace Duplicati.Library.Core
|
||||
return false;
|
||||
|
||||
bool include = true;
|
||||
string relpath = filename.Substring(basepath.Length);
|
||||
//All paths start with a slash, because this eases filter creation
|
||||
//Eg. filter "\Dir\" would only match folders with the name "Dir", where "Dir\" would also match "\MyDir\"
|
||||
//If the leading slash/backslash is missing, it becomes difficult to prevent partial matches.
|
||||
string relpath = filename.Substring(basepath.Length - 1);
|
||||
foreach (KeyValuePair<bool, Regex> filter in m_filters)
|
||||
if (filter.Key != include)
|
||||
if (filter.Value.Match(relpath).Success)
|
||||
|
||||
@@ -335,5 +335,36 @@ namespace Duplicati.Library.Core
|
||||
else
|
||||
return string.Format("{0} bytes", size);
|
||||
}
|
||||
|
||||
public static System.Threading.ThreadPriority ParsePriority(string value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value) || value.Trim().Length == 0)
|
||||
return System.Threading.ThreadPriority.Normal;
|
||||
|
||||
switch (value.ToLower().Trim())
|
||||
{
|
||||
case "+2":
|
||||
case "high":
|
||||
case "highest":
|
||||
return System.Threading.ThreadPriority.Highest;
|
||||
case "+1":
|
||||
case "abovenormal":
|
||||
case "above normal":
|
||||
return System.Threading.ThreadPriority.AboveNormal;
|
||||
|
||||
case "-1":
|
||||
case "belownormal":
|
||||
case "below normal":
|
||||
return System.Threading.ThreadPriority.BelowNormal;
|
||||
case "-2":
|
||||
case "low":
|
||||
case "lowest":
|
||||
case "idle":
|
||||
return System.Threading.ThreadPriority.Lowest;
|
||||
|
||||
default:
|
||||
return System.Threading.ThreadPriority.Normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace Duplicati.Library.Main
|
||||
private long m_sizeOfAddedFiles;
|
||||
private long m_sizeOfExaminedFiles;
|
||||
private long m_unprocessedFiles;
|
||||
private long m_addedFolders;
|
||||
|
||||
public BackupStatistics()
|
||||
{
|
||||
@@ -94,6 +95,12 @@ namespace Duplicati.Library.Main
|
||||
set { m_unprocessedFiles = value; }
|
||||
}
|
||||
|
||||
public long AddedFolders
|
||||
{
|
||||
get { return m_addedFolders; }
|
||||
set { m_addedFolders = value; }
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
@@ -105,6 +112,7 @@ namespace Duplicati.Library.Main
|
||||
sb.Append("DeletedFolders : " + this.DeletedFolders.ToString(System.Globalization.CultureInfo.InvariantCulture) + "\r\n");
|
||||
sb.Append("ModifiedFiles : " + this.ModifiedFiles.ToString(System.Globalization.CultureInfo.InvariantCulture) + "\r\n");
|
||||
sb.Append("AddedFiles : " + this.ModifiedFiles.ToString(System.Globalization.CultureInfo.InvariantCulture) + "\r\n");
|
||||
sb.Append("AddedFolders : " + this.AddedFolders.ToString(System.Globalization.CultureInfo.InvariantCulture) + "\r\n");
|
||||
sb.Append("ExaminedFiles : " + this.ExaminedFiles.ToString(System.Globalization.CultureInfo.InvariantCulture) + "\r\n");
|
||||
sb.Append("SizeOfModified : " + this.SizeOfModifiedFiles.ToString(System.Globalization.CultureInfo.InvariantCulture) + "\r\n");
|
||||
sb.Append("SizeOfAdded : " + this.SizeOfAddedFiles.ToString(System.Globalization.CultureInfo.InvariantCulture) + "\r\n");
|
||||
|
||||
@@ -266,6 +266,7 @@ namespace Duplicati.Library.Main.RSync
|
||||
bs.SizeOfAddedFiles = m_addedfilessize;
|
||||
bs.SizeOfExaminedFiles = m_examinedfilesize;
|
||||
bs.UnprocessedFiles = m_unproccesed.Count;
|
||||
bs.AddedFolders = m_newfolders.Count;
|
||||
}
|
||||
|
||||
m_finalized = true;
|
||||
|
||||
Generated
+1
@@ -144,6 +144,7 @@ namespace System.Windows.Forms.Wizard
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "Dialog";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Dialog";
|
||||
this.Load += new System.EventHandler(this.Dialog_Load);
|
||||
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Dialog_KeyUp);
|
||||
|
||||
@@ -130,8 +130,6 @@ namespace System.Windows.Forms.Wizard
|
||||
PageChangedArgs args = new PageChangedArgs(this, this.Pages.IndexOf(page) == this.Pages.Count - 1, PageChangedDirection.Next);
|
||||
|
||||
page.Enter(this, args);
|
||||
if (page.Control as IControl != null)
|
||||
(page.Control as IControl).Displayed(this);
|
||||
|
||||
InfoPanel.Visible = !page.FullSize;
|
||||
TitleLabel.Text = page.Title;
|
||||
@@ -142,7 +140,14 @@ namespace System.Windows.Forms.Wizard
|
||||
page.Control.Dock = DockStyle.Fill;
|
||||
m_isLastPage = args.TreatAsLast;
|
||||
|
||||
//Not sure this works under Mono...
|
||||
try { this.Icon = System.Drawing.Icon.FromHandle(new System.Drawing.Bitmap(PageIcon.Image).GetHicon()); }
|
||||
catch { }
|
||||
|
||||
UpdateButtons();
|
||||
|
||||
page.Display(this, args);
|
||||
|
||||
}
|
||||
|
||||
private void BackBtn_Click(object sender, EventArgs e)
|
||||
@@ -206,8 +211,9 @@ namespace System.Windows.Forms.Wizard
|
||||
if (CurrentPage != null)
|
||||
m_visited.Push(CurrentPage);
|
||||
m_isLastPage = args.TreatAsLast;
|
||||
CurrentPage = args.NextPage;
|
||||
UpdateButtons();
|
||||
|
||||
CurrentPage = args.NextPage;
|
||||
}
|
||||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#region Disclaimer / License
|
||||
// Copyright (C) 2008, Kenneth Skovhede
|
||||
// http://www.hexad.dk, opensource@hexad.dk
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
//
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Windows.Forms.Wizard
|
||||
{
|
||||
public interface IControl
|
||||
{
|
||||
void Displayed(IWizardForm owner);
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,23 @@ namespace System.Windows.Forms.Wizard
|
||||
string HelpText { get; }
|
||||
Image Image { get; }
|
||||
bool FullSize { get; }
|
||||
/// <summary>
|
||||
/// Called when the page is entering
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner wizard form</param>
|
||||
/// <param name="args">State information</param>
|
||||
void Enter(IWizardForm owner, PageChangedArgs args);
|
||||
/// <summary>
|
||||
/// Called when the page has loaded and is being displayed
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner wizard form</param>
|
||||
/// <param name="args">State information</param>
|
||||
void Display(IWizardForm owner, PageChangedArgs args);
|
||||
/// <summary>
|
||||
/// Called when the page is leaving
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner wizard form</param>
|
||||
/// <param name="args">State information</param>
|
||||
void Leave(IWizardForm owner, PageChangedArgs args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,13 +70,15 @@ namespace System.Windows.Forms.Wizard
|
||||
|
||||
void IWizardControl.Enter(IWizardForm owner, PageChangedArgs args)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void IWizardControl.Leave(IWizardForm owner, PageChangedArgs args)
|
||||
{
|
||||
}
|
||||
|
||||
void IWizardControl.Display(IWizardForm owner, PageChangedArgs args)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace System.Windows.Forms.Wizard
|
||||
|
||||
protected event PageChangeHandler PageEnter;
|
||||
protected event PageChangeHandler PageLeave;
|
||||
protected event PageChangeHandler PageDisplay;
|
||||
|
||||
//Windows forms designer support
|
||||
private WizardControl()
|
||||
@@ -90,6 +91,12 @@ namespace System.Windows.Forms.Wizard
|
||||
get { return m_fullSize; }
|
||||
}
|
||||
|
||||
void IWizardControl.Display(IWizardForm owner, PageChangedArgs args)
|
||||
{
|
||||
if (PageDisplay != null)
|
||||
PageDisplay(owner, args);
|
||||
}
|
||||
|
||||
void IWizardControl.Enter(IWizardForm owner, PageChangedArgs args)
|
||||
{
|
||||
m_owner = args.Owner;
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
<Compile Include="Dialog.Designer.cs">
|
||||
<DependentUpon>Dialog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="IControl.cs" />
|
||||
<Compile Include="IWizardControl.cs" />
|
||||
<Compile Include="IWizardForm.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
Reference in New Issue
Block a user