Files
duplicati/Duplicati/GUI/HelperControls/WaitForOperation.cs
T
kenneth.skovhede@gmail.com fd422ef4b4 Added option to set the temp folder.
Added code to restore the setup from a backup.
Removed the unused RDiffWrapper.
Added events to the main interface.
The beta for 1.0 is now completed, but the installer is missing.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@89 59da171f-624f-0410-aa54-27559c288bec
2009-02-15 23:27:14 +00:00

44 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Duplicati.GUI.HelperControls
{
public partial class WaitForOperation : Form
{
private Exception m_exception;
public WaitForOperation()
{
InitializeComponent();
}
public void Setup(DoWorkEventHandler callback, string title)
{
backgroundWorker1.DoWork += callback;
this.Text = title;
}
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
m_exception = e.Error;
if (e.Cancelled || e.Error != null)
this.DialogResult = DialogResult.Cancel;
else
this.DialogResult = DialogResult.OK;
this.Close();
}
private void WaitForOperation_Load(object sender, EventArgs e)
{
backgroundWorker1.RunWorkerAsync();
}
public Exception Error { get { return m_exception; } }
}
}