예제 #1
0
 protected virtual bool OnRevertRequest(object sender, RevertEventArgs e)
 {
     bool flag = false;
     try
     {
         flag = this.RevertRequest(e.PathRoot, e.FileNames);
     }
     catch (Exception exception)
     {
         string internalCode = string.Format("# Error occurred while restoring the old messages.\r\n{0}\r\n{1}", exception.Message, exception.StackTrace);
         MessageDialog dialog = new MessageDialog();
         dialog.ShowMessage("E002", "", internalCode);
         dialog.Dispose();
     }
     return flag;
 }
예제 #2
0
 private void DoRevertEvent(string pathroot, string[] filenames)
 {
     if (this.RevertEvent != null)
     {
         RevertEventArgs e = new RevertEventArgs {
             PathRoot = pathroot,
             FileNames = filenames
         };
         if (this.RevertEvent(this, e))
         {
             this.dgvSelectList.CurrentCell = null;
             for (int i = this.dgvSelectList.RowCount - 1; i > -1; i--)
             {
                 DataGridViewRow row = this.dgvSelectList.Rows[i];
                 if (Convert.ToBoolean(row.Cells["clSelect"].Value))
                 {
                     this.dgvSelectList.Rows.RemoveAt(i);
                 }
             }
             this.dgvSelectList.Refresh();
         }
     }
 }