private void trvHoSo_DoubleClick(object sender, EventArgs e) { TreeNode selectedNode = this.trvHoSo.SelectedNode; bool flag = selectedNode.Tag != null && selectedNode.Tag.ToString().Contains("File"); if (flag) { this.Cursor = Cursors.WaitCursor; string filePathServer = selectedNode.Tag.ToString().Substring(4); ProcessData.ReadFileFromServer(filePathServer); this.Cursor = Cursors.Default; } }
private void dgvFileScan_CellClick(object sender, DataGridViewCellEventArgs e) { bool flag = e.ColumnIndex >= 0; if (flag) { bool flag2 = this.dgvFileScan.Columns[e.ColumnIndex].Name == "clnLoaiGiayToFile"; if (flag2) { this.dgvFileScan.BeginEdit(true); ComboBox comboBox = (ComboBox)this.dgvFileScan.EditingControl; comboBox.DroppedDown = true; } else { bool flag3 = this.dgvFileScan.Columns[e.ColumnIndex].Name == "clnView"; if (flag3) { FileScanInput fileScanInput = (FileScanInput)this.dgvFileScan.Rows[e.RowIndex].DataBoundItem; bool flag4 = fileScanInput.IsLocalFile || !string.IsNullOrEmpty(fileScanInput.FullName); if (flag4) { Process.Start(fileScanInput.FullName); } else { ProcessData.ReadFileFromServer(fileScanInput.FilePath); } } else { bool flag5 = this.dgvFileScan.Columns[e.ColumnIndex].Name == "clnXoaFile"; if (flag5) { bool flag6 = MessageBox.Show("Bạn chắc chắn muốn xoá file đã chọn?", "Thông báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK; if (flag6) { this.dgvFileScan.Rows.RemoveAt(e.RowIndex); } } } } } }