コード例 #1
0
ファイル: FormRestore.cs プロジェクト: nullkuhl/fsu-dev
        /// <summary>
        /// handle Click event to delete checked items
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Delete_Click(object sender, EventArgs e)
        {
            if (lvBackups.SelectedItems.Count == 0) return;

            //Show Processing
            FormProcessing objProc = new FormProcessing();
            objProc.Show();

            foreach (ListViewItem item in lvBackups.SelectedItems)
            {
                if (ABORT)
                {
                    ABORT = false;
                    return;
                }
                Thread.Sleep(3000);
            }

            //Close Processing Form
            objProc.Close();

            FormRestore_Load(this, e);
        }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: nullkuhl/fsu-dev
 /// <summary>
 /// Shows Processing form
 /// </summary>
 public void ShowProcessing()
 {
     frmProcessing = new FormProcessing();
     frmProcessing.Show();
     frmProcessing.BringToFront();
     Application.DoEvents();
 }
コード例 #3
0
ファイル: FormRestore.cs プロジェクト: nullkuhl/fsu-dev
        /// <summary>
        /// handle Click event to restore checked items
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Restore_Click(object sender, EventArgs e)
        {
            if (lvBackups.SelectedItems.Count == 0) return;

            //Show Processing
            var objProc = new FormProcessing();
            objProc.Show();

            Clean.OnProgress += Clean_OnProgress;
            foreach (ListViewItem item in lvBackups.SelectedItems)
            {
                if (ABORT)
                {
                    ABORT = false;
                    return;
                }

                Clean.RestoreFolder(((DateTime) item.Tag).ToString("yyyyMMddHHmmss"), chbOwerwrite.Checked);
            }

            //Close Processing Form
            objProc.Close();

            Clean.OnProgress -= Clean_OnProgress;
            FormRestore_Load(this, e);

            MessageBox.Show(rm.GetString("FilesRestored"), rm.GetString("info"), MessageBoxButtons.OK, MessageBoxIcon.Information);
            Close();
        }