UndoEngine.cs 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. //
  2. // System.ComponentModel.Design.UndoEngine.cs
  3. //
  4. // Author:
  5. // Atsushi Enomoto <[email protected]>
  6. //
  7. // Copyright (C) 2007 Novell, Inc
  8. //
  9. //
  10. // Permission is hereby granted, free of charge, to any person obtaining
  11. // a copy of this software and associated documentation files (the
  12. // "Software"), to deal in the Software without restriction, including
  13. // without limitation the rights to use, copy, modify, merge, publish,
  14. // distribute, sublicense, and/or sell copies of the Software, and to
  15. // permit persons to whom the Software is furnished to do so, subject to
  16. // the following conditions:
  17. //
  18. // The above copyright notice and this permission notice shall be
  19. // included in all copies or substantial portions of the Software.
  20. //
  21. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  22. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  23. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  24. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  25. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  26. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  27. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  28. //
  29. #if NET_2_0
  30. using System;
  31. using System.ComponentModel;
  32. namespace System.ComponentModel.Design
  33. {
  34. public abstract class UndoEngine : IDisposable
  35. {
  36. [MonoTODO]
  37. protected UndoEngine (IServiceProvider provider)
  38. {
  39. throw new NotImplementedException ();
  40. }
  41. public event EventHandler Undoing;
  42. public event EventHandler Undone;
  43. [MonoTODO]
  44. public bool Enabled {
  45. get { throw new NotImplementedException (); }
  46. set { throw new NotImplementedException (); }
  47. }
  48. [MonoTODO]
  49. public bool UndoInProgress {
  50. get { throw new NotImplementedException (); }
  51. }
  52. protected abstract void AddUndoUnit (UndoEngine.UndoUnit unit);
  53. [MonoTODO]
  54. protected virtual UndoEngine.UndoUnit CreateUndoUnit (string name, bool primary)
  55. {
  56. throw new NotImplementedException ();
  57. }
  58. [MonoTODO]
  59. protected virtual void DiscardUndoUnit (UndoEngine.UndoUnit unit)
  60. {
  61. throw new NotImplementedException ();
  62. }
  63. public void Dispose ()
  64. {
  65. Dispose (true);
  66. }
  67. [MonoTODO]
  68. protected virtual void Dispose (bool disposing)
  69. {
  70. }
  71. [MonoTODO]
  72. protected object GetRequiredService (Type serviceType)
  73. {
  74. throw new NotImplementedException ();
  75. }
  76. [MonoTODO]
  77. protected object GetService (Type serviceType)
  78. {
  79. throw new NotImplementedException ();
  80. }
  81. [MonoTODO]
  82. protected virtual void OnUndoing (EventArgs e)
  83. {
  84. throw new NotImplementedException ();
  85. }
  86. [MonoTODO]
  87. protected virtual void OnUndone (EventArgs e)
  88. {
  89. throw new NotImplementedException ();
  90. }
  91. protected class UndoUnit
  92. {
  93. UndoEngine engine;
  94. string name;
  95. [MonoTODO]
  96. public UndoUnit (UndoEngine engine, string name)
  97. {
  98. this.engine = engine;
  99. this.name = name;
  100. }
  101. protected UndoEngine UndoEngine {
  102. get { return engine; }
  103. }
  104. [MonoTODO]
  105. public virtual bool IsEmpty {
  106. get { throw new NotImplementedException (); }
  107. }
  108. public virtual string Name {
  109. get { return name; }
  110. }
  111. [MonoTODO]
  112. public virtual void Close ()
  113. {
  114. throw new NotImplementedException ();
  115. }
  116. [MonoTODO]
  117. public virtual void ComponentAdded (ComponentEventArgs e)
  118. {
  119. throw new NotImplementedException ();
  120. }
  121. [MonoTODO]
  122. public virtual void ComponentAdding (ComponentEventArgs e)
  123. {
  124. throw new NotImplementedException ();
  125. }
  126. [MonoTODO]
  127. public virtual void ComponentChanged (ComponentEventArgs e)
  128. {
  129. throw new NotImplementedException ();
  130. }
  131. [MonoTODO]
  132. public virtual void ComponentChanging (ComponentEventArgs e)
  133. {
  134. throw new NotImplementedException ();
  135. }
  136. [MonoTODO]
  137. public virtual void ComponentRemoved (ComponentEventArgs e)
  138. {
  139. throw new NotImplementedException ();
  140. }
  141. [MonoTODO]
  142. public virtual void ComponentRemoving (ComponentEventArgs e)
  143. {
  144. throw new NotImplementedException ();
  145. }
  146. [MonoTODO]
  147. public virtual void ComponentRename (ComponentRenameEventArgs e)
  148. {
  149. throw new NotImplementedException ();
  150. }
  151. [MonoTODO]
  152. protected object GetService (Type serviceType)
  153. {
  154. throw new NotImplementedException ();
  155. }
  156. [MonoTODO]
  157. public override string ToString ()
  158. {
  159. return base.ToString ();
  160. }
  161. [MonoTODO]
  162. public void Undo ()
  163. {
  164. throw new NotImplementedException ();
  165. }
  166. [MonoTODO]
  167. protected virtual void UndoCore ()
  168. {
  169. throw new NotImplementedException ();
  170. }
  171. }
  172. }
  173. }
  174. #endif