Fixed some compile errors.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@88 59da171f-624f-0410-aa54-27559c288bec
This commit is contained in:
@@ -188,6 +188,12 @@
|
||||
<Compile Include="Wizard pages\Add backup\FinishedAdd.Designer.cs">
|
||||
<DependentUpon>FinishedAdd.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Wizard pages\RestoreSetup\FinishedRestoreSetup.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Wizard pages\RestoreSetup\FinishedRestoreSetup.Designer.cs">
|
||||
<DependentUpon>FinishedRestoreSetup.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Wizard pages\Add backup\IncrementalSettings.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
@@ -507,6 +513,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>MainPage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Wizard pages\RestoreSetup\FinishedRestoreSetup.resx">
|
||||
<DependentUpon>FinishedRestoreSetup.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Wizard pages\Restore\FinishedRestore.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>FinishedRestore.cs</DependentUpon>
|
||||
@@ -536,7 +546,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Wizard pages\Rearrange\" />
|
||||
<Folder Include="Wizard pages\RestoreSetup\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
@@ -195,7 +195,6 @@ 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
|
||||
//
|
||||
@@ -289,4 +288,4 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
private System.Windows.Forms.CheckBox ThreadPriorityEnabled;
|
||||
private System.Windows.Forms.ComboBox ThreadPriority;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,11 +167,6 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
|
||||
{
|
||||
ThreadPriority.Enabled = ThreadPriorityEnabled.Checked;
|
||||
}
|
||||
|
||||
private void VolumeSizeLimitNumber_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int a = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Duplicati.GUI.Wizard_pages.Backends.FTP
|
||||
m_wrapper.Port = (int)Port.Value;
|
||||
|
||||
if (new WizardSettingsWrapper(m_settings).PrimayAction == WizardSettingsWrapper.MainAction.RestoreSetup)
|
||||
args.NextPage = new RestoreSetup.RestoreSetupFinished();
|
||||
args.NextPage = new RestoreSetup.FinishedRestoreSetup();
|
||||
else
|
||||
args.NextPage = new Add_backup.AdvancedOptions();
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Duplicati.GUI.Wizard_pages.Backends.File
|
||||
}
|
||||
|
||||
if (new WizardSettingsWrapper(m_settings).PrimayAction == WizardSettingsWrapper.MainAction.RestoreSetup)
|
||||
args.NextPage = new RestoreSetup.RestoreSetupFinished();
|
||||
args.NextPage = new RestoreSetup.FinishedRestoreSetup();
|
||||
else
|
||||
args.NextPage = new Add_backup.AdvancedOptions();
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Duplicati.GUI.Wizard_pages.Backends.S3
|
||||
m_wrapper.UseSubDomains = bucketname.ToLower() == bucketname;
|
||||
|
||||
if (new WizardSettingsWrapper(m_settings).PrimayAction == WizardSettingsWrapper.MainAction.RestoreSetup)
|
||||
args.NextPage = new RestoreSetup.RestoreSetupFinished();
|
||||
args.NextPage = new RestoreSetup.FinishedRestoreSetup();
|
||||
else
|
||||
args.NextPage = new Add_backup.AdvancedOptions();
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace Duplicati.GUI.Wizard_pages.Backends.SSH
|
||||
m_wrapper.Username = Username.Text;
|
||||
|
||||
if (new WizardSettingsWrapper(m_settings).PrimayAction == WizardSettingsWrapper.MainAction.RestoreSetup)
|
||||
args.NextPage = new RestoreSetup.RestoreSetupFinished();
|
||||
args.NextPage = new RestoreSetup.FinishedRestoreSetup();
|
||||
else
|
||||
args.NextPage = new Add_backup.AdvancedOptions();
|
||||
}
|
||||
|
||||
@@ -35,6 +35,12 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
InitializeComponent();
|
||||
base.PageDisplay += new System.Windows.Forms.Wizard.PageChangeHandler(FirstLaunch_PageDisplay);
|
||||
base.PageLeave += new System.Windows.Forms.Wizard.PageChangeHandler(FirstLaunch_PageLeave);
|
||||
base.PageEnter += new System.Windows.Forms.Wizard.PageChangeHandler(FirstLaunch_PageEnter);
|
||||
}
|
||||
|
||||
void FirstLaunch_PageEnter(object sender, System.Windows.Forms.Wizard.PageChangedArgs args)
|
||||
{
|
||||
args.TreatAsLast = false;
|
||||
}
|
||||
|
||||
void FirstLaunch_PageLeave(object sender, System.Windows.Forms.Wizard.PageChangedArgs args)
|
||||
@@ -42,7 +48,7 @@ namespace Duplicati.GUI.Wizard_pages
|
||||
if (!CreateNew.Checked && !Restore.Checked)
|
||||
{
|
||||
MessageBox.Show(this, "You must select an action", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
args.Cancel;
|
||||
args.Cancel = true;
|
||||
args.NextPage = null;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ namespace Duplicati.GUI.Wizard_pages.RestoreSetup
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.Summary = new System.Windows.Forms.TextBox();
|
||||
this.RunNow = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
@@ -53,24 +52,13 @@ namespace Duplicati.GUI.Wizard_pages.RestoreSetup
|
||||
this.Summary.Size = new System.Drawing.Size(456, 152);
|
||||
this.Summary.TabIndex = 1;
|
||||
//
|
||||
// RunNow
|
||||
//
|
||||
this.RunNow.AutoSize = true;
|
||||
this.RunNow.Location = new System.Drawing.Point(24, 200);
|
||||
this.RunNow.Name = "RunNow";
|
||||
this.RunNow.Size = new System.Drawing.Size(108, 17);
|
||||
this.RunNow.TabIndex = 2;
|
||||
this.RunNow.Text = "Run backup now";
|
||||
this.RunNow.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// FinishedAdd
|
||||
// FinishedRestoreSetup
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.RunNow);
|
||||
this.Controls.Add(this.Summary);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "FinishedAdd";
|
||||
this.Name = "FinishedRestoreSetup";
|
||||
this.Size = new System.Drawing.Size(506, 242);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
@@ -81,6 +69,5 @@ namespace Duplicati.GUI.Wizard_pages.RestoreSetup
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
public System.Windows.Forms.TextBox Summary;
|
||||
public System.Windows.Forms.CheckBox RunNow;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,12 +29,12 @@ using Duplicati.Datamodel;
|
||||
|
||||
namespace Duplicati.GUI.Wizard_pages.RestoreSetup
|
||||
{
|
||||
public partial class FinishedAdd : WizardControl
|
||||
public partial class FinishedRestoreSetup : WizardControl
|
||||
{
|
||||
WizardSettingsWrapper m_wrapper;
|
||||
|
||||
public FinishedRestoreSetup()
|
||||
: base("Ready to add backup", "You have now entered all the required data, and can now create the backup.")
|
||||
: base("Ready to restore settings", "You have now entered all the required data, and can now restore the setup.")
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Duplicati.GUI.Wizard_pages.RestoreSetup
|
||||
if (args.Direction == PageChangedDirection.Back)
|
||||
return;
|
||||
|
||||
m_wrapper.RunImmediately = RunNow.Checked;
|
||||
//TODO: Perform the restore
|
||||
}
|
||||
|
||||
void FinishedRestoreSetup_PageEnter(object sender, PageChangedArgs args)
|
||||
@@ -55,40 +55,28 @@ namespace Duplicati.GUI.Wizard_pages.RestoreSetup
|
||||
m_wrapper = new WizardSettingsWrapper(m_settings);
|
||||
|
||||
List<KeyValuePair<string, string>> strings = new List<KeyValuePair<string, string>>();
|
||||
if (m_wrapper.PrimayAction == WizardSettingsWrapper.MainAction.Add)
|
||||
strings.Add(new KeyValuePair<string, string>("Action", "Add new backup"));
|
||||
else
|
||||
strings.Add(new KeyValuePair<string, string>("Action", "Modify backup"));
|
||||
|
||||
strings.Add(new KeyValuePair<string, string>("Source folder", m_wrapper.SourcePath));
|
||||
strings.Add(new KeyValuePair<string, string>("When", m_wrapper.BackupTimeOffset.ToString()));
|
||||
if (!string.IsNullOrEmpty(m_wrapper.RepeatInterval))
|
||||
strings.Add(new KeyValuePair<string, string>("Repeat", m_wrapper.RepeatInterval));
|
||||
if (!string.IsNullOrEmpty(m_wrapper.FullBackupInterval))
|
||||
strings.Add(new KeyValuePair<string, string>("Full backup each", m_wrapper.FullBackupInterval));
|
||||
if (m_wrapper.MaxFullBackups > 0)
|
||||
strings.Add(new KeyValuePair<string, string>("Keep full backups", m_wrapper.MaxFullBackups.ToString()));
|
||||
strings.Add(new KeyValuePair<string, string>("Action", "Restore backup"));
|
||||
|
||||
strings.Add(new KeyValuePair<string, string>(null, null));
|
||||
strings.Add(new KeyValuePair<string, string>("Destination", m_wrapper.Backend.ToString()));
|
||||
strings.Add(new KeyValuePair<string, string>("Source", m_wrapper.Backend.ToString()));
|
||||
|
||||
switch(m_wrapper.Backend)
|
||||
{
|
||||
case WizardSettingsWrapper.BackendType.File:
|
||||
FileSettings file = new FileSettings(m_wrapper);
|
||||
strings.Add(new KeyValuePair<string, string>("Destination path", file.Path));
|
||||
strings.Add(new KeyValuePair<string, string>("Source path", file.Path));
|
||||
break;
|
||||
case WizardSettingsWrapper.BackendType.FTP:
|
||||
FTPSettings ftp = new FTPSettings(m_wrapper);
|
||||
strings.Add(new KeyValuePair<string, string>("Destination path", ftp.Server + "/" + ftp.Path ));
|
||||
strings.Add(new KeyValuePair<string, string>("Source path", ftp.Server + "/" + ftp.Path));
|
||||
break;
|
||||
case WizardSettingsWrapper.BackendType.SSH:
|
||||
SSHSettings ssh = new SSHSettings(m_wrapper);
|
||||
strings.Add(new KeyValuePair<string, string>("Destination path", ssh.Server + "/" + ssh.Path));
|
||||
strings.Add(new KeyValuePair<string, string>("Source path", ssh.Server + "/" + ssh.Path));
|
||||
break;
|
||||
case WizardSettingsWrapper.BackendType.S3:
|
||||
S3Settings s3 = new S3Settings(m_wrapper);
|
||||
strings.Add(new KeyValuePair<string, string>("Destination path", s3.Path));
|
||||
strings.Add(new KeyValuePair<string, string>("Source path", s3.Path));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user