PageRenderTime 26ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/IZWebFileManager/FileManagerController.Events.cs

http://izwebfilemanager.googlecode.com/
C# | 125 lines | 82 code | 28 blank | 15 comment | 22 complexity | dc9f96a9570b120bc6b490410c122228 MD5 | raw file
  1. // Copyright (C) 2006 Igor Zelmanovich <izwebfilemanager@gmail.com>
  2. //
  3. // This program is free software; you can redistribute it and/or modify
  4. // it under the terms of the GNU General Public License as published by
  5. // the Free Software Foundation; either version 2 of the License, or
  6. // (at your option) any later version.
  7. //
  8. // This program is distributed in the hope that it will be useful,
  9. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. // GNU General Public License for more details.
  12. //
  13. // You should have received a copy of the GNU General Public License
  14. // along with this program; if not, write to the Free Software
  15. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. using System;
  17. using System.Collections.Generic;
  18. using System.Text;
  19. using System.ComponentModel;
  20. namespace IZ.WebFileManager
  21. {
  22. partial class FileManagerController
  23. {
  24. #region Events
  25. [Category ("Action")]
  26. public event EventHandler<RenameCancelEventArgs> ItemRenaming;
  27. [Category ("Action")]
  28. public event EventHandler<NewDocumentCancelEventArgs> NewDocumentCreating;
  29. [Category ("Action")]
  30. public event EventHandler<NewDocumentEventArgs> NewDocumentCreated;
  31. [Category ("Action")]
  32. public event EventHandler<ExecuteCommandEventArgs> ExecuteCommand;
  33. [Category ("Action")]
  34. public event EventHandler<RenameEventArgs> ItemRenamed;
  35. [Category ("Action")]
  36. public event EventHandler<NewFolderCancelEventArgs> NewFolderCreating;
  37. [Category ("Action")]
  38. public event EventHandler<NewFolderEventArgs> NewFolderCreated;
  39. [Category ("Action")]
  40. public event EventHandler<UploadFileCancelEventArgs> FileUploading;
  41. [Category ("Action")]
  42. public event EventHandler<UploadFileEventArgs> FileUploaded;
  43. [Category ("Action")]
  44. public event EventHandler<SelectedItemsActionCancelEventArgs> SelectedItemsAction;
  45. [Category ("Action")]
  46. public event EventHandler<SelectedItemsActionEventArgs> SelectedItemsActionComplete;
  47. [Category ("Action")]
  48. public event EventHandler<DownloadFileCancelEventArgs> FileDownload;
  49. #endregion
  50. #region OnEvent Methods
  51. private void OnItemRenaming (RenameCancelEventArgs e) {
  52. if (ItemRenaming != null)
  53. ItemRenaming (this, e);
  54. }
  55. private void OnItemRenamed (RenameEventArgs e) {
  56. if (ItemRenamed != null)
  57. ItemRenamed (this, e);
  58. }
  59. private void OnNewFolderCreating (NewFolderCancelEventArgs e) {
  60. if (NewFolderCreating != null)
  61. NewFolderCreating (this, e);
  62. }
  63. private void OnNewFolderCreated (NewFolderEventArgs e) {
  64. if (NewFolderCreated != null)
  65. NewFolderCreated (this, e);
  66. }
  67. private void OnFileUploading (UploadFileCancelEventArgs e) {
  68. if (FileUploading != null)
  69. FileUploading (this, e);
  70. }
  71. private void OnFileUploaded (UploadFileEventArgs e) {
  72. if (FileUploaded != null)
  73. FileUploaded (this, e);
  74. }
  75. private void OnSelectedItemsAction (SelectedItemsActionCancelEventArgs e) {
  76. if (SelectedItemsAction != null)
  77. SelectedItemsAction (this, e);
  78. }
  79. private void OnSelectedItemsActionComplete (SelectedItemsActionEventArgs e) {
  80. if (SelectedItemsActionComplete != null)
  81. SelectedItemsActionComplete (this, e);
  82. }
  83. private void OnNewDocumentCreating (NewDocumentCancelEventArgs e) {
  84. if (NewDocumentCreating != null)
  85. NewDocumentCreating (this, e);
  86. }
  87. private void OnNewDocumentCreated (NewDocumentEventArgs e) {
  88. if (NewDocumentCreated != null)
  89. NewDocumentCreated (this, e);
  90. }
  91. private void OnExecuteCommand (ExecuteCommandEventArgs e) {
  92. if (ExecuteCommand != null)
  93. ExecuteCommand (this, e);
  94. }
  95. #endregion
  96. }
  97. }