Files
duplicati/Duplicati/GUI/Service controls/Backends/FileSettings.cs
T
kenneth.skovhede@gmail.com daaef5f092 Fixed issue #39.
Fixed issue #41.
Fixed issue #11.
Refactored the way settings are stored, this means that you cannot go back to a previous version if you have used this one.
A backup of the old database will be created, if you need to use a previous version.
Fixed a bug in the S3 backend where the filenames would be prefixed with a slash.
Moved the file time seperator char out of the file backend, and into common settings.


git-svn-id: https://duplicati.googlecode.com/svn/trunk@134 59da171f-624f-0410-aa54-27559c288bec
2009-03-29 18:06:02 +00:00

75 lines
2.3 KiB
C#

#region Disclaimer / License
// Copyright (C) 2009, 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.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using Duplicati.Datamodel.Backends;
namespace Duplicati.GUI.Service_controls
{
public partial class FileSettings : UserControl
{
private File m_file;
private bool m_isUpdating = false;
public FileSettings()
{
InitializeComponent();
}
public void Setup(File file)
{
try
{
m_isUpdating = true;
m_file = file;
DestinationFolder.Text = m_file.DestinationFolder;
}
finally
{
m_isUpdating = false;
}
}
private void DestinationFolder_TextChanged(object sender, EventArgs e)
{
if (m_isUpdating || m_file == null)
return;
m_file.DestinationFolder = DestinationFolder.Text;
}
private void BrowseTargetFolder_Click(object sender, EventArgs e)
{
FolderBrowserDialog dlg = new FolderBrowserDialog();
dlg.Description = "Please select the folder where the backup will be stored";
if (dlg.ShowDialog() == DialogResult.OK)
DestinationFolder.Text = dlg.SelectedPath;
}
}
}