ObjectSelectorEditor.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. //
  2. // System.ComponentModel.Design.ObjectSelectorEditor
  3. //
  4. // Authors:
  5. // Gert Driesen ([email protected])
  6. //
  7. // (C) 2004 Novell
  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. using System.Drawing.Design;
  30. using System.Windows.Forms;
  31. using System.Windows.Forms.Design;
  32. namespace System.ComponentModel.Design
  33. {
  34. public abstract class ObjectSelectorEditor : UITypeEditor
  35. {
  36. public ObjectSelectorEditor ()
  37. {
  38. }
  39. public ObjectSelectorEditor (bool subObjectSelector)
  40. {
  41. SubObjectSelector = subObjectSelector;
  42. }
  43. [MonoTODO]
  44. public override object EditValue (ITypeDescriptorContext context, IServiceProvider provider, object value)
  45. {
  46. throw new NotImplementedException ();
  47. }
  48. public bool EqualsToValue (object value)
  49. {
  50. return (currValue == value);
  51. }
  52. [MonoTODO]
  53. protected virtual void FillTreeWithData (Selector selector, ITypeDescriptorContext context, IServiceProvider provider)
  54. {
  55. throw new NotImplementedException ();
  56. }
  57. public override UITypeEditorEditStyle GetEditStyle (ITypeDescriptorContext context)
  58. {
  59. return UITypeEditorEditStyle.DropDown;
  60. }
  61. public virtual void SetValue (object value)
  62. {
  63. currValue = value;
  64. }
  65. protected object currValue;
  66. protected object prevValue;
  67. public bool SubObjectSelector;
  68. public class Selector : TreeView
  69. {
  70. [MonoTODO]
  71. public Selector (ObjectSelectorEditor editor)
  72. {
  73. throw new NotImplementedException ();
  74. }
  75. [MonoTODO]
  76. public SelectorNode AddNode (string label, object value, SelectorNode parent)
  77. {
  78. throw new NotImplementedException ();
  79. }
  80. [MonoTODO]
  81. public void Clear ()
  82. {
  83. throw new NotImplementedException ();
  84. }
  85. [MonoTODO]
  86. protected void OnAfterSelect (object sender, TreeViewEventArgs e)
  87. {
  88. throw new NotImplementedException ();
  89. }
  90. [MonoTODO]
  91. protected override void OnKeyDown (KeyEventArgs e)
  92. {
  93. throw new NotImplementedException ();
  94. }
  95. [MonoTODO]
  96. protected override void OnKeyPress (KeyPressEventArgs e)
  97. {
  98. throw new NotImplementedException ();
  99. }
  100. [MonoTODO]
  101. public bool SetSelection (object value, TreeNodeCollection nodes)
  102. {
  103. throw new NotImplementedException ();
  104. }
  105. [MonoTODO]
  106. public void Start (IWindowsFormsEditorService edSvc, object value)
  107. {
  108. throw new NotImplementedException ();
  109. }
  110. [MonoTODO]
  111. public void Stop ()
  112. {
  113. throw new NotImplementedException ();
  114. }
  115. [MonoTODO]
  116. protected override void WndProc (ref Message m)
  117. {
  118. throw new NotImplementedException ();
  119. }
  120. [MonoTODO]
  121. public bool clickSeen;
  122. }
  123. public class SelectorNode : TreeNode
  124. {
  125. public SelectorNode (string label, object value) : base (label)
  126. {
  127. this.value = value;
  128. }
  129. public object value;
  130. }
  131. }
  132. }