Ejemplo n.º 1
0
        void FinishedRestoreSetup_PageLeave(object sender, PageChangedArgs args)
        {
            if (args.Direction == PageChangedDirection.Back)
            {
                return;
            }

            try
            {
                HelperControls.WaitForOperation dlg = new Duplicati.GUI.HelperControls.WaitForOperation();
                dlg.Setup(new DoWorkEventHandler(Restore), Strings.FinishedRestoreSetup.RestoreWaitDialogTitle, true);
                if (dlg.ShowDialog() != DialogResult.OK)
                {
                    if (dlg.Error != null)
                    {
                        throw dlg.Error;
                    }

                    args.Cancel = true;
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, string.Format(Strings.FinishedRestoreSetup.RestoreFailedError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                args.Cancel = true;
                return;
            }
        }
Ejemplo n.º 2
0
        void FinishedRestoreSetup_PageLeave(object sender, PageChangedArgs args)
        {
            if (args.Direction == PageChangedDirection.Back)
                return;

            try
            {
                HelperControls.WaitForOperation dlg = new Duplicati.GUI.HelperControls.WaitForOperation();
                dlg.Setup(new DoWorkEventHandler(Restore), Strings.FinishedRestoreSetup.RestoreWaitDialogTitle, true);
                if (dlg.ShowDialog() != DialogResult.OK)
                {
                    if (dlg.Error != null)
                        throw dlg.Error;

                    args.Cancel = true;
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, string.Format(Strings.FinishedRestoreSetup.RestoreFailedError, ex.Message), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                args.Cancel = true;
                return;
            }
        }