[Mono-devel-list] Patch for System.ComponentModel.Design namespace
A-Soft Technologies
A-Soft at A-SoftTech.com
Thu Jun 12 14:59:23 EDT 2003
Hi,
here is another patch for review and commit. This time it's containing most
of the implementation for the System.ComponentModel.Design namespace.
A.Nahr
Index: ActiveDesignerEventArgs.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/ActiveDesignerEventArgs.
cs,v
retrieving revision 1.1
diff -u -r1.1 ActiveDesignerEventArgs.cs
--- ActiveDesignerEventArgs.cs 5 Dec 2002 00:48:37 -0000 1.1
+++ ActiveDesignerEventArgs.cs 12 Jun 2003 18:57:34 -0000
@@ -24,20 +24,12 @@
get {
return newDesigner;
}
-
- set {
- newDesigner = value;
- }
}
public IDesignerHost OldDesigner {
get {
return oldDesigner;
- }
-
- set {
- newDesigner = value;
- }
+ }
}
}
}
Index: Changelog
===================================================================
RCS file: /mono/mcs/class/System/System.ComponentModel.Design/Changelog,v
retrieving revision 1.2
diff -u -r1.2 Changelog
--- Changelog 5 Dec 2002 00:48:37 -0000 1.2
+++ Changelog 12 Jun 2003 18:57:35 -0000
@@ -1,3 +1,44 @@
+2003-06-12 Andreas Nahr <ClassDevelopment at A-SoftTech.com>
+
+ * ActiveDesignerEventArgs.cs: Fixed property access
+
+ * CheckoutException.cs
+ * CommandID.cs
+ * ComponentChangedEventArgs.cs
+ * ComponentChangingEventArgs.cs
+ * ComponentEventArgs.cs
+ * ComponentRenameEventArgs.cs
+ * DesignerEventArgs.cs: Implemented
+
+ * StandardCommands.cs
+ * StandardToolWindows.cs: Implemented and removed unneeded MonoTODOs
+
+ * DesignerCollection.cs
+ * DesignerVerbCollection.cs: Collections implemented
+
+ * DesignerTransaction.cs
+ * DesignerVerb.cs: Implemented
+
+ * MenuCommand.cs: Most members implemented
+
+ * IDesignerHost.cs: Completed interface
+
+ * IInheritanceService.cs: Hopefully fixed interface
+
+ * ITypeResolutionService.cs: Completed interface
+
+ * ISelectionService.cs: Completed interface
+
+ * DesigntimeLicenseContext.cs: Added and implemented member
+
+ * DesigntimeLicenseContextSerializer.cs: Added private constructor,
removed unneeded members
+
+ * SelectionTypes.cs
+ * HelpContextType.cs
+ * HelpKeywordType.cs: Hopefully fixed enums
+
+ * ServiceContainer.cs: little implementation added
+
2002-12-05 Alejandro Sánchez Acosta <raciel at gnome.org>
* ActiveDesignerEventArgs.cs,
Index: CheckoutException.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/CheckoutException.cs,v
retrieving revision 1.2
diff -u -r1.2 CheckoutException.cs
--- CheckoutException.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ CheckoutException.cs 12 Jun 2003 18:57:35 -0000
@@ -1,10 +1,12 @@
//
-// System.ComponentModel.Design.CheckoutException
+// System.ComponentModel.Design.CheckoutException.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
using System.Runtime.InteropServices;
@@ -13,32 +15,26 @@
{
public class CheckoutException : ExternalException
{
- public static readonly CheckoutException Canceled;
+ public static readonly CheckoutException Canceled = new CheckoutException
();
- [MonoTODO]
public CheckoutException()
+ : this (null, 0)
{
}
- [MonoTODO]
public CheckoutException (string message)
+ : this (message, 0)
{
}
- [MonoTODO]
public CheckoutException (string message, int errorCode)
+ : base (message, errorCode)
{
}
- [MonoTODO]
public override string ToString()
{
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- ~CheckoutException()
- {
+ return base.ToString ();
}
}
}
Index: CommandID.cs
===================================================================
RCS file: /mono/mcs/class/System/System.ComponentModel.Design/CommandID.cs,v
retrieving revision 1.1
diff -u -r1.1 CommandID.cs
--- CommandID.cs 30 Nov 2002 17:37:00 -0000 1.1
+++ CommandID.cs 12 Jun 2003 18:57:35 -0000
@@ -1,9 +1,12 @@
+//
// System.ComponentModel.Design.CommandID.cs
//
// Author:
-// Alejandro Sánchez Acosta <raciel at es.gnu.org>
+// Alejandro Sánchez Acosta <raciel at es.gnu.org>
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) Alejandro Sánchez Acosta
+// (C) 2003 Andreas Nahr
//
using System.Runtime.InteropServices;
@@ -13,49 +16,47 @@
[ComVisible(true)]
public class CommandID
{
-
- [MonoTODO]
- internal CommandID (string text) {
- throw new NotImplementedException ();
- }
+ private int cID;
+ private Guid guid;
- [MonoTODO]
public CommandID (Guid menuGroup, int commandID) {
- throw new NotImplementedException ();
+ cID = commandID;
+ guid = menuGroup;
}
- [MonoTODO]
public virtual Guid Guid
{
get {
- throw new NotImplementedException ();
+ return guid;
}
}
- [MonoTODO]
public virtual int ID
{
get {
- throw new NotImplementedException ();
+ return cID;
}
}
- [MonoTODO]
public override bool Equals (object obj)
{
- throw new NotImplementedException ();
+ if (!(obj is CommandID))
+ return false;
+ if (obj == this)
+ return true;
+ return ((CommandID) obj).Guid.Equals (guid) &&
+ ((CommandID) obj).ID.Equals (cID);
}
- [MonoTODO]
public override int GetHashCode()
{
- throw new NotImplementedException ();
+ // Guid can only be valid
+ return guid.GetHashCode() ^ cID.GetHashCode();
}
- [MonoTODO]
public override string ToString()
{
- throw new NotImplementedException ();
+ return guid.ToString () + " : " + cID.ToString ();
}
}
}
Index: ComponentChangedEventArgs.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/ComponentChangedEventArg
s.cs,v
retrieving revision 1.2
diff -u -r1.2 ComponentChangedEventArgs.cs
--- ComponentChangedEventArgs.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ ComponentChangedEventArgs.cs 12 Jun 2003 18:57:35 -0000
@@ -1,10 +1,12 @@
//
-// System.ComponentModel.Design.ComponentChangedEventArgs
+// System.ComponentModel.Design.ComponentChangedEventArgs.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
using System.Runtime.InteropServices;
@@ -12,39 +14,36 @@
namespace System.ComponentModel.Design
{
[ComVisible(true)]
- public sealed class ComponentChangedEventArgs : EventArgs
+ public sealed class ComponentChangedEventArgs : EventArgs
{
- [MonoTODO]
+ private object component;
+ private MemberDescriptor member;
+ private object oldValue;
+ private object newValue;
+
public ComponentChangedEventArgs (object component,
- MemberDescriptor member,
- object oldValue,
- object newValue)
+ MemberDescriptor member, object oldValue, object newValue)
{
+ this.component = component;
+ this.member = member;
+ this.oldValue = oldValue;
+ this.newValue = newValue;
}
public object Component {
- [MonoTODO]
- get { throw new NotImplementedException(); }
+ get { return component; }
}
public MemberDescriptor Member {
- [MonoTODO]
- get { throw new NotImplementedException(); }
+ get { return member; }
}
public object NewValue {
- [MonoTODO]
- get { throw new NotImplementedException(); }
+ get { return oldValue; }
}
public object OldValue {
- [MonoTODO]
- get { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- ~ComponentChangedEventArgs()
- {
+ get { return newValue; }
}
}
}
Index: ComponentChangingEventArgs.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/ComponentChangingEventAr
gs.cs,v
retrieving revision 1.2
diff -u -r1.2 ComponentChangingEventArgs.cs
--- ComponentChangingEventArgs.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ ComponentChangingEventArgs.cs 12 Jun 2003 18:57:35 -0000
@@ -1,10 +1,12 @@
//
-// System.ComponentModel.Design.ComponentChangingEventArgs
+// System.ComponentModel.Design.ComponentChangingEventArgs.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
using System.Runtime.InteropServices;
@@ -12,27 +14,26 @@
namespace System.ComponentModel.Design
{
[ComVisible(true)]
- public sealed class ComponentChangingEventArgs : EventArgs
+ public sealed class ComponentChangingEventArgs : EventArgs
{
- [MonoTODO]
+ private object component;
+ private MemberDescriptor member;
+
public ComponentChangingEventArgs (object component,
MemberDescriptor member)
{
+ this.component = component;
+ this.member = member;
}
- public object Component {
- [MonoTODO]
- get { throw new NotImplementedException(); }
- }
-
- public MemberDescriptor Member {
- [MonoTODO]
- get { throw new NotImplementedException(); }
- }
+ public object Component
+ {
+ get { return component; }
+ }
- [MonoTODO]
- ~ComponentChangingEventArgs()
- {
- }
+ public MemberDescriptor Member
+ {
+ get { return member; }
+ }
}
}
Index: ComponentEventArgs.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/ComponentEventArgs.cs,v
retrieving revision 1.2
diff -u -r1.2 ComponentEventArgs.cs
--- ComponentEventArgs.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ ComponentEventArgs.cs 12 Jun 2003 18:57:35 -0000
@@ -1,10 +1,12 @@
//
-// System.ComponentModel.Design.ComponentEventArgs
+// System.ComponentModel.Design.ComponentEventArgs.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
using System.Runtime.InteropServices;
@@ -12,21 +14,17 @@
namespace System.ComponentModel.Design
{
[ComVisible(true)]
- public class ComponentEventArgs : EventArgs
+ public class ComponentEventArgs : EventArgs
{
- [MonoTODO]
+ IComponent icomp;
+
public ComponentEventArgs (IComponent component)
{
+ icomp = component;
}
public virtual IComponent Component {
- [MonoTODO]
- get { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- ComponentEventArgs()
- {
+ get { return icomp; }
}
}
}
Index: ComponentRenameEventArgs.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/ComponentRenameEventArgs
.cs,v
retrieving revision 1.2
diff -u -r1.2 ComponentRenameEventArgs.cs
--- ComponentRenameEventArgs.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ ComponentRenameEventArgs.cs 12 Jun 2003 18:57:36 -0000
@@ -1,10 +1,12 @@
//
-// System.ComponentModel.Design.ComponentRenameEventArgs
+// System.ComponentModel.Design.ComponentRenameEventArgs.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
using System.Runtime.InteropServices;
@@ -12,34 +14,30 @@
namespace System.ComponentModel.Design
{
[ComVisible(true)]
- public class ComponentRenameEventArgs : EventArgs
+ public class ComponentRenameEventArgs : EventArgs
{
- [MonoTODO]
+ private object component;
+ private string oldName;
+ private string newName;
+
public ComponentRenameEventArgs (object component,
- string oldName,
- string newName)
+ string oldName, string newName)
{
+ this.component = component;
+ this.oldName = oldName;
+ this.newName = newName;
}
public object Component {
- [MonoTODO]
- get { throw new NotImplementedException(); }
+ get { return component; }
}
public virtual string NewName {
- [MonoTODO]
- get { throw new NotImplementedException(); }
+ get { return newName; }
}
public virtual string OldName {
- [MonoTODO]
- get { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- ~ComponentRenameEventArgs()
- {
+ get { return oldName; }
}
-
}
}
Index: DesignerCollection.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/DesignerCollection.cs,v
retrieving revision 1.2
diff -u -r1.2 DesignerCollection.cs
--- DesignerCollection.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ DesignerCollection.cs 12 Jun 2003 18:57:36 -0000
@@ -1,10 +1,12 @@
//
-// System.ComponentModel.Design.DesignerCollection
+// System.ComponentModel.Design.DesignerCollection.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
using System.Collections;
@@ -13,52 +15,43 @@
{
public class DesignerCollection : ICollection, IEnumerable
{
- [MonoTODO]
+
+ private ArrayList designers;
+
public DesignerCollection (IDesignerHost[] designers)
{
+ this.designers = new ArrayList (designers);
}
- [MonoTODO]
public DesignerCollection (IList designers)
{
+ this.designers = new ArrayList (designers);
}
public int Count {
- [MonoTODO]
- get { throw new NotImplementedException(); }
+ get { return designers.Count; }
}
public virtual IDesignerHost this [int index] {
- [MonoTODO]
- get { throw new NotImplementedException(); }
+ get { return (IDesignerHost) designers [index]; }
}
- [MonoTODO]
public IEnumerator GetEnumerator()
{
- throw new NotImplementedException();
- }
-
- public bool IsSynchronized {
- [MonoTODO]
- get { throw new NotImplementedException(); }
+ return designers.GetEnumerator ();
}
- public object SyncRoot {
- [MonoTODO]
- get { throw new NotImplementedException(); }
+ bool ICollection.IsSynchronized {
+ get { return designers.IsSynchronized; }
}
- [MonoTODO]
- public void CopyTo (Array array, int index)
- {
- throw new NotImplementedException();
+ object ICollection.SyncRoot {
+ get { return designers.SyncRoot; }
}
- [MonoTODO]
- ~DesignerCollection()
+ void ICollection.CopyTo (Array array, int index)
{
+ designers.CopyTo (array, index);
}
-
}
}
Index: DesignerEventArgs.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/DesignerEventArgs.cs,v
retrieving revision 1.2
diff -u -r1.2 DesignerEventArgs.cs
--- DesignerEventArgs.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ DesignerEventArgs.cs 12 Jun 2003 18:57:36 -0000
@@ -1,30 +1,27 @@
//
-// System.ComponentModel.Design.DesignerEventArgs
+// System.ComponentModel.Design.DesignerEventArgs.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
namespace System.ComponentModel.Design
{
public class DesignerEventArgs : EventArgs
{
- [MonoTODO]
+ private IDesignerHost host;
+
public DesignerEventArgs (IDesignerHost host)
{
+ this.host = host;
}
public IDesignerHost Designer {
- [MonoTODO]
- get { throw new NotImplementedException(); }
+ get { return host; }
}
-
- [MonoTODO]
- ~DesignerEventArgs()
- {
- }
-
}
}
Index: DesignerTransaction.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/DesignerTransaction.cs,v
retrieving revision 1.2
diff -u -r1.2 DesignerTransaction.cs
--- DesignerTransaction.cs 30 Nov 2002 18:29:25 -0000 1.2
+++ DesignerTransaction.cs 12 Jun 2003 18:57:36 -0000
@@ -1,9 +1,12 @@
+//
// System.ComponentModel.Design.DesignerTransaction.cs
//
// Author:
// Alejandro Sánchez Acosta <raciel at es.gnu.org>
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) Alejandro Sánchez Acosta
+// (C) 2003 Andreas Nahr
//
using System;
@@ -12,42 +15,79 @@
{
public abstract class DesignerTransaction : IDisposable
{
- [MonoTODO]
- public DesignerTransaction () {
- throw new NotImplementedException ();
+ private string description;
+ private bool committed;
+ private bool canceled;
+
+ public DesignerTransaction ()
+ : this ("")
+ {
}
- [MonoTODO]
public DesignerTransaction (string description) {
- throw new NotImplementedException ();
+ this.description = description;
+ this.committed = false;
+ this.canceled = false;
}
void IDisposable.Dispose ()
{
- this.Dispose();
+ this.Dispose (true);
}
- public abstract void Dispose();
+ public abstract void Dispose (bool disposing);
+
+ protected abstract void OnCancel ();
+
+ protected abstract void OnCommit ();
+
+ public void Cancel ()
+ {
+ // LAMESPEC Cannot find anything about the exact behavior, but
I do some checks that
+ // seem to make sense
+ if (this.Canceled == false && this.Committed == false)
+ {
+ this.canceled = true;
+ OnCancel ();
+ }
+ }
+
+ public void Commit ()
+ {
+ // LAMESPEC Cannot find anything about the exact behavior, but
I do some checks that
+ // seem to make sense
+ if (this.Canceled == false && this.Committed == false)
+ {
+ this.committed = true;
+ OnCommit ();
+ }
+ }
+
public bool Canceled
{
get {
- throw new NotImplementedException ();
+ return canceled;
}
}
public bool Committed
{
get {
- throw new NotImplementedException ();
+ return committed;
}
}
public string Description
{
get {
- throw new NotImplementedException ();
+ return description;
}
- }
+ }
+
+ ~DesignerTransaction ()
+ {
+
+ }
}
}
Index: DesignerVerb.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/DesignerVerb.cs,v
retrieving revision 1.1
diff -u -r1.1 DesignerVerb.cs
--- DesignerVerb.cs 30 Nov 2002 17:37:00 -0000 1.1
+++ DesignerVerb.cs 12 Jun 2003 18:57:36 -0000
@@ -1,9 +1,12 @@
+//
// System.ComponentModel.Design.DesignerVerb.cs
//
// Author:
// Alejandro Sánchez Acosta <raciel at es.gnu.org>
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) Alejandro Sánchez Acosta
+// (C) 2003 Andreas Nahr
//
using System.Runtime.InteropServices;
@@ -13,29 +16,29 @@
[ComVisible(true)]
public class DesignerVerb : MenuCommand
{
- [MonoTODO]
- public DesignerVerb (string text, EventHandler handler) : base (handler,
new CommandID (text)){
- throw new NotImplementedException ();
+
+ private string description;
+
+ public DesignerVerb (string text, EventHandler handler)
+ : this (text, handler, StandardCommands.VerbFirst)
+ {
}
- [MonoTODO]
public DesignerVerb (string text, EventHandler handler, CommandID
startCommandID)
: base (handler, startCommandID) {
- throw new NotImplementedException ();
+ this.description = text;
}
- [MonoTODO]
public string Text
{
get {
- throw new NotImplementedException ();
+ return this.description;
}
}
- [MonoTODO]
public override string ToString()
{
- throw new NotImplementedException ();
+ return string.Concat (description, base.ToString ());
}
}
}
Index: DesignerVerbCollection.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/DesignerVerbCollection.c
s,v
retrieving revision 1.1
diff -u -r1.1 DesignerVerbCollection.cs
--- DesignerVerbCollection.cs 30 Nov 2002 17:37:00 -0000 1.1
+++ DesignerVerbCollection.cs 12 Jun 2003 18:57:37 -0000
@@ -1,9 +1,12 @@
+//
// System.ComponentModel.Design.DesignerVerbCollection.cs
//
// Author:
// Alejandro Sánchez Acosta <raciel at es.gnu.org>
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) Alejandro Sánchez Acosta
+// (C) 2003 Andreas Nahr
//
using System.Collections;
@@ -14,98 +17,87 @@
[ComVisible(true)]
public class DesignerVerbCollection : CollectionBase
{
- [MonoTODO]
public DesignerVerbCollection(){
- throw new NotImplementedException ();
}
- [MonoTODO]
public DesignerVerbCollection (DesignerVerb[] value){
- throw new NotImplementedException ();
+ InnerList.AddRange (value);
}
- [MonoTODO]
public DesignerVerb this[int index]
{
get {
- throw new NotImplementedException ();
+ return (DesignerVerb) InnerList[index];
}
set {
- throw new NotImplementedException ();
+ InnerList[index] = value;
}
}
- [MonoTODO]
public int Add (DesignerVerb value)
{
- throw new NotImplementedException ();
+ return InnerList.Add ( value);
}
- [MonoTODO]
public void AddRange (DesignerVerb[] value)
{
- throw new NotImplementedException ();
+ InnerList.AddRange (value);
}
- [MonoTODO]
+ public void AddRange (DesignerVerbCollection value)
+ {
+ InnerList.AddRange (value);
+ }
+
public bool Contains (DesignerVerb value)
{
- throw new NotImplementedException ();
+ return InnerList.Contains (value);
}
- [MonoTODO]
public void CopyTo (DesignerVerb[] array, int index)
{
- throw new NotImplementedException ();
+ InnerList.CopyTo (array, index);
}
- [MonoTODO]
public int IndexOf (DesignerVerb value)
{
- throw new NotImplementedException ();
+ return InnerList.IndexOf (value);
}
- [MonoTODO]
public void Insert (int index, DesignerVerb value)
{
- throw new NotImplementedException ();
+ InnerList.Insert (index, value);
}
- [MonoTODO]
protected override void OnClear()
{
- throw new NotImplementedException ();
+ // Cannot think of anything we would need to do here - probably
nothing
}
- [MonoTODO]
protected override void OnInsert (int index, object value)
{
- throw new NotImplementedException ();
+ // Cannot think of anything we would need to do here - probably nothing
}
- [MonoTODO]
protected override void OnRemove (int index, object value)
{
- throw new NotImplementedException ();
+ // Cannot think of anything we would need to do here - probably nothing
}
- [MonoTODO]
protected override void OnSet(int index, object oldValue, object
newValue)
{
- throw new NotImplementedException ();
+ // Cannot think of anything we would need to do here - probably nothing
}
- [MonoTODO]
protected override void OnValidate(object value)
{
- throw new NotImplementedException ();
+ // Cannot think of anything we would need to do here - probably nothing
}
- [MonoTODO]
public void Remove (DesignerVerb value)
{
- throw new NotImplementedException ();
+ InnerList.Remove (value);
}
}
}
Index: DesigntimeLicenseContext.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/DesigntimeLicenseContext
.cs,v
retrieving revision 1.3
diff -u -r1.3 DesigntimeLicenseContext.cs
--- DesigntimeLicenseContext.cs 30 Mar 2003 20:26:48 -0000 1.3
+++ DesigntimeLicenseContext.cs 12 Jun 2003 18:57:37 -0000
@@ -1,19 +1,22 @@
//
-// System.ComponentModel.Design.DesigntimeLicenseContext
+// System.ComponentModel.Design.DesigntimeLicenseContext.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
+using System.ComponentModel;
using System.Reflection;
namespace System.ComponentModel.Design
{
public class DesigntimeLicenseContext : LicenseContext
{
- [MonoTODO]
+
public DesigntimeLicenseContext()
{
}
@@ -31,9 +34,13 @@
throw new NotImplementedException();
}
- [MonoTODO]
- ~DesigntimeLicenseContext()
- {
- }
+ public override LicenseUsageMode UsageMode
+ {
+ get
+ {
+ // It's a DesigntimeLicenseContext, isn't it
+ return LicenseUsageMode.Designtime;
+ }
+ }
}
}
Index: DesigntimeLicenseContextSerializer.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/DesigntimeLicenseContext
Serializer.cs,v
retrieving revision 1.2
diff -u -r1.2 DesigntimeLicenseContextSerializer.cs
--- DesigntimeLicenseContextSerializer.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ DesigntimeLicenseContextSerializer.cs 12 Jun 2003 18:57:37 -0000
@@ -1,10 +1,12 @@
//
-// System.ComponentModel.Design.DesigntimeLicenseContextSerializer
+// System.ComponentModel.Design.DesigntimeLicenseContextSerializer.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
using System.IO;
@@ -13,17 +15,17 @@
{
public class DesigntimeLicenseContextSerializer
{
+
+ private DesigntimeLicenseContextSerializer ()
+ {
+ }
+
[MonoTODO]
public static void Serialize (Stream o,
string cryptoKey,
DesigntimeLicenseContext context)
{
throw new NotImplementedException();
- }
-
- [MonoTODO]
- ~DesigntimeLicenseContextSerializer()
- {
}
}
}
Index: HelpContextType.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/HelpContextType.cs,v
retrieving revision 1.2
diff -u -r1.2 HelpContextType.cs
--- HelpContextType.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ HelpContextType.cs 12 Jun 2003 18:57:37 -0000
@@ -1,5 +1,5 @@
//
-// System.ComponentModel.Design.HelpContextType
+// System.ComponentModel.Design.HelpContextType.cs
//
// Authors:
// Martin Willemoes Hansen (mwh at sysrq.dk)
@@ -10,11 +10,11 @@
namespace System.ComponentModel.Design
{
[Serializable]
- public enum HelpContextType
+ public enum HelpContextType
{
- Ambient,
- Selection,
- ToolWindowSelection,
- Window,
+ Ambient = 0,
+ Selection = 2,
+ ToolWindowSelection = 3,
+ Window = 1
}
}
Index: HelpKeywordType.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/HelpKeywordType.cs,v
retrieving revision 1.2
diff -u -r1.2 HelpKeywordType.cs
--- HelpKeywordType.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ HelpKeywordType.cs 12 Jun 2003 18:57:37 -0000
@@ -1,5 +1,5 @@
//
-// System.ComponentModel.Design.HelpKeywordType
+// System.ComponentModel.Design.HelpKeywordType.cs
//
// Authors:
// Martin Willemoes Hansen (mwh at sysrq.dk)
@@ -10,10 +10,10 @@
namespace System.ComponentModel.Design
{
[Serializable]
- public enum HelpKeywordType
+ public enum HelpKeywordType
{
- F1Keyword,
- FilterKeyword,
- GeneralKeyword,
+ F1Keyword = 0,
+ FilterKeyword = 2,
+ GeneralKeyword = 1
}
}
Index: IDesignerHost.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/IDesignerHost.cs,v
retrieving revision 1.1
diff -u -r1.1 IDesignerHost.cs
--- IDesignerHost.cs 30 Nov 2002 17:37:00 -0000 1.1
+++ IDesignerHost.cs 12 Jun 2003 18:57:37 -0000
@@ -1,11 +1,15 @@
+//
// System.ComponentModel.Design.IDesignerHost.cs
//
-// Author:
+// Authors:
// Alejandro Sánchez Acosta <raciel at es.gnu.org>
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) Alejandro Sánchez Acosta
+// (C) 2003 Andreas Nahr
//
+using System.ComponentModel;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
@@ -34,6 +38,8 @@
DesignerTransaction CreateTransaction ();
DesignerTransaction CreateTransaction (string description);
+
+ void DestroyComponent (IComponent component);
IDesigner GetDesigner (IComponent component);
Index: IInheritanceService.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/IInheritanceService.cs,v
retrieving revision 1.1
diff -u -r1.1 IInheritanceService.cs
--- IInheritanceService.cs 29 Mar 2003 13:01:31 -0000 1.1
+++ IInheritanceService.cs 12 Jun 2003 18:57:38 -0000
@@ -1,5 +1,5 @@
//
-// System.ComponentModel.Design.IInheritanceService
+// System.ComponentModel.Design.IInheritanceService.cs
//
// Authors:
// Martin Willemoes Hansen (mwh at sysrq.dk)
@@ -7,12 +7,13 @@
// (C) 2003 Martin Willemoes Hansen
//
+using System.ComponentModel;
+
namespace System.ComponentModel.Design
{
- public interface IInheritanceService
+ public interface IInheritanceService
{
- void AddInheritedComponents (IComponent component,
- IContainer container);
+ void AddInheritedComponents (IComponent component, IContainer container);
InheritanceAttribute GetInheritanceAttribute (IComponent component);
}
Index: ISelectionService.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/ISelectionService.cs,v
retrieving revision 1.1
diff -u -r1.1 ISelectionService.cs
--- ISelectionService.cs 30 Nov 2002 17:37:00 -0000 1.1
+++ ISelectionService.cs 12 Jun 2003 18:57:38 -0000
@@ -1,11 +1,16 @@
+//
// System.ComponentModel.Design.ISelectionService.cs
//
-// Author:
+// Authors:
// Alejandro Sánchez Acosta <raciel at es.gnu.org>
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) Alejandro Sánchez Acosta
+// (C) 2003 Andreas Nahr
//
+using System;
+using System.Collections;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
@@ -13,6 +18,20 @@
[ComVisible(true)]
public interface ISelectionService
{
+ bool GetComponentSelected (object component);
+
+ ICollection GetSelectedComponents ();
+
+ void SetSelectedComponents (ICollection components, SelectionTypes
selectionType);
+
+ void SetSelectedComponents (ICollection components);
+
+ object PrimarySelection {get;}
+
+ int SelectionCount {get;}
+
+ event EventHandler SelectionChanged;
+ event EventHandler SelectionChanging;
}
}
Index: ITypeResolutionService.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/ITypeResolutionService.c
s,v
retrieving revision 1.2
diff -u -r1.2 ITypeResolutionService.cs
--- ITypeResolutionService.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ ITypeResolutionService.cs 12 Jun 2003 18:57:38 -0000
@@ -1,10 +1,12 @@
//
-// System.ComponentModel.Design.ITypeResolutionService
+// System.ComponentModel.Design.ITypeResolutionService.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
using System.Reflection;
@@ -18,6 +20,7 @@
string GetPathOfAssembly (AssemblyName name);
Type GetType (string name);
Type GetType (string name, bool throwOnError);
+ Type GetType (string name, bool throwOnError, bool ignoreCase);
void ReferenceAssembly (AssemblyName name);
}
}
Index: MenuCommand.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/MenuCommand.cs,v
retrieving revision 1.1
diff -u -r1.1 MenuCommand.cs
--- MenuCommand.cs 30 Nov 2002 17:37:00 -0000 1.1
+++ MenuCommand.cs 12 Jun 2003 18:57:39 -0000
@@ -1,9 +1,12 @@
+//
// System.ComponentModel.Design.MenuCommand.cs
//
// Author:
// Alejandro Sánchez Acosta <raciel at es.gnu.org>
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) Alejandro Sánchez Acosta
+// (C) 2003 Andreas Nahr
//
using System.Runtime.InteropServices;
@@ -13,95 +16,109 @@
[ComVisible(true)]
public class MenuCommand
{
- [MonoTODO]
+
+ private EventHandler handler;
+ private CommandID command;
+ private int olestat = 3;
+ private bool ischecked = false;
+ private bool enabled = true;
+ private bool issupported = true;
+ private bool visible = true;
+
public MenuCommand (EventHandler handler, CommandID command) {
- throw new NotImplementedException ();
+ this.handler = handler;
+ this.command = command;
}
- [MonoTODO]
public virtual bool Checked
{
get {
- throw new NotImplementedException ();
+ return ischecked;
}
set {
- throw new NotImplementedException ();
+ ischecked = value;
}
}
- [MonoTODO]
public virtual CommandID CommandID
{
get {
- throw new NotImplementedException ();
+ return command;
}
}
- [MonoTODO]
public virtual bool Enabled
{
get {
- throw new NotImplementedException ();
+ return enabled;
}
set {
- throw new NotImplementedException ();
+ enabled = value;
}
}
- [MonoTODO]
public virtual int OleStatus
{
get {
- throw new NotImplementedException ();
+ return olestat;
}
-
- set {
- throw new NotImplementedException ();
- }
}
- [MonoTODO]
public virtual bool Supported
{
get {
- throw new NotImplementedException ();
+ return issupported;
}
set {
- throw new NotImplementedException ();
+ issupported = value;
}
}
- [MonoTODO]
public virtual bool Visible
{
get {
- throw new NotImplementedException ();
+ return visible;
}
set {
- throw new NotImplementedException ();
+ visible = value;
}
}
[MonoTODO]
public virtual void Invoke()
{
+ // FIXME this should probably invoke the handler somwhow, but
I'm not sure what it should do
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual void OnCommandChanged (EventArgs e)
{
+ // FIXME ?? does what ??
throw new NotImplementedException ();
}
- [MonoTODO]
public override string ToString()
{
- throw new NotImplementedException ();
+ // MS runtime produces a NullReferenceException here if
CommandID == null
+ // which I guess isn't a good idea (throwing exceptions in
ToStrings???) - bug in MS??
+ string commandpart = "";
+ if (command != null)
+ commandpart = command.ToString ();
+ commandpart = string.Concat (commandpart, " : ");
+ if (this.Supported)
+ commandpart = string.Concat (commandpart, "Supported");
+ if (this.Enabled)
+ commandpart = string.Concat (commandpart, "|Enabled");
+ if (this.Visible)
+ commandpart = string.Concat (commandpart, "|Visible");
+ if (this.Checked)
+ commandpart = string.Concat (commandpart, "|Checked");
+ return commandpart;
}
public event EventHandler CommandChanged;
Index: SelectionTypes.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/SelectionTypes.cs,v
retrieving revision 1.2
diff -u -r1.2 SelectionTypes.cs
--- SelectionTypes.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ SelectionTypes.cs 12 Jun 2003 18:57:39 -0000
@@ -1,5 +1,5 @@
//
-// System.ComponentModel.Design.SelectionTypes
+// System.ComponentModel.Design.SelectionTypes.cs
//
// Authors:
// Martin Willemoes Hansen (mwh at sysrq.dk)
@@ -16,11 +16,11 @@
[ComVisible(true)]
public enum SelectionTypes
{
- Click,
- MouseDown,
- MouseUp,
- Normal,
- Replace,
- Valid,
+ Click = 16,
+ MouseDown = 4,
+ MouseUp = 8,
+ Normal = 1,
+ Replace = 2,
+ Valid = 31
}
}
Index: ServiceContainer.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/ServiceContainer.cs,v
retrieving revision 1.2
diff -u -r1.2 ServiceContainer.cs
--- ServiceContainer.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ ServiceContainer.cs 12 Jun 2003 18:57:39 -0000
@@ -1,25 +1,32 @@
//
-// System.ComponentModel.Design.ServiceContainer
+// System.ComponentModel.Design.ServiceContainer.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
+using System.Collections;
+
namespace System.ComponentModel.Design
{
public sealed class ServiceContainer : IServiceContainer,
IServiceProvider
{
- [MonoTODO]
+
+ IServiceProvider parentProvider;
+
public ServiceContainer()
+ : this (null)
{
}
- [MonoTODO]
public ServiceContainer (IServiceProvider parentProvider)
{
+ this.parentProvider = parentProvider;
}
[MonoTODO]
@@ -65,15 +72,10 @@
throw new NotImplementedException();
}
- [MonoTODO]
+ [MonoTODO]
public object GetService (Type serviceType)
{
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- ~ServiceContainer()
- {
+ throw new NotImplementedException();
}
}
}
Index: StandardCommands.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/StandardCommands.cs,v
retrieving revision 1.2
diff -u -r1.2 StandardCommands.cs
--- StandardCommands.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ StandardCommands.cs 12 Jun 2003 18:57:40 -0000
@@ -1,10 +1,12 @@
//
-// System.ComponentModel.Design.StandardCommands
+// System.ComponentModel.Design.StandardCommands.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
namespace System.ComponentModel.Design
@@ -65,13 +67,91 @@
public static readonly CommandID VertSpaceMakeEqual;
public static readonly CommandID ViewGrid;
- [MonoTODO]
- public StandardCommands()
- {
- }
+ static StandardCommands()
+ {
+ // It seems that all static commands use this Guid values in MS
impl
+ Guid guidA = new Guid("5efc7975-14bc-11cf-9b2b-00aa00573819");
+ Guid guidB = new Guid("74d21313-2aee-11d1-8bfb-00a0c90f26f7");
+
+ // got command IDs by looking at
StandardCommands.AlignBottom.ToString in MS impl
+ AlignBottom = new CommandID (guidA, 1);
+ AlignHorizontalCenters = new CommandID (guidA, 2);
+ AlignLeft = new CommandID (guidA, 3);
+ AlignRight = new CommandID (guidA, 4);
+ AlignToGrid = new CommandID (guidA, 5);
+ AlignTop = new CommandID (guidA, 6);
+ AlignVerticalCenters = new CommandID (guidA, 7);
+ ArrangeBottom = new CommandID (guidA, 8);
+
+ ArrangeIcons = new CommandID (guidB, 12298);
+
+ ArrangeRight = new CommandID (guidA, 9);
+ BringForward = new CommandID (guidA, 10);
+ BringToFront = new CommandID (guidA, 11);
+ CenterHorizontally = new CommandID (guidA, 12);
+ CenterVertically = new CommandID (guidA, 13);
+
+ Copy = new CommandID (guidA, 15);
+ Cut = new CommandID (guidA, 16);
+ Delete = new CommandID (guidA, 17);
+
+ F1Help = new CommandID (guidA, 377);
+
+ Group = new CommandID (guidA, 20);
+ HorizSpaceConcatenate = new CommandID (guidA, 21);
+ HorizSpaceDecrease = new CommandID (guidA, 22);
+ HorizSpaceIncrease = new CommandID (guidA, 23);
+ HorizSpaceMakeEqual = new CommandID (guidA, 24);
+
+ LineupIcons = new CommandID (guidB, 12299);
+
+ LockControls = new CommandID (guidA, 369);
+
+ MultiLevelRedo = new CommandID (guidA, 30);
+
+ MultiLevelUndo = new CommandID (guidA, 44);
+
+ Paste = new CommandID (guidA, 26);
+ Properties = new CommandID (guidA, 28);
+
+ PropertiesWindow = new CommandID (guidA, 235);
- [MonoTODO]
- ~StandardCommands()
+ Redo = new CommandID (guidA, 29);
+
+ Replace = new CommandID (guidA, 230);
+
+ SelectAll = new CommandID (guidA, 31);
+ SendBackward = new CommandID (guidA, 32);
+ SendToBack = new CommandID (guidA, 33);
+
+ ShowGrid = new CommandID (guidA, 103);
+
+ ShowLargeIcons = new CommandID (guidB, 12300);
+
+ SizeToControl = new CommandID (guidA, 35);
+ SizeToControlHeight = new CommandID (guidA, 36);
+ SizeToControlWidth = new CommandID (guidA, 37);
+ SizeToFit = new CommandID (guidA, 38);
+ SizeToGrid = new CommandID (guidA, 39);
+ SnapToGrid = new CommandID (guidA, 40);
+ TabOrder = new CommandID (guidA, 41);
+
+ Undo = new CommandID (guidA, 43);
+
+ Ungroup = new CommandID (guidA, 45);
+
+ VerbFirst = new CommandID (guidB, 8192);
+ VerbLast = new CommandID (guidB, 8448);
+
+ VertSpaceConcatenate = new CommandID (guidA, 46);
+ VertSpaceDecrease = new CommandID (guidA, 47);
+ VertSpaceIncrease = new CommandID (guidA, 48);
+ VertSpaceMakeEqual = new CommandID (guidA, 49);
+
+ ViewGrid = new CommandID (guidA, 125);
+ }
+
+ public StandardCommands()
{
}
}
Index: StandardToolWindows.cs
===================================================================
RCS file:
/mono/mcs/class/System/System.ComponentModel.Design/StandardToolWindows.cs,v
retrieving revision 1.2
diff -u -r1.2 StandardToolWindows.cs
--- StandardToolWindows.cs 29 Mar 2003 17:37:14 -0000 1.2
+++ StandardToolWindows.cs 12 Jun 2003 18:57:40 -0000
@@ -1,32 +1,28 @@
//
-// System.ComponentModel.Design
+// System.ComponentModel.Design.StandardToolWindows.cs
//
// Authors:
-// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Martin Willemoes Hansen (mwh at sysrq.dk)
+// Andreas Nahr (ClassDevelopment at A-SoftTech.com)
//
// (C) 2003 Martin Willemoes Hansen
+// (C) 2003 Andreas Nahr
//
namespace System.ComponentModel.Design
{
public class StandardToolWindows
{
- public static readonly Guid ObjectBrowser;
- public static readonly Guid OutputWindow;
- public static readonly Guid ProjectExplorer;
- public static readonly Guid PropertyBrowser;
- public static readonly Guid RelatedLinks;
- public static readonly Guid ServerExplorer;
- public static readonly Guid TaskList;
- public static readonly Guid Toolbox;
+ public static readonly Guid ObjectBrowser = new Guid
("970d9861-ee83-11d0-a778-00a0c91110c3");
+ public static readonly Guid OutputWindow = new Guid
("34e76e81-ee4a-11d0-ae2e-00a0c90fffc3");
+ public static readonly Guid ProjectExplorer = new Guid
("3ae79031-e1bc-11d0-8f78-00a0c9110057");
+ public static readonly Guid PropertyBrowser = new Guid
("eefa5220-e298-11d0-8f78-00a0c9110057");
+ public static readonly Guid RelatedLinks = new Guid
("66dba47c-61df-11d2-aa79-00c04f990343");
+ public static readonly Guid ServerExplorer = new Guid
("74946827-37a0-11d2-a273-00c04f8ef4ff");
+ public static readonly Guid TaskList = new Guid
("4a9b7e51-aa16-11d0-a8c5-00a0c921a4d2");
+ public static readonly Guid Toolbox = new Guid
("b1e99781-ab81-11d0-b683-00aa00a3ee26");
- [MonoTODO]
public StandardToolWindows()
- {
- }
-
- [MonoTODO]
- ~StandardToolWindows()
{
}
}
More information about the Mono-devel-list
mailing list