private void handleOpenFile(FileInfo fileInfo) { if (DialogUtils.ConfirmScanner(String.Format(R.GetString("OpenFileQ"), fileInfo.Name))) { SelectedFile = fileInfo.FullName; if (EvtFileOpen != null) { EvtFileOpen.BeginInvoke(this, new EventArgs(), null, null); } } }
/// <summary> /// Perform action on the file /// </summary> /// <param name="operation">what to do?</param> /// <param name="itemTag">File info</param> private void handleFileOperation(FileOperation operation, FileInfo fileInfo) { switch (operation) { case FileOperation.Open: SelectedFile = fileInfo.FullName; if (EvtFileOpen != null) { EvtFileOpen.BeginInvoke(this, new EventArgs(), null, null); } break; case FileOperation.Delete: handleDeleteFile(fileInfo); break; } }