diff --git a/Duplicati/GUI/Backup defaults.xml b/Duplicati/GUI/Backup defaults.xml
new file mode 100644
index 000000000..8a3103b60
--- /dev/null
+++ b/Duplicati/GUI/Backup defaults.xml
@@ -0,0 +1,9 @@
+
+
+ 1M
+ 4
+
+ 1D
+ 5MB
+ 13h
+
diff --git a/Duplicati/GUI/Database schema/1.Throttle options.sql b/Duplicati/GUI/Database schema/1.Throttle options.sql
deleted file mode 100644
index 8180e6f7f..000000000
--- a/Duplicati/GUI/Database schema/1.Throttle options.sql
+++ /dev/null
@@ -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;
diff --git a/Duplicati/GUI/Database schema/2.Filter support.sql b/Duplicati/GUI/Database schema/2.Filter support.sql
deleted file mode 100644
index c5afc5faf..000000000
--- a/Duplicati/GUI/Database schema/2.Filter support.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-CREATE TABLE "TaskFilter" (
- "ID" INTEGER PRIMARY KEY,
- "SortOrder" INTEGER NULL,
- "Include" BOOLEAN NULL,
- "Filter" TEXT NULL,
- "TaskID" INTEGER NULL
-);
diff --git a/Duplicati/GUI/Database schema/Schema.sql b/Duplicati/GUI/Database schema/Schema.sql
index a4f63567d..c1a7eb5ed 100644
--- a/Duplicati/GUI/Database schema/Schema.sql
+++ b/Duplicati/GUI/Database schema/Schema.sql
@@ -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);
\ No newline at end of file
+INSERT INTO "Version" ("Version") VALUES (0);
\ No newline at end of file
diff --git a/Duplicati/GUI/Datamodel/Datamodel.csproj b/Duplicati/GUI/Datamodel/Datamodel.csproj
index ef3656f1d..03000d2c9 100644
--- a/Duplicati/GUI/Datamodel/Datamodel.csproj
+++ b/Duplicati/GUI/Datamodel/Datamodel.csproj
@@ -1,119 +1 @@
-
-
-
- Local
- 8.0.50727
- 2.0
- {B60D0993-B0C5-457A-90D9-DB6EEB33CE47}
- Debug
- AnyCPU
-
-
- Datamodel
- LightDatamodel.snk
- JScript
- Grid
- IE50
- false
- Library
- Duplicati.Datamodel
- OnBuildSuccess
-
-
-
- true
-
-
- bin\Debug\
- false
- 285212672
- false
-
-
- DEBUG;TRACE
-
-
- true
- 4096
- false
-
-
- false
- false
- false
- false
- 4
- full
- prompt
-
-
- bin\Release\
- false
- 285212672
- false
-
-
- TRACE
-
-
- false
- 4096
- false
-
-
- true
- false
- false
- false
- 4
- none
- prompt
-
-
-
- System
-
-
- System.Data
-
-
- System.XML
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {CAE8433B-F013-474E-B7FC-4DE0D5933AD1}
- LightDatamodel
-
-
- {DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}
- Duplicati.Library.Core
-
-
-
-
\ No newline at end of file
+Local8.0.507272.0{B60D0993-B0C5-457A-90D9-DB6EEB33CE47}DebugAnyCPUDatamodelLightDatamodel.snkJScriptGridIE50falseLibraryDuplicati.DatamodelOnBuildSuccesstruebin\Debug\false285212672falseDEBUG;TRACEtrue4096falsefalsefalsefalsefalse4fullpromptbin\Release\false285212672falseTRACEfalse4096falsetruefalsefalsefalse4nonepromptSystemSystem.DataSystem.XML{CAE8433B-F013-474E-B7FC-4DE0D5933AD1}LightDatamodel{DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65}Duplicati.Library.Core
\ No newline at end of file
diff --git a/Duplicati/GUI/Datamodel/Duplicati.csproj b/Duplicati/GUI/Datamodel/Duplicati.csproj
index d74548b29..6213bd9a7 100644
--- a/Duplicati/GUI/Datamodel/Duplicati.csproj
+++ b/Duplicati/GUI/Datamodel/Duplicati.csproj
@@ -1 +1 @@
-Local8.0.507272.0{ed5d597c-99b5-4aeb-bfeb-ba6d13b3e349}DebugAnyCPUDuplicatiLightDatamodel.snkJScriptGridIE50falseLibraryDatamodel.DuplicatiOnBuildSuccesstruebin\Debug\false285212672falseDEBUG;TRACEtrue4096falsefalsefalsefalsefalse4fullpromptbin\Release\false285212672falseTRACEfalse4096falsetruefalsefalsefalse4nonepromptSystemSystem.DataSystem.XMLLightDatamodel.\LightDatamodel.dll
\ No newline at end of file
+Local8.0.507272.0{ed5d597c-99b5-4aeb-bfeb-ba6d13b3e349}DebugAnyCPUDuplicatiLightDatamodel.snkJScriptGridIE50falseLibraryDatamodel.DuplicatiOnBuildSuccesstruebin\Debug\false285212672falseDEBUG;TRACEtrue4096falsefalsefalsefalsefalse4fullpromptbin\Release\false285212672falseTRACEfalse4096falsetruefalsefalsefalse4nonepromptSystemSystem.DataSystem.XMLLightDatamodel.\LightDatamodel.dll
\ No newline at end of file
diff --git a/Duplicati/GUI/Datamodel/Duplicati.sqlite b/Duplicati/GUI/Datamodel/Duplicati.sqlite
index 4454ec0ed..ac76670df 100644
Binary files a/Duplicati/GUI/Datamodel/Duplicati.sqlite and b/Duplicati/GUI/Datamodel/Duplicati.sqlite differ
diff --git a/Duplicati/GUI/Datamodel/LightDataModel.Mapping.xml b/Duplicati/GUI/Datamodel/LightDataModel.Mapping.xml
index 85f884fb6..38bee9490 100644
--- a/Duplicati/GUI/Datamodel/LightDataModel.Mapping.xml
+++ b/Duplicati/GUI/Datamodel/LightDataModel.Mapping.xml
@@ -72,6 +72,105 @@
false
false
+
+ System.Int64
+ KeepFull
+ KeepFull
+ false
+ false
+ false
+ false
+ false
+ false
+
+
+ System.String
+ KeepTime
+ KeepTime
+ false
+ false
+ false
+ false
+ false
+ false
+
+
+ System.String
+ MaxUploadsize
+ MaxUploadsize
+ false
+ false
+ false
+ false
+ false
+ false
+
+
+ System.String
+ UploadBandwidth
+ UploadBandwidth
+ false
+ false
+ false
+ false
+ false
+ false
+
+
+ System.String
+ DownloadBandwidth
+ DownloadBandwidth
+ false
+ false
+ false
+ false
+ false
+ false
+
+
+ System.String
+ VolumeSize
+ VolumeSize
+ false
+ false
+ false
+ false
+ false
+ false
+
+
+ System.String
+ FullAfter
+ FullAfter
+ false
+ false
+ false
+ false
+ false
+ false
+
+
+ System.String
+ ThreadPriority
+ ThreadPriority
+ false
+ false
+ false
+ false
+ false
+ false
+
+
+ System.Boolean
+ AsyncTransfer
+ AsyncTransfer
+ false
+ false
+ false
+ false
+ false
+ false
+
false
@@ -79,10 +178,10 @@
TaskSchedule
ScheduleID
Schedule
- OneToMany
+ OneToOne
Schedule
ID
- Tasks
+ Task
Task
@@ -158,86 +257,6 @@
false
false
-
- System.Int64
- KeepFull
- KeepFull
- false
- false
- false
- false
- false
- false
-
-
- System.String
- KeepTime
- KeepTime
- false
- false
- false
- false
- false
- false
-
-
- System.String
- FullAfter
- FullAfter
- false
- false
- false
- false
- false
- false
-
-
- System.String
- DownloadBandwidth
- DownloadBandwidth
- false
- false
-
- false
- false
- false
- false
-
-
- System.String
- UploadBandwidth
- UploadBandwidth
- false
- false
-
- false
- false
- false
- false
-
-
- System.String
- VolumeSize
- VolumeSize
- false
- false
-
- false
- false
- false
- false
-
-
- System.String
- MaxUploadsize
- MaxUploadsize
- false
- false
- false
- false
- false
- false
-
false
diff --git a/Duplicati/GUI/Datamodel/Schedule.Extension.cs b/Duplicati/GUI/Datamodel/Schedule.Extension.cs
index 99c4a70fa..93a0bcb1d 100644
--- a/Duplicati/GUI/Datamodel/Schedule.Extension.cs
+++ b/Duplicati/GUI/Datamodel/Schedule.Extension.cs
@@ -13,14 +13,6 @@ namespace Duplicati.Datamodel
public void GetOptions(Dictionary 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;
}
}
}
diff --git a/Duplicati/GUI/Datamodel/Schedule.cs b/Duplicati/GUI/Datamodel/Schedule.cs
index fe24f719b..46243ba7b 100644
--- a/Duplicati/GUI/Datamodel/Schedule.cs
+++ b/Duplicati/GUI/Datamodel/Schedule.cs
@@ -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 Tasks
+ public Task Task
{
- get
- {
- return ((DataFetcherWithRelations)m_dataparent).GetRelatedObjects("TaskSchedule", this);
- }
+ get{ return ((DataFetcherWithRelations)m_dataparent).GetRelatedObject("TaskSchedule", this); }
+ set{ ((DataFetcherWithRelations)m_dataparent).SetRelatedObject("TaskSchedule", this, value); }
}
#endregion
diff --git a/Duplicati/GUI/Datamodel/Task.Extension.cs b/Duplicati/GUI/Datamodel/Task.Extension.cs
index d06133399..9231c640b 100644
--- a/Duplicati/GUI/Datamodel/Task.Extension.cs
+++ b/Duplicati/GUI/Datamodel/Task.Extension.cs
@@ -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();
tf.Filter = f.Value;
tf.Include = f.Key;
+ filters.Add(tf);
}
this.SortedFilters = filters.ToArray();
diff --git a/Duplicati/GUI/Datamodel/Task.cs b/Duplicati/GUI/Datamodel/Task.cs
index 1cebdd533..82e81b45e 100644
--- a/Duplicati/GUI/Datamodel/Task.cs
+++ b/Duplicati/GUI/Datamodel/Task.cs
@@ -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 "
diff --git a/Duplicati/GUI/Duplicati.csproj b/Duplicati/GUI/Duplicati.csproj
index 19c2f0fe0..1c798def6 100644
--- a/Duplicati/GUI/Duplicati.csproj
+++ b/Duplicati/GUI/Duplicati.csproj
@@ -508,9 +508,8 @@
Designer
SelectBackup.cs
-
-
-
+
+
diff --git a/Duplicati/GUI/DuplicatiRunner.cs b/Duplicati/GUI/DuplicatiRunner.cs
index e93f410a0..a75f88902 100644
--- a/Duplicati/GUI/DuplicatiRunner.cs
+++ b/Duplicati/GUI/DuplicatiRunner.cs
@@ -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));
}
}
diff --git a/Duplicati/GUI/HelperControls/BackupTreeView.cs b/Duplicati/GUI/HelperControls/BackupTreeView.cs
index 0a3ba0b56..2d05c1649 100644
--- a/Duplicati/GUI/HelperControls/BackupTreeView.cs
+++ b/Duplicati/GUI/HelperControls/BackupTreeView.cs
@@ -188,8 +188,8 @@ namespace Duplicati.GUI.HelperControls
Schedule s;
lock(Program.MainLock)
s = m_connection.Add();
- 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";
diff --git a/Duplicati/GUI/Program.cs b/Duplicati/GUI/Program.cs
index 3a1b6e936..0c9905ac7 100644
--- a/Duplicati/GUI/Program.cs
+++ b/Duplicati/GUI/Program.cs
@@ -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();
}
diff --git a/Duplicati/GUI/Service controls/ScheduleSettings.cs b/Duplicati/GUI/Service controls/ScheduleSettings.cs
index c492d3b0f..c21908ebe 100644
--- a/Duplicati/GUI/Service controls/ScheduleSettings.cs
+++ b/Duplicati/GUI/Service controls/ScheduleSettings.cs
@@ -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)
diff --git a/Duplicati/GUI/Service controls/TaskSettingsBase.cs b/Duplicati/GUI/Service controls/TaskSettingsBase.cs
index 220b96bc7..fc46f9897 100644
--- a/Duplicati/GUI/Service controls/TaskSettingsBase.cs
+++ b/Duplicati/GUI/Service controls/TaskSettingsBase.cs
@@ -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();
- 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)
{
diff --git a/Duplicati/GUI/TaskPackages.cs b/Duplicati/GUI/TaskPackages.cs
index d06933b4e..9217a6287 100644
--- a/Duplicati/GUI/TaskPackages.cs
+++ b/Duplicati/GUI/TaskPackages.cs
@@ -60,7 +60,7 @@ namespace Duplicati.GUI
public abstract DuplicityTaskType TaskType { get; }
public abstract void GetArguments(List 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)
diff --git a/Duplicati/GUI/Wizard pages/Add backup/EditFilters.cs b/Duplicati/GUI/Wizard pages/Add backup/EditFilters.cs
index fbe27e8de..8261a7194 100644
--- a/Duplicati/GUI/Wizard pages/Add backup/EditFilters.cs
+++ b/Duplicati/GUI/Wizard pages/Add backup/EditFilters.cs
@@ -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;
}
}
}
diff --git a/Duplicati/GUI/Wizard pages/Add backup/IncrementalSettings.Designer.cs b/Duplicati/GUI/Wizard pages/Add backup/IncrementalSettings.Designer.cs
index 74abc52fb..0dad78df8 100644
--- a/Duplicati/GUI/Wizard pages/Add backup/IncrementalSettings.Designer.cs
+++ b/Duplicati/GUI/Wizard pages/Add backup/IncrementalSettings.Designer.cs
@@ -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);
diff --git a/Duplicati/GUI/Wizard pages/Add backup/IncrementalSettings.cs b/Duplicati/GUI/Wizard pages/Add backup/IncrementalSettings.cs
index 00bcd101b..ab98b1e85 100644
--- a/Duplicati/GUI/Wizard pages/Add backup/IncrementalSettings.cs
+++ b/Duplicati/GUI/Wizard pages/Add backup/IncrementalSettings.cs
@@ -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"))
diff --git a/Duplicati/GUI/Wizard pages/Add backup/PasswordSettings.cs b/Duplicati/GUI/Wizard pages/Add backup/PasswordSettings.cs
index 8c084c0f1..2823f02da 100644
--- a/Duplicati/GUI/Wizard pages/Add backup/PasswordSettings.cs
+++ b/Duplicati/GUI/Wizard pages/Add backup/PasswordSettings.cs
@@ -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;
}
diff --git a/Duplicati/GUI/Wizard pages/Add backup/SelectFiles.cs b/Duplicati/GUI/Wizard pages/Add backup/SelectFiles.cs
index e8e0e5c12..70797a7b5 100644
--- a/Duplicati/GUI/Wizard pages/Add backup/SelectFiles.cs
+++ b/Duplicati/GUI/Wizard pages/Add backup/SelectFiles.cs
@@ -205,37 +205,49 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
if (!m_valuesAutoLoaded)
{
- List filters = new List();
- foreach (KeyValuePair 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 included = new List();
- 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 filters = new List();
+ foreach (KeyValuePair 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 included = new List();
+ 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)
diff --git a/Duplicati/GUI/Wizard pages/Add backup/SelectName.Designer.cs b/Duplicati/GUI/Wizard pages/Add backup/SelectName.Designer.cs
index 4213ea56a..c0de29c07 100644
--- a/Duplicati/GUI/Wizard pages/Add backup/SelectName.Designer.cs
+++ b/Duplicati/GUI/Wizard pages/Add backup/SelectName.Designer.cs
@@ -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();
diff --git a/Duplicati/GUI/Wizard pages/Add backup/SelectName.cs b/Duplicati/GUI/Wizard pages/Add backup/SelectName.cs
index d437994c1..e69f203dc 100644
--- a/Duplicati/GUI/Wizard pages/Add backup/SelectName.cs
+++ b/Duplicati/GUI/Wizard pages/Add backup/SelectName.cs
@@ -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().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 { }
+ }
+
}
}
diff --git a/Duplicati/GUI/Wizard pages/Add backup/ThrottleOptions.Designer.cs b/Duplicati/GUI/Wizard pages/Add backup/ThrottleOptions.Designer.cs
index 463f890cf..30ad04365 100644
--- a/Duplicati/GUI/Wizard pages/Add backup/ThrottleOptions.Designer.cs
+++ b/Duplicati/GUI/Wizard pages/Add backup/ThrottleOptions.Designer.cs
@@ -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;
diff --git a/Duplicati/GUI/Wizard pages/Add backup/ThrottleOptions.cs b/Duplicati/GUI/Wizard pages/Add backup/ThrottleOptions.cs
index 1bb885213..fe69fc2a7 100644
--- a/Duplicati/GUI/Wizard pages/Add backup/ThrottleOptions.cs
+++ b/Duplicati/GUI/Wizard pages/Add backup/ThrottleOptions.cs
@@ -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(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;
+ }
}
}
diff --git a/Duplicati/GUI/Wizard pages/Backends/File/FileOptions.cs b/Duplicati/GUI/Wizard pages/Backends/File/FileOptions.cs
index 3c68afb1b..d8c4cd7cc 100644
--- a/Duplicati/GUI/Wizard pages/Backends/File/FileOptions.cs
+++ b/Duplicati/GUI/Wizard pages/Backends/File/FileOptions.cs
@@ -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.")
{
diff --git a/Duplicati/GUI/Wizard pages/MainPage.Designer.cs b/Duplicati/GUI/Wizard pages/MainPage.Designer.cs
index f4ca7e1b2..f63fb878f 100644
--- a/Duplicati/GUI/Wizard pages/MainPage.Designer.cs
+++ b/Duplicati/GUI/Wizard pages/MainPage.Designer.cs
@@ -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);
diff --git a/Duplicati/GUI/Wizard pages/MainPage.cs b/Duplicati/GUI/Wizard pages/MainPage.cs
index 21a9bdf41..68369922b 100644
--- a/Duplicati/GUI/Wizard pages/MainPage.cs
+++ b/Duplicati/GUI/Wizard pages/MainPage.cs
@@ -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().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 nodes = new List();
+
+ 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)
+ {
}
}
diff --git a/Duplicati/GUI/Wizard pages/SelectBackend.cs b/Duplicati/GUI/Wizard pages/SelectBackend.cs
index a80fbac9b..37ab61ad3 100644
--- a/Duplicati/GUI/Wizard pages/SelectBackend.cs
+++ b/Duplicati/GUI/Wizard pages/SelectBackend.cs
@@ -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)
diff --git a/Duplicati/GUI/Wizard pages/WizardSettingsWrapper.cs b/Duplicati/GUI/Wizard pages/WizardSettingsWrapper.cs
index 2a30dd84a..736bfc8e7 100644
--- a/Duplicati/GUI/Wizard pages/WizardSettingsWrapper.cs
+++ b/Duplicati/GUI/Wizard pages/WizardSettingsWrapper.cs
@@ -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();
+ 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;
}
///
@@ -251,15 +256,6 @@ namespace Duplicati.GUI.Wizard_pages
set { SetItem("SourcePath", value); }
}
- ///
- /// The encoded filter string
- ///
- public string SourceFilter
- {
- get { return GetItem("SourceFilter", ""); }
- set { SetItem("SourceFilter", value); }
- }
-
///
/// The password that protects the backup
///
@@ -399,7 +395,7 @@ namespace Duplicati.GUI.Wizard_pages
}
///
- /// The size of each volume in the backup set
+ /// The filter applied to files being backed up
///
public string EncodedFilters
{
diff --git a/Duplicati/GUI/WizardHandler.cs b/Duplicati/GUI/WizardHandler.cs
index 6275f2ae0..665a95a3d 100644
--- a/Duplicati/GUI/WizardHandler.cs
+++ b/Duplicati/GUI/WizardHandler.cs
@@ -96,8 +96,16 @@ namespace Duplicati.GUI
else if (m_form.CurrentPage is Wizard_pages.Delete_backup.DeleteFinished)
{
Schedule schedule = Program.DataConnection.GetObjectById(wrapper.ScheduleID);
- Program.DataConnection.DeleteObject(schedule);
- Program.DataConnection.Commit(schedule);
+ List items = new List();
+ 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());
}
}
diff --git a/Duplicati/Library/Core/FilenameFilter.cs b/Duplicati/Library/Core/FilenameFilter.cs
index a7f3b20cd..72e36866f 100644
--- a/Duplicati/Library/Core/FilenameFilter.cs
+++ b/Duplicati/Library/Core/FilenameFilter.cs
@@ -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 filter in m_filters)
if (filter.Key != include)
if (filter.Value.Match(relpath).Success)
diff --git a/Duplicati/Library/Core/Utility.cs b/Duplicati/Library/Core/Utility.cs
index dedabf1e7..637ef7674 100644
--- a/Duplicati/Library/Core/Utility.cs
+++ b/Duplicati/Library/Core/Utility.cs
@@ -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;
+ }
+ }
}
}
diff --git a/Duplicati/Library/Main/BackupStatistics.cs b/Duplicati/Library/Main/BackupStatistics.cs
index d1ea577b1..762aa223a 100644
--- a/Duplicati/Library/Main/BackupStatistics.cs
+++ b/Duplicati/Library/Main/BackupStatistics.cs
@@ -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");
diff --git a/Duplicati/Library/Main/RSyncDir.cs b/Duplicati/Library/Main/RSyncDir.cs
index bb12de1a0..c79d1bdeb 100644
--- a/Duplicati/Library/Main/RSyncDir.cs
+++ b/Duplicati/Library/Main/RSyncDir.cs
@@ -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;
diff --git a/WizardForm/Dialog.Designer.cs b/WizardForm/Dialog.Designer.cs
index f2b1aa97f..98a43f4b7 100644
--- a/WizardForm/Dialog.Designer.cs
+++ b/WizardForm/Dialog.Designer.cs
@@ -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);
diff --git a/WizardForm/Dialog.cs b/WizardForm/Dialog.cs
index 0514d8765..ee7e6c0bb 100644
--- a/WizardForm/Dialog.cs
+++ b/WizardForm/Dialog.cs
@@ -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)
diff --git a/WizardForm/IControl.cs b/WizardForm/IControl.cs
deleted file mode 100644
index 6809c976c..000000000
--- a/WizardForm/IControl.cs
+++ /dev/null
@@ -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);
- }
-}
diff --git a/WizardForm/IWizardControl.cs b/WizardForm/IWizardControl.cs
index 662f0f60b..8623aabcf 100644
--- a/WizardForm/IWizardControl.cs
+++ b/WizardForm/IWizardControl.cs
@@ -31,7 +31,23 @@ namespace System.Windows.Forms.Wizard
string HelpText { get; }
Image Image { get; }
bool FullSize { get; }
+ ///
+ /// Called when the page is entering
+ ///
+ /// The owner wizard form
+ /// State information
void Enter(IWizardForm owner, PageChangedArgs args);
+ ///
+ /// Called when the page has loaded and is being displayed
+ ///
+ /// The owner wizard form
+ /// State information
+ void Display(IWizardForm owner, PageChangedArgs args);
+ ///
+ /// Called when the page is leaving
+ ///
+ /// The owner wizard form
+ /// State information
void Leave(IWizardForm owner, PageChangedArgs args);
}
}
diff --git a/WizardForm/StartPage.cs b/WizardForm/StartPage.cs
index 598dd8307..fb8ecfced 100644
--- a/WizardForm/StartPage.cs
+++ b/WizardForm/StartPage.cs
@@ -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
}
diff --git a/WizardForm/WizardControl.cs b/WizardForm/WizardControl.cs
index 8284eed7d..fba3265b2 100644
--- a/WizardForm/WizardControl.cs
+++ b/WizardForm/WizardControl.cs
@@ -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;
diff --git a/WizardForm/WizardForm.csproj b/WizardForm/WizardForm.csproj
index 414799541..db4d38de4 100644
--- a/WizardForm/WizardForm.csproj
+++ b/WizardForm/WizardForm.csproj
@@ -43,7 +43,6 @@
Dialog.cs
-