+++ /dev/null
-// AbstractClassStructDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Reflection;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public abstract class AbstractClassStructDoc : AbstractTypeDoc\r
- {\r
- protected ValueConstrainedArrayList constructors = new ValueConstrainedArrayList(typeof(ConstructorDoc));\r
- protected ValueConstrainedArrayList events = new ValueConstrainedArrayList(typeof(EventDoc));\r
- protected ValueConstrainedArrayList fields = new ValueConstrainedArrayList(typeof(FieldDoc));\r
- protected ValueConstrainedArrayList methods = new ValueConstrainedArrayList(typeof(MethodDoc));\r
- protected ValueConstrainedArrayList operators = new ValueConstrainedArrayList(typeof(OperatorDoc));\r
- protected ValueConstrainedArrayList properties = new ValueConstrainedArrayList(typeof(PropertyDoc));\r
-\r
- // nested items\r
- protected ValueConstrainedArrayList classes = new ValueConstrainedArrayList(typeof(ClassDoc));\r
- protected ValueConstrainedArrayList delegates = new ValueConstrainedArrayList(typeof(DelegateDoc));\r
- protected ValueConstrainedArrayList enums = new ValueConstrainedArrayList(typeof(EnumDoc));\r
- protected ValueConstrainedArrayList interfaces = new ValueConstrainedArrayList(typeof(InterfaceDoc));\r
- protected ValueConstrainedArrayList structs = new ValueConstrainedArrayList(typeof(StructDoc));\r
-\r
- public AbstractClassStructDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public AbstractClassStructDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public AbstractClassStructDoc(Type t, AssemblyLoader loader) : base(t, loader)\r
- {\r
- // constructors\r
- foreach (ConstructorInfo cons in loader.GetConstructors(t))\r
- {\r
- this.Constructors.Add(new ConstructorDoc(cons, loader));\r
- }\r
-\r
- // events\r
- foreach (EventInfo ev in loader.GetEvents(t))\r
- {\r
- this.Events.Add(new EventDoc(ev, loader));\r
- }\r
-\r
- // fields\r
- foreach (FieldInfo field in loader.GetFields(t))\r
- {\r
- this.Fields.Add(new FieldDoc(TypeNameHelper.GetName(field)));\r
- }\r
-\r
- // methods\r
- foreach (MethodInfo m in loader.GetMethods(t))\r
- {\r
- this.Methods.Add(new MethodDoc(m, loader));\r
- }\r
-\r
- // operators\r
- foreach (MethodInfo o in loader.GetOperators(t))\r
- {\r
- this.Operators.Add(new OperatorDoc(o, loader));\r
- }\r
-\r
- // properties\r
- foreach (PropertyInfo prop in loader.GetProperties(t))\r
- {\r
- this.Properties.Add(new PropertyDoc(prop, loader));\r
- }\r
-\r
- // TODO: nested types\r
- }\r
-\r
- [XmlElement(ElementName = "constructor", Type = typeof(ConstructorDoc))]\r
- public ValueConstrainedArrayList Constructors\r
- {\r
- get { return this.constructors; }\r
- }\r
-\r
- [XmlElement(ElementName = "event", Type = typeof(EventDoc))]\r
- public ValueConstrainedArrayList Events\r
- {\r
- get { return this.events; }\r
- }\r
-\r
- [XmlElement(ElementName = "field", Type = typeof(FieldDoc))]\r
- public ValueConstrainedArrayList Fields\r
- {\r
- get { return this.fields; }\r
- }\r
-\r
- [XmlElement(ElementName = "method", Type = typeof(MethodDoc))]\r
- public ValueConstrainedArrayList Methods\r
- {\r
- get { return this.methods; }\r
- }\r
-\r
- [XmlElement(ElementName = "operator", Type = typeof(OperatorDoc))]\r
- public ValueConstrainedArrayList Operators\r
- {\r
- get { return this.operators; }\r
- }\r
-\r
- [XmlElement(ElementName = "property", Type = typeof(PropertyDoc))]\r
- public ValueConstrainedArrayList Properties\r
- {\r
- get { return this.properties; }\r
- }\r
-\r
- [XmlElement(ElementName = "class", Type = typeof(ClassDoc))]\r
- public ValueConstrainedArrayList Classes\r
- {\r
- get { return this.classes; }\r
- }\r
-\r
- [XmlElement(ElementName = "delegate", Type = typeof(DelegateDoc))]\r
- public ValueConstrainedArrayList Delegates\r
- {\r
- get { return this.delegates; }\r
- }\r
-\r
- [XmlElement(ElementName = "enum", Type = typeof(EnumDoc))]\r
- public ValueConstrainedArrayList Enums\r
- {\r
- get { return this.enums; }\r
- }\r
-\r
- [XmlElement(ElementName = "interface", Type = typeof(InterfaceDoc))]\r
- public ValueConstrainedArrayList Interfaces\r
- {\r
- get { return this.interfaces; }\r
- }\r
-\r
- [XmlElement(ElementName = "struct", Type = typeof(StructDoc))]\r
- public ValueConstrainedArrayList Structs\r
- {\r
- get { return this.structs; }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// AbstractDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Collections.Specialized;\r
-using System.Reflection;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public abstract class AbstractDoc\r
- {\r
- protected string name;\r
- protected string summary;\r
- protected string remarks;\r
- protected StringCollection seeAlso;\r
-\r
- public static readonly string TODO = "Documentation forthcoming.";\r
-\r
- public AbstractDoc(string name)\r
- {\r
- this.name = name;\r
- this.summary = string.Empty;\r
- this.remarks = string.Empty;\r
- this.seeAlso = new StringCollection();\r
- }\r
-\r
- public AbstractDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public AbstractDoc(MemberInfo m, AssemblyLoader loader) : this(TypeNameHelper.GetName(m))\r
- {\r
- this.summary = AbstractDoc.TODO;\r
- this.remarks = AbstractDoc.TODO;\r
- }\r
-\r
- [XmlElement(ElementName = "summary")]\r
- public string Summary\r
- {\r
- get { return this.summary; }\r
- set { this.summary = value; }\r
- }\r
-\r
- [XmlElement(ElementName = "remarks")]\r
- public string Remarks\r
- {\r
- get { return this.remarks; }\r
- set { this.remarks = value; }\r
- }\r
-\r
- [XmlAttribute(AttributeName = "name")]\r
- public string Name\r
- {\r
- get { return this.name; }\r
- set { this.name = value; }\r
- }\r
-\r
- [XmlElement(ElementName = "seealso")]\r
- public StringCollection SeeAlso\r
- {\r
- get { return this.seeAlso; }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// AbstractMethodOperatorDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Reflection;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public abstract class AbstractMethodOperatorDoc : AbstractDoc\r
- {\r
- protected ValueConstrainedArrayList exceptions = new ValueConstrainedArrayList(typeof(ExceptionDoc));\r
- protected ValueConstrainedArrayList parameters = new ValueConstrainedArrayList(typeof(ParameterDoc));\r
- protected string returns = string.Empty;\r
-\r
- public AbstractMethodOperatorDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public AbstractMethodOperatorDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public AbstractMethodOperatorDoc(MethodInfo m, AssemblyLoader loader) : base(m, loader)\r
- {\r
- foreach (ParameterInfo param in m.GetParameters())\r
- {\r
- this.Parameters.Add(new ParameterDoc(param.Name, AbstractDoc.TODO));\r
- }\r
-\r
- this.Returns = AbstractDoc.TODO;\r
- }\r
-\r
- [XmlElement(ElementName = "exception", Type = typeof(ExceptionDoc))]\r
- public ValueConstrainedArrayList Exceptions\r
- {\r
- get { return this.exceptions; }\r
- }\r
-\r
- [XmlElement(ElementName = "param", Type = typeof(ParameterDoc))]\r
- public ValueConstrainedArrayList Parameters\r
- {\r
- get { return this.parameters; }\r
- }\r
-\r
- [XmlElement(ElementName = "returns")]\r
- public string Returns\r
- {\r
- get { return this.returns; }\r
- set { this.returns = value; }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// AbstractTypeDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public abstract class AbstractTypeDoc : AbstractDoc\r
- {\r
- protected string assembly;\r
-\r
- public AbstractTypeDoc(string name) : base(name)\r
- {\r
- this.assembly = string.Empty;\r
- }\r
-\r
- public AbstractTypeDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public AbstractTypeDoc(Type t, AssemblyLoader loader) : base(t, loader)\r
- {\r
- this.assembly = t.Assembly.GetName().Name;\r
- }\r
-\r
- [XmlAttribute(AttributeName = "assembly")]\r
- public string Assembly\r
- {\r
- get { return this.assembly; }\r
- set { this.assembly = value; }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// AssemblyInfo.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System.Reflection;\r
-using System.Runtime.CompilerServices;\r
-\r
-//\r
-// General Information about an assembly is controlled through the following \r
-// set of attributes. Change these attribute values to modify the information\r
-// associated with an assembly.\r
-//\r
-[assembly: AssemblyTitle("")]\r
-[assembly: AssemblyDescription("")]\r
-[assembly: AssemblyConfiguration("")]\r
-[assembly: AssemblyCompany("")]\r
-[assembly: AssemblyProduct("")]\r
-[assembly: AssemblyCopyright("")]\r
-[assembly: AssemblyTrademark("")]\r
-[assembly: AssemblyCulture("")] \r
-\r
-//\r
-// Version information for an assembly consists of the following four values:\r
-//\r
-// Major Version\r
-// Minor Version \r
-// Build Number\r
-// Revision\r
-//\r
-// You can specify all the values or you can default the Revision and Build Numbers \r
-// by using the '*' as shown below:\r
-\r
-[assembly: AssemblyVersion("1.0.*")]\r
-\r
-//\r
-// In order to sign your assembly you must specify a key to use. Refer to the \r
-// Microsoft .NET Framework documentation for more information on assembly signing.\r
-//\r
-// Use the attributes below to control which key is used for signing. \r
-//\r
-// Notes: \r
-// (*) If no key is specified, the assembly is not signed.\r
-// (*) KeyName refers to a key that has been installed in the Crypto Service\r
-// Provider (CSP) on your machine. KeyFile refers to a file which contains\r
-// a key.\r
-// (*) If the KeyFile and the KeyName values are both specified, the \r
-// following processing occurs:\r
-// (1) If the KeyName can be found in the CSP, that key is used.\r
-// (2) If the KeyName does not exist and the KeyFile does exist, the key \r
-// in the KeyFile is installed into the CSP and used.\r
-// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.\r
-// When specifying the KeyFile, the location of the KeyFile should be\r
-// relative to the project output directory which is\r
-// %Project Directory%\obj\<configuration>. For example, if your KeyFile is\r
-// located in the project directory, you would specify the AssemblyKeyFile \r
-// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]\r
-// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework\r
-// documentation for more information on this.\r
-//\r
-[assembly: AssemblyDelaySign(false)]\r
-[assembly: AssemblyKeyFile("")]\r
-[assembly: AssemblyKeyName("")]\r
+++ /dev/null
-// AssemblyLoader.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// Adam Treat (manyoso@yahoo.com)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-// Copyright (c) 2002 Adam Treat\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Collections;\r
-using System.IO;\r
-using System.Reflection;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public class AssemblyLoader\r
- {\r
- #region Instance Fields\r
-\r
- private Assembly assem;\r
-\r
- #endregion // Instance Fields\r
-\r
- #region Constructors and Destructors\r
-\r
- // TODO: add a constructor that allows specification of type and member visibility\r
- public AssemblyLoader(string fileName)\r
- {\r
- if (!File.Exists(fileName))
- {
- throw new ApplicationException(
- "Cannot find assembly file: " + fileName
- );
- }
-
- FileStream fs = File.Open(fileName, FileMode.Open, FileAccess.Read);
- byte[] buffer = new byte[fs.Length];
- fs.Read(buffer, 0, (int)fs.Length);
- fs.Close();
-
- assem = Assembly.Load(buffer);
- }\r
-\r
- #endregion // Constructors and Destructors\r
-\r
- #region Private Instance Methods\r
-\r
- // TODO: visibility should be configurable in constructor
- private bool MustDocumentType(Type type)
- {
- if (type != null) \r
- {
- return ((type.IsPublic ||
- type.IsNestedPublic) &&
- !type.FullName.Equals("Driver") &&
- !type.FullName.Equals("Profile")
- );
- } \r
-
- return false;
- }\r
-\r
- // TODO: visibility should be configurable in constructor
- private bool MustDocumentMethod(MethodBase method)
- {
- return (method.IsPublic);
- }
-
- // TODO: visibility should be configurable in constructor
- private bool MustDocumentField(FieldInfo field)
- {
- return (field.IsPublic);
- }
-\r
- private bool IsAlsoAnEvent(Type type, string fullName)
- {
- bool isEvent = false;
-
- BindingFlags bindingFlags =
- BindingFlags.Instance |
- BindingFlags.Static |
- BindingFlags.Public |
- BindingFlags.NonPublic |
- BindingFlags.DeclaredOnly;
-
- foreach (EventInfo eventInfo in type.GetEvents(bindingFlags)) \r
- {
-
- if (eventInfo.EventHandlerType.FullName == fullName) \r
- {
-
- isEvent = true;
- break;
- }
- }
-
- return isEvent;
- }
-
- private bool IsAlsoAnEvent(FieldInfo field)
- {
- return IsAlsoAnEvent(field.DeclaringType, field.FieldType.FullName);
- }
-
- private bool IsAlsoAnEvent(PropertyInfo property)
- {
- return IsAlsoAnEvent(property.DeclaringType, property.PropertyType.FullName);
- }
-\r
- #endregion // Private Instance Methods\r
-\r
- #region Public Static Methods\r
-\r
- public static bool IsClass(Type t)\r
- {\r
- return (t.IsClass && !IsDelegate(t)) ? true : false;\r
- }\r
-\r
- public static bool IsDelegate(Type t)\r
- {\r
- return t.BaseType.FullName == "System.Delegate" ||
- t.BaseType.FullName == "System.MulticastDelegate";
- }\r
-\r
- public static bool IsStruct(Type t)\r
- {\r
- return (t.IsValueType && !t.IsEnum) ? true : false;\r
- }\r
-\r
- #endregion\r
-\r
- #region Public Instance Methods\r
-\r
- public Type[] GetTypes()
- {
- ArrayList list = new ArrayList();
-\r
- foreach (Module m in assem.GetModules())\r
- {\r
- Type[] moduleTypes = m.GetTypes();
-\r
- foreach (Type type in moduleTypes) \r
- {
- if (MustDocumentType(type)) \r
- {
- list.Add(type);
- }
- }
- }
-
- Type[] types = new Type[list.Count];
- int i = 0;
- \r
- foreach (Type type in list) \r
- {
- types[i++] = type;
- }
-
- return types;
- }
-
- public ConstructorInfo[] GetConstructors(Type t)
- {
- // TODO: should be configurable in constructor
- BindingFlags bindingFlags =
- BindingFlags.Instance |
- BindingFlags.Public |
- BindingFlags.NonPublic ;
-
- ArrayList ctorList = new ArrayList();
-
- foreach (ConstructorInfo ctor in t.GetConstructors(bindingFlags))
- {
- if (MustDocumentMethod(ctor))
- {
- ctorList.Add(ctor);
- }
- }
-
- ConstructorInfo[] constructors = new ConstructorInfo[ctorList.Count];
- int i = 0;
-
- foreach (ConstructorInfo c in ctorList)
- {
- constructors[i++] = c;
- }
-
- return constructors;
- }
-
- public FieldInfo[] GetFields(Type t)
- {
- // TODO: should be configurable in constructor
- BindingFlags bindingFlags =
- BindingFlags.Instance |
- BindingFlags.Static |
- BindingFlags.Public |
- BindingFlags.NonPublic ;
-
- ArrayList fieldList = new ArrayList();
-
- foreach (FieldInfo field in t.GetFields(bindingFlags))
- {
- if (MustDocumentField(field))
- {
- fieldList.Add(field);
- }
- }
-
- FieldInfo[] fields = new FieldInfo[fieldList.Count];
- int i = 0;
-
- foreach (FieldInfo f in fieldList)
- {
- fields[i++] = f;
- }
-
- return fields;
- }
-
- public PropertyInfo[] GetProperties(Type t)
- {
- // TODO: should be configurable in constructor
- BindingFlags bindingFlags =
- BindingFlags.Instance |
- BindingFlags.Static |
- BindingFlags.Public |
- BindingFlags.NonPublic ;
-
- ArrayList propertyList = new ArrayList();
-
- foreach (PropertyInfo property in t.GetProperties(bindingFlags))
- {
- bool hasAccessor = (property.GetGetMethod(true) != null);
- bool hasMutator = (property.GetSetMethod(true) != null);
-
- if ((hasAccessor || hasMutator) && !IsAlsoAnEvent(property))
- {
- propertyList.Add(property);
- }
- }
-
- PropertyInfo[] properties = new PropertyInfo[propertyList.Count];
- int i = 0;
-
- foreach (PropertyInfo p in propertyList)
- {
- properties[i++] = p;
- }
-
- return properties;
- }
-
- public MethodInfo[] GetMethods(Type t)
- {
- // TODO: should be configurable in constructor
- BindingFlags bindingFlags =
- BindingFlags.Instance |
- BindingFlags.Static |
- BindingFlags.Public |
- BindingFlags.NonPublic ;
-
- ArrayList methodList = new ArrayList();
-
- foreach (MethodInfo method in t.GetMethods(bindingFlags))
- {
- if (!(method.Name.StartsWith("get_")) &&
- !(method.Name.StartsWith("set_")) &&
- !(method.Name.StartsWith("add_")) &&
- !(method.Name.StartsWith("remove_")) &&
- !(method.Name.StartsWith("op_")) &&
- MustDocumentMethod(method))
- {
- methodList.Add(method);
- }
- }
-
- MethodInfo[] methods = new MethodInfo[methodList.Count];
- int i = 0;
-
- foreach (MethodInfo m in methodList)
- {
- methods[i++] = m;
- }
-
- return methods;
- }
-
- public MethodInfo[] GetOperators(Type t)
- {
- // TODO: should be configurable in constructor
- BindingFlags bindingFlags =
- BindingFlags.Instance |
- BindingFlags.Static |
- BindingFlags.Public |
- BindingFlags.NonPublic ;
-
- ArrayList operatorList = new ArrayList();
-
- foreach (MethodInfo operatorMethod in t.GetMethods(bindingFlags))
- {
- if (operatorMethod.Name.StartsWith("op_") && MustDocumentMethod(operatorMethod))
- {
- operatorList.Add(operatorMethod);
- }
- }
-
- MethodInfo[] operators = new MethodInfo[operatorList.Count];
- int i = 0;
-
- foreach (MethodInfo m in operatorList)
- {
- operators[i++] = m;
- }
-
- return operators;
- }
-
- public EventInfo[] GetEvents(Type t)
- {
- // TODO: should be configurable in constructor
- BindingFlags bindingFlags =
- BindingFlags.Instance |
- BindingFlags.Static |
- BindingFlags.Public |
- BindingFlags.NonPublic |
- BindingFlags.DeclaredOnly;
-
- ArrayList eventList = new ArrayList();
-
- foreach (EventInfo eventInfo in t.GetEvents(bindingFlags)) \r
- {
-
- MethodInfo addMethod = eventInfo.GetAddMethod(true);
-
- if (addMethod != null && MustDocumentMethod(addMethod)) \r
- {
- eventList.Add(eventInfo);
- }
- }
-
- EventInfo[] events = new EventInfo[eventList.Count];
- int i = 0;
-
- foreach (EventInfo e in eventList)
- {
- events[i++] = e;
- }
-
- return events;
- }
-
- #endregion // Public Instance Methods
-
- #region Public Instance Properties
-
- public Assembly Assembly
- {
- get { return assem; }
- }
-
- #endregion // Public Instance Properties
- }\r
-}\r
+++ /dev/null
-// ClassDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
-\r
- [XmlType(TypeName = "class")]\r
- public class ClassDoc : AbstractClassStructDoc\r
- {\r
- public ClassDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public ClassDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public ClassDoc(Type t, AssemblyLoader loader) : base(t, loader)\r
- {\r
- // TODO: type-checking should happen before the base ctor call.\r
- if (!t.IsClass)\r
- {\r
- throw new ArgumentException("Type must be a class.", "t");\r
- }\r
- }\r
-\r
- public override string ToString()\r
- {\r
- return "[ClassDoc " + this.Name + "]";\r
- }\r
- }\r
-}\r
+++ /dev/null
-// ConstructorDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Collections.Specialized;\r
-using System.Reflection;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- [XmlType(TypeName = "constructor")]\r
- public class ConstructorDoc : AbstractDoc\r
- {\r
- private ValueConstrainedArrayList exceptions = new ValueConstrainedArrayList(typeof(ExceptionDoc));\r
- private ValueConstrainedArrayList parameters = new ValueConstrainedArrayList(typeof(ParameterDoc));\r
-\r
- public ConstructorDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public ConstructorDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public ConstructorDoc(ConstructorInfo cons, AssemblyLoader loader) : base(cons, loader)\r
- {\r
- // parameters\r
- foreach (ParameterInfo param in cons.GetParameters())\r
- {\r
- this.Parameters.Add(new ParameterDoc(param.Name, AbstractDoc.TODO));\r
- }\r
- }\r
-\r
- [XmlElement(ElementName = "exception", Type = typeof(ExceptionDoc))]\r
- public ValueConstrainedArrayList Exceptions\r
- {\r
- get { return this.exceptions; }\r
- }\r
-\r
- [XmlElement(ElementName = "param", Type = typeof(ParameterDoc))]\r
- public ValueConstrainedArrayList Parameters\r
- {\r
- get { return this.parameters; }\r
- }\r
- }\r
-}\r
+++ /dev/null
-<VisualStudioProject>\r
- <CSHARP\r
- ProjectType = "Local"\r
- ProductVersion = "7.0.9466"\r
- SchemaVersion = "1.0"\r
- ProjectGuid = "{73F5A60D-A5E3-4852-B4C6-478275E733F9}"\r
- >\r
- <Build>\r
- <Settings\r
- ApplicationIcon = ""\r
- AssemblyKeyContainerName = ""\r
- AssemblyName = "Mono.Doc.Core"\r
- AssemblyOriginatorKeyFile = ""\r
- DefaultClientScript = "JScript"\r
- DefaultHTMLPageLayout = "Grid"\r
- DefaultTargetSchema = "IE50"\r
- DelaySign = "false"\r
- OutputType = "Library"\r
- RootNamespace = "Mono.Doc.Core"\r
- StartupObject = ""\r
- >\r
- <Config\r
- Name = "Debug"\r
- AllowUnsafeBlocks = "false"\r
- BaseAddress = "285212672"\r
- CheckForOverflowUnderflow = "false"\r
- ConfigurationOverrideFile = ""\r
- DefineConstants = "DEBUG;TRACE"\r
- DocumentationFile = ""\r
- DebugSymbols = "true"\r
- FileAlignment = "4096"\r
- IncrementalBuild = "true"\r
- Optimize = "false"\r
- OutputPath = "..\..\build\"\r
- RegisterForComInterop = "false"\r
- RemoveIntegerChecks = "false"\r
- TreatWarningsAsErrors = "false"\r
- WarningLevel = "4"\r
- />\r
- <Config\r
- Name = "Release"\r
- AllowUnsafeBlocks = "false"\r
- BaseAddress = "285212672"\r
- CheckForOverflowUnderflow = "false"\r
- ConfigurationOverrideFile = ""\r
- DefineConstants = "TRACE"\r
- DocumentationFile = ""\r
- DebugSymbols = "false"\r
- FileAlignment = "4096"\r
- IncrementalBuild = "false"\r
- Optimize = "true"\r
- OutputPath = "..\..\build\"\r
- RegisterForComInterop = "false"\r
- RemoveIntegerChecks = "false"\r
- TreatWarningsAsErrors = "false"\r
- WarningLevel = "4"\r
- />\r
- </Settings>\r
- <References>\r
- <Reference\r
- Name = "System"\r
- AssemblyName = "System"\r
- HintPath = "D:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll"\r
- />\r
- <Reference\r
- Name = "System.Data"\r
- AssemblyName = "System.Data"\r
- HintPath = "D:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"\r
- />\r
- <Reference\r
- Name = "System.XML"\r
- AssemblyName = "System.Xml"\r
- HintPath = "D:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"\r
- />\r
- </References>\r
- </Build>\r
- <Files>\r
- <Include>\r
- <File\r
- RelPath = "AbstractClassStructDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "AbstractDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "AbstractMethodOperatorDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "AbstractTypeDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "AssemblyInfo.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "AssemblyLoader.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "ClassDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "ConstructorDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "DelegateDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "DocProject.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "EnumDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "EventDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "ExceptionDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "FieldDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "InterfaceDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "MethodDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "MonodocException.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "MonodocFile.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "NamingFlags.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "NotifyArrayList.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "NotifyCollection.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "NotifyHashtable.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "OperatorDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "ParameterDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "PropertyDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "RecursiveFileList.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "SortedStringValues.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "StructDoc.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "TypeNameHelper.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "ValueConstrainedArrayList.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- </Include>\r
- </Files>\r
- </CSHARP>\r
-</VisualStudioProject>\r
-\r
+++ /dev/null
-// DelegateDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- [XmlType(TypeName = "delegate")]\r
- public class DelegateDoc : AbstractTypeDoc\r
- {\r
- private ValueConstrainedArrayList parameters = new ValueConstrainedArrayList(typeof(ParameterDoc));\r
-\r
- public DelegateDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public DelegateDoc() : this (string.Empty)\r
- {\r
- }\r
-\r
- [XmlElement(ElementName = "param", Type = typeof(ParameterDoc))]\r
- public ValueConstrainedArrayList Parameters\r
- {\r
- get { return this.parameters; }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// DocProject.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Collections;\r
-using System.IO;\r
-using System.Text;\r
-using System.Xml;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public class DocProject\r
- {\r
- # region Public Static Fields\r
-\r
- public static string UntitledProjectName = "Untitled"; // TODO: i18n\r
-\r
- #endregion // Public Static Fields\r
-\r
- #region Private Instance Fields\r
-\r
- private ArrayList assemblyFiles;\r
- private ArrayList xmlDirectories;\r
- private Hashtable properties;\r
- private bool isModified;\r
- private bool isNewProject;\r
- private string projectFileName;\r
-\r
- #endregion // Private Instace Fields\r
-\r
- #region Public Events\r
-\r
- public event EventHandler Modified;\r
-\r
- public DocProject()\r
- {\r
- assemblyFiles = new ArrayList();\r
- xmlDirectories = new ArrayList();\r
- properties = new Hashtable();\r
- isModified = false;\r
- isNewProject = true;\r
- projectFileName = DocProject.UntitledProjectName;\r
- }\r
-\r
- #endregion // Public Events\r
-\r
- #region Public Instance Methods\r
- \r
- public void Load(string fileName)\r
- {\r
- Clear();\r
-\r
- XmlTextReader xml = null;\r
-\r
- try\r
- {\r
- StreamReader stream = new StreamReader(fileName);\r
- xml = new XmlTextReader(stream);\r
-\r
- xml.MoveToContent();\r
- xml.ReadStartElement("monodoc-project");\r
-\r
- while (xml.Read()) \r
- {\r
- if (xml.NodeType == XmlNodeType.Element)\r
- {\r
- switch (xml.Name)\r
- {\r
- case "assemblies":\r
- LoadAssemblies(xml);\r
- break;\r
- case "xmlDocs":\r
- LoadXmlDirectories(xml);\r
- break;\r
- case "properties":\r
- LoadProperties(xml);\r
- break;\r
- }\r
- }\r
- }\r
- }\r
- catch (Exception e)\r
- {\r
- // FIXME: i18n\r
- throw new MonodocException(\r
- "Problem reading project file '" + fileName + "'.\n" + e.Message, e\r
- );\r
- } \r
- finally \r
- {\r
- if (xml != null) xml.Close();\r
- }\r
-\r
-\r
- projectFileName = fileName;\r
- isModified = false;\r
- isNewProject = false;\r
- }\r
-\r
- public void Save()\r
- {\r
- Save(projectFileName);\r
- }\r
-\r
- public void Save(string fileName)\r
- {\r
- if (DocProject.UntitledProjectName == fileName)\r
- {\r
- throw new MonodocException("Cannot save untitled (default) project.");\r
- }\r
- \r
- XmlTextWriter xml = null;\r
-\r
- try\r
- {\r
- StreamWriter stream = new StreamWriter(fileName, false, new UTF8Encoding());\r
- xml = new XmlTextWriter(stream);\r
- xml.Formatting = Formatting.Indented;\r
- xml.Indentation = 4;\r
-\r
- // <monodoc-project>\r
- xml.WriteStartElement("monodoc-project");\r
-\r
- SaveAssemblies(xml);\r
- SaveXmlDirectories(xml);\r
- SaveProperties(xml);\r
-\r
- // </monodoc-project>\r
- xml.WriteEndElement();\r
-\r
- } \r
- catch (Exception e)\r
- {\r
- // TODO: i18n\r
- throw new MonodocException(\r
- "Problem saving project file '" + fileName + "'.\n" + e.Message, e\r
- );\r
- }\r
- finally\r
- {\r
- if (xml != null) xml.Close();\r
- }\r
-\r
- projectFileName = fileName;\r
- isModified = false;\r
- isNewProject = false;\r
- }\r
-\r
- public void Clear()\r
- {\r
- assemblyFiles.Clear();\r
- xmlDirectories.Clear();\r
- properties.Clear();\r
-\r
- projectFileName = DocProject.UntitledProjectName;\r
- isModified = false;\r
- isNewProject = true;\r
- }\r
- \r
- #endregion // Public Instance Methods\r
-\r
- #region Private Instance Methods\r
-\r
- private void LoadAssemblies(XmlTextReader xml)\r
- {\r
- while (xml.Read() && !(xml.NodeType == XmlNodeType.EndElement && xml.Name == "assemblies"))\r
- {\r
- if (xml.NodeType == XmlNodeType.Element && xml.Name == "assembly")\r
- {\r
- assemblyFiles.Add(xml["location"]);\r
- }\r
- }\r
- }\r
-\r
- private void LoadXmlDirectories(XmlTextReader xml)\r
- {\r
- while (xml.Read() && !(xml.NodeType == XmlNodeType.EndElement && xml.Name == "xmlDocs"))\r
- {\r
- if (xml.NodeType == XmlNodeType.Element && xml.Name == "directory")\r
- {\r
- xmlDirectories.Add(xml["location"]);\r
- }\r
- }\r
- }\r
-\r
- // TODO: this is dropping the first property, and I'm too tired to know why.\r
- private void LoadProperties(XmlTextReader xml)\r
- {\r
- while (xml.Read() && !(xml.NodeType == XmlNodeType.EndElement && xml.Name == "properties"))\r
- {\r
- if (xml.NodeType == XmlNodeType.Element && xml.Name == "property")\r
- {\r
- Console.WriteLine("project property load: {0} = '{1}'",\r
- xml["name"], xml["value"]);\r
-\r
- properties[xml["name"]] = xml["value"];\r
- }\r
- }\r
- }\r
-\r
- private void SaveAssemblies(XmlTextWriter xml)\r
- {\r
- // <assemblies>\r
- xml.WriteStartElement("assemblies");\r
-\r
- foreach (string assemblyFile in assemblyFiles)\r
- {\r
- // <assembly location="...">\r
- xml.WriteStartElement("assembly");\r
- xml.WriteAttributeString("location", assemblyFile);\r
-\r
- // </assembly>\r
- xml.WriteEndElement();\r
- }\r
-\r
- // </assemblies>\r
- xml.WriteEndElement();\r
- }\r
-\r
- private void SaveXmlDirectories(XmlTextWriter xml)\r
- {\r
- // <xmlDocs>\r
- xml.WriteStartElement("xmlDocs");\r
-\r
- foreach (string xmlDir in xmlDirectories)\r
- {\r
- // <directory location="...">\r
- xml.WriteStartElement("directory");\r
- xml.WriteAttributeString("location", xmlDir);\r
-\r
- // </directory>\r
- xml.WriteEndElement();\r
- }\r
-\r
- // </xmlDocs>\r
- xml.WriteEndElement();\r
- }\r
-\r
- private void SaveProperties(XmlTextWriter xml)\r
- {\r
- // <properties>\r
- xml.WriteStartElement("properties");\r
-\r
- foreach (string name in properties.Keys)\r
- {\r
- // <property name="..." value="...">\r
- xml.WriteStartElement("property");\r
- xml.WriteAttributeString("name", name);\r
- xml.WriteAttributeString("value", properties[name].ToString());\r
-\r
- // </property>\r
- xml.WriteEndElement();\r
- }\r
-\r
- // </properties>\r
- xml.WriteEndElement();\r
- }\r
-\r
- #endregion // Private Instance Methods\r
-\r
- #region Public Instance Properties\r
- \r
- public string FilePath\r
- {\r
- get { return projectFileName; }\r
- set { projectFileName = value; }\r
- }\r
-\r
- public bool IsModified\r
- {\r
- get { return isModified; }\r
- set\r
- {\r
- if (value && Modified != null)\r
- {\r
- isModified = value;\r
- Modified(this, new EventArgs());\r
- }\r
- else\r
- {\r
- isModified = value;\r
- }\r
- }\r
- }\r
-\r
- public bool IsNewProject\r
- {\r
- get { return isNewProject; }\r
- set { isNewProject = value; }\r
- }\r
-\r
- public ArrayList AssemblyFiles\r
- {\r
- get { return assemblyFiles; }\r
- }\r
-\r
- public ArrayList XmlDirectories\r
- {\r
- get { return xmlDirectories; }\r
- }\r
-\r
- public Hashtable Properties\r
- {\r
- get { return properties; }\r
- }\r
- \r
- #endregion // Public Instance Properties\r
- }\r
-}\r
+++ /dev/null
-// EnumDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Reflection;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- [XmlType(TypeName = "enum")]\r
- public class EnumDoc : AbstractTypeDoc\r
- {\r
- private ValueConstrainedArrayList members = new ValueConstrainedArrayList(typeof(EnumDoc.Member));\r
- \r
- public EnumDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public EnumDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public EnumDoc(Type t, AssemblyLoader loader) : base(t, loader)\r
- {\r
- if (!t.IsEnum)\r
- {\r
- throw new ArgumentException("EnumDoc Type must be an enum.", "t");\r
- }\r
-\r
- foreach (FieldInfo m in t.GetFields())\r
- {\r
- this.Members.Add(new EnumDoc.Member(m.Name, AbstractDoc.TODO));\r
- }\r
- }\r
-\r
- [XmlElement(ElementName = "member", Type = typeof(EnumDoc.Member))]\r
- public ValueConstrainedArrayList Members\r
- {\r
- get { return this.members; }\r
- }\r
-\r
-\r
- [XmlType(TypeName = "member")]\r
- public struct Member\r
- {\r
- [XmlAttribute(AttributeName = "name")]\r
- public string Name;\r
- [XmlText]\r
- public string Description;\r
-\r
- public Member(string name, string description)\r
- {\r
- Name = name;\r
- Description = description;\r
- }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// EventDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-\r
-// Permission is hereby granted, free of charge, to any person obtaining a\r
-// copy of this software and associated documentation files (the "Software"),\r
-// to deal in the Software without restriction, including without limitation\r
-// the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
-// and/or sell copies of the Software, and to permit persons to whom the\r
-// Software is furnished to do so, subject to the following conditions:\r
-//\r
-// The above copyright notice and this permission notice shall be included in\r
-// all copies or substantial portions of the Software.\r
-//\r
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\r
-// IN THE SOFTWARE.\r
-\r
-using System;\r
-using System.Reflection;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- [XmlType(TypeName = "event")]\r
- public class EventDoc : AbstractDoc\r
- {\r
- private string data = string.Empty;\r
-\r
- public EventDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public EventDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public EventDoc(EventInfo ev, AssemblyLoader loader) : base(ev, loader)\r
- {\r
- this.data = AbstractDoc.TODO;\r
- }\r
-\r
- [XmlElement(ElementName = "data")]\r
- public string Data\r
- {\r
- get { return this.data; }\r
- set { this.data = value; }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// ExceptionDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- [XmlType(TypeName = "exception")] \r
- public class ExceptionDoc\r
- {\r
- private string cref;\r
- private string description;\r
-\r
- public ExceptionDoc()\r
- {\r
- this.cref = string.Empty;\r
- this.description = string.Empty;\r
- }\r
-\r
- public ExceptionDoc(string cref, string description)\r
- {\r
- this.cref = cref;\r
- this.description = description;\r
- }\r
-\r
- [XmlAttribute(AttributeName = "cref")]\r
- public string Cref\r
- {\r
- get { return this.cref; }\r
- set { this.cref = value; }\r
- }\r
-\r
- [XmlText]\r
- public string Description\r
- {\r
- get { return this.description; }\r
- set { this.description = value; }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// FieldDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
-\r
- [XmlType(TypeName = "field")]\r
- public class FieldDoc : AbstractDoc\r
- {\r
- public FieldDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public FieldDoc() : this(string.Empty)\r
- {\r
- }\r
- }\r
-}\r
+++ /dev/null
-// InterfaceDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public class InterfaceDoc : AbstractTypeDoc\r
- {\r
- public InterfaceDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public InterfaceDoc() : this(string.Empty)\r
- {\r
- }\r
- }\r
-}\r
+++ /dev/null
-// MethodDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Reflection;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- [XmlType(TypeName = "method")]\r
- public class MethodDoc : AbstractMethodOperatorDoc\r
- {\r
- public MethodDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public MethodDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public MethodDoc(MethodInfo m, AssemblyLoader loader) : base(m, loader)\r
- {\r
- }\r
- }\r
-}\r
+++ /dev/null
-// MonodocException.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public class MonodocException : ApplicationException\r
- {\r
- public MonodocException() : base()\r
- {\r
- }\r
-\r
- public MonodocException(string msg) : base(msg)\r
- {\r
- }\r
-\r
- public MonodocException(string msg, Exception nested) : base(msg, nested)\r
- {\r
- }\r
- }\r
-}\r
+++ /dev/null
-using System;\r
-using System.Collections;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- [XmlRoot(ElementName="monodoc")]\r
- public class MonodocFile\r
- {\r
- private string language = "en";\r
- private ArrayList types = new ArrayList();\r
-\r
- public MonodocFile()\r
- {\r
- }\r
-\r
- [XmlAttribute(AttributeName="language")]\r
- public string Language\r
- {\r
- get { return language; }\r
- set { language = value; }\r
- }\r
-\r
- [XmlElement(Type = typeof(ClassDoc)), XmlElement(Type = typeof(InterfaceDoc)),\r
- XmlElement(Type = typeof(StructDoc)), XmlElement(Type = typeof(DelegateDoc)),\r
- XmlElement(Type = typeof(EnumDoc))]\r
- public ArrayList Types\r
- {\r
- get { return types; }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// NamingFlags.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- [Flags]\r
- public enum NamingFlags\r
- {\r
- None = 1,\r
- FullName = 2,\r
- TypeSpecifier = 4,\r
- ForceMethodParams = 8,\r
- HideMethodParams = 16,\r
- ShortParamTypes = 32\r
- }\r
-}
\ No newline at end of file
+++ /dev/null
-// NotifyArrayList.cs\r
-// John Sohn (jsohn@columbus.rr.com)\r
-// \r
-// Copyright (c) 2002 John Sohn\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied \r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 \r
-\r
-using System;\r
-using System.Collections;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- /// <summary>\r
- /// An implementation of the ArrayList class that provides \r
- /// a mechanism to receive a notification event\r
- /// when the elements of the array are changed\r
- /// </summary>\r
- public class NotifyArrayList : ArrayList, INotifyCollection\r
- {\r
- #region Protected Instance Fields\r
- \r
- protected NotifyCollectionHandler handler = null;\r
-\r
- #endregion\r
-\r
- #region Constructors and Destructors\r
- \r
- public NotifyArrayList() : base()\r
- {\r
- handler = new NotifyCollectionHandler(this); \r
- }\r
- \r
- public NotifyArrayList(ICollection collection) \r
- : base(collection)\r
- {\r
- handler = new NotifyCollectionHandler(this);\r
- }\r
- \r
- public NotifyArrayList(int i) : base(i)\r
- {\r
- handler = new NotifyCollectionHandler(this);\r
- }\r
- \r
- #endregion // Constructors and Destructors\r
-\r
- #region Public Instance Fields\r
- \r
- /// <summary>\r
- /// The event handler that will be called whenever\r
- /// a change is made to the ArrayList.\r
- /// </summary>\r
- public event CollectionModifiedEventHandler Modified;\r
-\r
- #endregion // Public Instance Fields\r
-\r
- #region Public Instance Methods\r
-\r
- /// <summary>\r
- /// Turns off notification event calling. Notification \r
- /// events will not be sent until EndUpdate() is called.\r
- /// </summary>\r
- public virtual void BeginUpdate()\r
- {\r
- handler.BeginUpdate();\r
- }\r
-\r
- /// <summary>\r
- /// Resumes notification event calling previously\r
- /// turned off by calling BeginUpdate().\r
- /// </summary>\r
- public virtual void EndUpdate()\r
- {\r
- handler.EndUpdate();\r
- }\r
-\r
- /// <summary>\r
- /// Invokes the Modified event.\r
- /// </summary>\r
- public void SetModifiedEvent()\r
- {\r
- if (Modified != null)\r
- {\r
- Modified(this);\r
- }\r
- }\r
- \r
- // the following overridden functions modify the contents\r
- // of the collection\r
- public override object this[int index] \r
- {\r
- set\r
- {\r
- base[index] = value;\r
- handler.OnModified();\r
- }\r
- }\r
- \r
- public override int Add(object value) \r
- {\r
- int status = base.Add(value);\r
- handler.OnModified();\r
- return status;\r
- }\r
-\r
- public override void AddRange(ICollection c) \r
- {\r
- base.AddRange(c);\r
- handler.OnModified();\r
- }\r
-\r
- public override void Clear() \r
- {\r
- base.Clear();\r
- handler.OnModified();\r
- }\r
-\r
- public override void Insert(int index, object value) \r
- {\r
- base.Insert(index, value);\r
- handler.OnModified();\r
- }\r
-\r
- public override void InsertRange(int index, ICollection c) {\r
- base.InsertRange(index, c);\r
- handler.OnModified();\r
- }\r
-\r
- public override void Remove(object obj) {\r
- base.Remove(obj);\r
- handler.OnModified();\r
- }\r
-\r
- public override void RemoveAt(int index) {\r
- base.RemoveAt(index);\r
- handler.OnModified();\r
- }\r
-\r
- public override void RemoveRange(int index,int count) {\r
- base.RemoveRange(index, count);\r
- handler.OnModified();\r
- }\r
-\r
- public override void Reverse() {\r
- base.Reverse();\r
- handler.OnModified();\r
- }\r
-\r
- public override void SetRange(int index,ICollection c) {\r
- base.SetRange(index, c);\r
- handler.OnModified();\r
- }\r
-\r
- public override void Sort() {\r
- base.Sort();\r
- handler.OnModified();\r
- }\r
- \r
- #endregion // Public Instance Methods\r
- }\r
-}\r
-\r
+++ /dev/null
-// NotifyCollections.cs\r
-// John Sohn (jsohn@columbus.rr.com)\r
-// \r
-// Copyright (c) 2002 John Sohn\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US\r
-\r
-using System;\r
-using System.Collections;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public delegate void CollectionModifiedEventHandler(object sender);\r
-\r
- public interface INotifyCollection\r
- {\r
- event CollectionModifiedEventHandler Modified;\r
- void BeginUpdate();\r
- void EndUpdate();\r
- void SetModifiedEvent();\r
- }\r
-\r
- public class NotifyCollectionHandler\r
- {\r
- private bool callModifiedEvent = true;\r
- private bool changedDuringUpdate = false;\r
- INotifyCollection collection;\r
- \r
- public NotifyCollectionHandler(INotifyCollection collection)\r
- {\r
- this.collection = collection;\r
- }\r
- \r
- public void BeginUpdate()\r
- {\r
- callModifiedEvent = false;\r
- changedDuringUpdate = false;\r
- }\r
- \r
- public void EndUpdate()\r
- {\r
- // call the event if changes occured between the\r
- // begin/end update calls\r
- if (changedDuringUpdate)\r
- {\r
- collection.SetModifiedEvent();\r
- }\r
-\r
- changedDuringUpdate = false;\r
- callModifiedEvent = true;\r
- }\r
- \r
- public void OnModified()\r
- {\r
- // if in the middle of begin/end update\r
- // save the event call until EndUpdate()\r
- if (!callModifiedEvent)\r
- {\r
- changedDuringUpdate = true;\r
- }\r
- else\r
- {\r
- collection.SetModifiedEvent();\r
- }\r
- }\r
- }\r
-}\r
-\r
+++ /dev/null
-// NotifyHashtable.cs\r
-// John Sohn (jsohn@columbus.rr.com)\r
-// \r
-// Copyright (c) 2002 John Sohn\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Collections;\r
-using System.Runtime.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- /// <summary>\r
- /// An implementation of the Hashtable class that provides \r
- /// a mechanism to receive a notification event\r
- /// when the elements of the Hashtable are changed\r
- // </summary>\r
- public class NotifyHashtable : Hashtable, INotifyCollection\r
- {\r
- #region Protected Instance Fields\r
- \r
- protected NotifyCollectionHandler handler = null;\r
-\r
- #endregion\r
-\r
- #region Constructors and Destructor\r
- \r
- public NotifyHashtable() : base()\r
- {\r
- handler = new NotifyCollectionHandler(this); \r
- }\r
- \r
- public NotifyHashtable(IDictionary d) : base(d) \r
- {\r
- handler = new NotifyCollectionHandler(this); \r
- }\r
- \r
- public NotifyHashtable(int i) : base(i) \r
- {\r
- handler = new NotifyCollectionHandler(this); \r
- }\r
- \r
- public NotifyHashtable(IDictionary d, float f) : base(d, f)\r
- {\r
- handler = new NotifyCollectionHandler(this); \r
- }\r
- \r
- public NotifyHashtable(IHashCodeProvider hp, IComparer c)\r
- : base(hp, c)\r
- {\r
- handler = new NotifyCollectionHandler(this); \r
- }\r
- \r
- public NotifyHashtable(int i, float f) : base(i, f)\r
- {\r
- handler = new NotifyCollectionHandler(this); \r
- }\r
- \r
- protected NotifyHashtable(SerializationInfo si, \r
- StreamingContext sc) : base(si, sc)\r
- {\r
- handler = new NotifyCollectionHandler(this); \r
- }\r
- \r
- public NotifyHashtable(IDictionary d, IHashCodeProvider hcp, \r
- IComparer c) : base(d, hcp, c)\r
- {\r
- handler = new NotifyCollectionHandler(this); \r
- }\r
- \r
- public NotifyHashtable(int i, IHashCodeProvider hcp, \r
- IComparer c) : base(i, hcp, c)\r
- {\r
- handler = new NotifyCollectionHandler(this);\r
- }\r
- \r
- public NotifyHashtable(IDictionary d, float f, \r
- IHashCodeProvider hcp, IComparer c) \r
- : base(d, f, hcp, c)\r
- {\r
- handler = new NotifyCollectionHandler(this);\r
- }\r
- \r
- public NotifyHashtable(int i, float f, IHashCodeProvider hcp,\r
- IComparer c) : base(i, f, hcp, c)\r
- {\r
- handler = new NotifyCollectionHandler(this);\r
- }\r
-\r
- #endregion\r
-\r
- #region Public Instance Fields\r
-\r
- /// <summary>\r
- /// The event handler that will be called whenever\r
- /// a change is made to the Hashtable.\r
- /// </summary> \r
- public event CollectionModifiedEventHandler Modified;\r
-\r
- #endregion // Public Instance Fields\r
- \r
- #region Public Instance Methods\r
-\r
- /// <summary>\r
- /// Turns off notification event calling. Notification \r
- /// events will not be sent until EndUpdate() is called.\r
- /// </summary>\r
- public virtual void BeginUpdate()\r
- {\r
- handler.BeginUpdate();\r
- }\r
-\r
- /// <summary>\r
- /// Resumes notification event calling previously\r
- /// turned off by calling BeginUpdate().\r
- /// </summary>\r
- public virtual void EndUpdate()\r
- {\r
- handler.EndUpdate();\r
- }\r
-\r
- public virtual void SetModifiedEvent()\r
- {\r
- if (Modified != null)\r
- {\r
- Modified(this);\r
- } \r
- }\r
-\r
- public override object this[object key]\r
- {\r
- set\r
- {\r
- base[key] = value;\r
- handler.OnModified();\r
- }\r
- }\r
-\r
- public override void Add(object key,object value)\r
- {\r
- base.Add(key, value);\r
- handler.OnModified();\r
- }\r
- \r
- public override void Clear()\r
- {\r
- base.Clear();\r
- handler.OnModified();\r
- }\r
-\r
- public override void Remove(object key)\r
- {\r
- base.Remove(key);\r
- handler.OnModified();\r
- }\r
- #endregion // Public Instance Methods\r
- }\r
-}\r
-\r
+++ /dev/null
-// OperatorDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Reflection;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- [XmlType(TypeName = "operator")]\r
- public class OperatorDoc : AbstractMethodOperatorDoc\r
- {\r
- public OperatorDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public OperatorDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public OperatorDoc(MethodInfo o, AssemblyLoader loader) : base(o, loader)\r
- {\r
- }\r
- }\r
-}\r
+++ /dev/null
-using System;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- [XmlType(TypeName = "param")]\r
- public class ParameterDoc\r
- {\r
- private string name = string.Empty;\r
- private string description = string.Empty;\r
-\r
- public ParameterDoc()\r
- {\r
- }\r
-\r
- public ParameterDoc(string name, string description)\r
- {\r
- if (name == null)\r
- {\r
- throw new ArgumentException("ParameterDoc name cannot be null.", "name");\r
- }\r
-\r
- if (description == null)\r
- {\r
- throw new ArgumentException("ParameterDoc description cannot be null.", "description");\r
- }\r
-\r
- this.name = name;\r
- this.description = description;\r
- }\r
-\r
- [XmlAttribute(AttributeName = "name")]\r
- public string Name\r
- {\r
- get { return this.name; }\r
- set { this.name = value; }\r
- }\r
-\r
- [XmlText]\r
- public string Description\r
- {\r
- get { return this.description; }\r
- set { this.description = value; }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// PropertyDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Reflection;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public class PropertyDoc : AbstractDoc\r
- {\r
- private string value = string.Empty;\r
- private ValueConstrainedArrayList exceptions = new ValueConstrainedArrayList(typeof(ExceptionDoc));\r
-\r
- public PropertyDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public PropertyDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public PropertyDoc(PropertyInfo prop, AssemblyLoader loader) : base(prop, loader)\r
- {\r
- value = AbstractDoc.TODO;\r
- }\r
-\r
- [XmlElement(ElementName = "value")]\r
- public string Value\r
- {\r
- get { return this.value; }\r
- set { this.value = value; }\r
- }\r
-\r
- [XmlElement(ElementName = "exception", Type = typeof(ExceptionDoc))]\r
- public ValueConstrainedArrayList Exceptions\r
- {\r
- get { return this.exceptions; }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// RecursiveFileList.cs\r
-// John Sohn (jsohn@columbus.rr.com)\r
-// \r
-// Copyright (c) 2002 John Sohn\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Collections;\r
-using System.IO;\r
-\r
-\r
-namespace Mono.Doc.Core \r
-{\r
- /// <summary>\r
- /// Recurses through the given directory and subdirectories based on a \r
- /// filter (wildcard) passed into the constructor. The results are placed\r
- /// in the Files property which is an ArrayList of System.IO.FileInfo objects\r
- /// </summary>\r
- public class RecursiveFileList \r
- {\r
- #region Private Instance Fields\r
-\r
- private ArrayList fileInfoList;\r
-\r
- #endregion // Private Instance Fields\r
-\r
- #region Constructors and Destructors\r
-\r
- /// <summary>Constructor for RecursiveFileList.</summary>\r
- /// <param name="path">The directory to recurse.</param>\r
- /// <exception cref="DirectoryNotFoundException">Thrown if an invalid path is specified.</exception>\r
- public RecursiveFileList(string path) : this(path, null) \r
- {\r
- }\r
-\r
- /// <summary>\r
- /// Constructor for RecursiveFileList.\r
- /// </summary>\r
- /// <param name="path">The directory to recurse.</param>\r
- /// <param name="filter">Wildcard of files to collect.</param>\r
- /// <exception cref="DirectoryNotFoundException">Thrown if an invalid path is specified.</exception>\r
- public RecursiveFileList(string path, string filter)\r
- {\r
- this.fileInfoList = new ArrayList();\r
- AddFilesInPath(path, filter);\r
- }\r
-\r
- #endregion // Constructors and Destructors\r
-\r
- #region Private Instance Methods\r
-\r
- private void AddFilesInPath(string path, string filter)\r
- {\r
- DirectoryInfo dir = new DirectoryInfo(path);\r
-\r
-\r
- if (filter == null) \r
- {\r
- filter = "*.*";\r
- }\r
- \r
- foreach (FileSystemInfo fi in dir.GetFiles(filter)) \r
- {\r
- this.fileInfoList.Add(fi);\r
- }\r
-\r
-\r
- foreach (DirectoryInfo di in dir.GetDirectories()) \r
- {\r
- AddFilesInPath(di.FullName, filter);\r
- }\r
- }\r
-\r
- #endregion // Private Instance Methods\r
-\r
- #region Public Instance Properties\r
-\r
- /// <summary>\r
- /// Contains an ArrayList of System.IO.FileInfo objects\r
- /// based on the path (and optional filter) passed to the constructor.\r
- /// </summary>\r
- public ArrayList Files\r
- {\r
- get { return this.fileInfoList; }\r
- }\r
-\r
- #endregion // Public Instance Properties\r
- }\r
-}\r
-\r
+++ /dev/null
-// SortedStringValues.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-//\r
-// The original concept for this class was presented in an MSDN online article\r
-// by Eric Gunnerson.\r
-\r
-using System;\r
-using System.Collections;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public class SortedStringValues : IEnumerable\r
- {\r
- private IEnumerable enumerable;\r
-\r
- public SortedStringValues(IEnumerable enumerable)\r
- {\r
- this.enumerable = enumerable;\r
- }\r
-\r
- internal class SortedStringValuesEnumerator : IEnumerator\r
- {\r
- private ArrayList items = new ArrayList();\r
- private int current;\r
-\r
- internal SortedStringValuesEnumerator(IEnumerator enumerator)\r
- {\r
- while (enumerator.MoveNext())\r
- {\r
- items.Add(enumerator.Current.ToString());\r
- }\r
-\r
- IDisposable disposable = enumerator as IDisposable;\r
-\r
- if (disposable != null)\r
- {\r
- disposable.Dispose();\r
- }\r
-\r
- items.Sort();\r
- current = -1;\r
- }\r
-\r
- public void Reset()\r
- {\r
- current = -1;\r
- }\r
-\r
- public bool MoveNext()\r
- {\r
- if (++current == items.Count) return false;\r
-\r
- return true;\r
- }\r
-\r
- public object Current\r
- {\r
- get { return items[current]; }\r
- }\r
- }\r
-\r
- public IEnumerator GetEnumerator()\r
- {\r
- return new SortedStringValuesEnumerator(enumerable.GetEnumerator());\r
- }\r
- }\r
-}\r
+++ /dev/null
-// StructDoc.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Reflection;\r
-using System.Xml.Serialization;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- [XmlType(TypeName = "struct")]\r
- public class StructDoc : AbstractClassStructDoc\r
- {\r
- public StructDoc(string name) : base(name)\r
- {\r
- }\r
-\r
- public StructDoc() : this(string.Empty)\r
- {\r
- }\r
-\r
- public StructDoc(Type t, AssemblyLoader loader) : base(t, loader)\r
- {\r
- if (!AssemblyLoader.IsStruct(t))\r
- {\r
- throw new ArgumentException("Structdoc Type must be a struct.", "t");\r
- }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// TypeNameHelper.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Reflection;\r
-using System.Text;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- /// <summary>\r
- /// Generates friendly names for types. \r
- /// </summary>\r
- public sealed class TypeNameHelper\r
- {\r
- private TypeNameHelper()\r
- {\r
- // can't instantiate this class\r
- }\r
-\r
-\r
- /// <summary>\r
- /// Given a MemberInfo object, creates a friendly string name without\r
- /// full qualifiers or a type prefix.\r
- /// </summary>\r
- /// <param name="m">The MemberInfo to name</param>\r
- /// <returns>A friendly name</returns>\r
- public static string GetName(MemberInfo m) {\r
- return GetName(m, NamingFlags.None);\r
- }\r
-\r
-\r
- /// <summary>\r
- /// Given a MemberInfo object, creates a friendly string name. \r
- /// </summary>\r
- /// <param name="m">The MemberInfo to name</param>\r
- /// <param name="flags">NamingFlags can be combined to alter the output</param>\r
- /// <returns>A friendly name</returns>\r
- public static string GetName(MemberInfo m, NamingFlags flags)\r
- {\r
- StringBuilder name = new StringBuilder();\r
- \r
- // type specifier\r
- if ((flags & NamingFlags.TypeSpecifier) != 0) {\r
- // append a type specifier to this name\r
- string type = null;\r
-\r
- if (m is ConstructorInfo) {\r
- type = "C";\r
- } else if (m is MethodInfo) {\r
- type = "M";\r
- } else if (m is EventInfo) {\r
- type = "E";\r
- } else if (m is FieldInfo) {\r
- type = "F";\r
- } else if (m is PropertyInfo) {\r
- type = "P";\r
- } else if (m is Type) {\r
- type = "T";\r
- } else {\r
- type = "!";\r
- }\r
-\r
- name.Append(type + ":");\r
- }\r
-\r
- // first-class types\r
- if (m.DeclaringType == null && m is Type) {\r
- return name.Append((m as Type).FullName).ToString();\r
- }\r
-\r
- // full name\r
- if (((flags & NamingFlags.FullName) != 0) && m.DeclaringType != null) {\r
- name.Append(m.DeclaringType.FullName + ".");\r
- }\r
-\r
- // normal name\r
- name.Append(m.Name.Replace(".", "#")); // for #ctor\r
- \r
- // for methods and constructors, params are part of the name\r
- if (m is MethodBase) {\r
- MethodBase method = m as MethodBase;\r
- ParameterInfo[] parameters = method.GetParameters();\r
- \r
- if (parameters.Length > 0 && ((flags & NamingFlags.HideMethodParams) == 0)) {\r
- bool first = true;\r
- name.Append("(");\r
-\r
- foreach (ParameterInfo p in parameters) {\r
- if (!first) name.Append(",");\r
- first = false;\r
- name.Append(((flags & NamingFlags.ShortParamTypes) != 0) ? \r
- p.ParameterType.Name : p.ParameterType.FullName);\r
- }\r
-\r
- name.Append(")");\r
- } else if ((flags & NamingFlags.ForceMethodParams) != 0) {\r
- name.Append("()");\r
- }\r
- }\r
-\r
- return name.ToString();\r
- }\r
- }\r
-}\r
+++ /dev/null
-// ValueConstrainedArrayList.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Collections;\r
-\r
-namespace Mono.Doc.Core\r
-{\r
- public class ValueConstrainedArrayList : ArrayList\r
- {\r
- #region Protected Instance Fields\r
-\r
- protected Type allowed;\r
-\r
- #endregion // Protected Instance Fields\r
-\r
- #region Constructors and Destructors\r
-\r
- public ValueConstrainedArrayList(Type allowed) : base()\r
- {\r
- if (allowed == null)\r
- {\r
- throw new ArgumentNullException("allowed", "Specified Type constraint cannot be null.");\r
- }\r
-\r
- this.allowed = allowed;\r
- }\r
-\r
- public ValueConstrainedArrayList(Type allowed, ICollection c)\r
- {\r
- if (allowed == null)\r
- {\r
- throw new ArgumentNullException("allowed", "Specified Type constraint cannot be null.");\r
- }\r
-\r
- this.allowed = allowed;\r
- \r
- this.AddRange(c);\r
- }\r
-\r
- public ValueConstrainedArrayList(Type allowed, int capacity) : base(capacity)\r
- {\r
- if (allowed == null)\r
- {\r
- throw new ArgumentNullException("allowed", "Specified Type constraint cannot be null.");\r
- }\r
-\r
- this.allowed = allowed;\r
- }\r
-\r
- #endregion // Constructors and Destructors\r
-\r
- #region Public Instance Methods\r
-\r
- public override int Add(object value)\r
- {\r
- if (allowed != value.GetType())\r
- {\r
- throw new ArgumentException("Values in constrained collection must be of type " + allowed.ToString() +\r
- ".", "value"\r
- );\r
- }\r
-\r
- return base.Add(value);\r
- }\r
-\r
- public override void AddRange(ICollection c)\r
- {\r
- foreach (object o in c)\r
- {\r
- if (allowed != o.GetType())\r
- {\r
- throw new ArgumentException("Values in constrained collection must be of type " +\r
- allowed.ToString() + ".", "c"\r
- );\r
- }\r
- }\r
-\r
- base.AddRange(c);\r
- }\r
-\r
- public override void Insert(int index, object value)\r
- {\r
- if (allowed != value.GetType())\r
- {\r
- throw new ArgumentException("Values in constrained collection must be of type " + allowed.ToString() +\r
- ".", "value"\r
- );\r
- }\r
-\r
- base.Insert(index, value);\r
- }\r
-\r
- public override void InsertRange(int index, ICollection c)\r
- {\r
- foreach (object o in c)\r
- {\r
- if (allowed != o.GetType())\r
- {\r
- throw new ArgumentException("Values in constrained collection must be of type " +\r
- allowed.ToString() + ".", "c"\r
- );\r
- }\r
- }\r
- \r
- base.InsertRange(index, c);\r
- }\r
-\r
- public override void SetRange(int index, ICollection c)\r
- {\r
- foreach (object o in c)\r
- {\r
- if (allowed != o.GetType())\r
- {\r
- throw new ArgumentException("Values in constrained collection must be of type " +\r
- allowed.ToString() + ".", "c"\r
- );\r
- }\r
- }\r
- \r
- base.SetRange(index, c);\r
- }\r
-\r
- #endregion // Public Instance Methods\r
-\r
- #region Public Instance Properties\r
-\r
- public override object this[int index]\r
- {\r
- get { return base[index]; }\r
- set\r
- {\r
- if (allowed != value.GetType())\r
- {\r
- throw new ArgumentException("Values in constrained collection must be of type " +\r
- allowed.ToString() + "." + "value"\r
- );\r
- }\r
-\r
- base[index] = value;\r
- }\r
- }\r
-\r
- #endregion // Public Instance Properties\r
- }\r
-}\r
+++ /dev/null
-// AboutForm.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Drawing;\r
-using System.Windows.Forms;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- public class AboutForm : Form\r
- {\r
- private PictureBox aboutLogo;\r
- private Button closeButton;\r
-\r
- public AboutForm()\r
- {\r
- aboutLogo = new PictureBox();\r
- closeButton = new Button();\r
-\r
- this.SuspendLayout();\r
-\r
- // aboutLogo properties\r
- aboutLogo.Dock = DockStyle.Fill;\r
- aboutLogo.Image = GuiResources.AboutMonodocBitmap;\r
- aboutLogo.Name = "aboutLogo";\r
- aboutLogo.Size = new Size(300, 300);\r
-\r
- // closeButton properties\r
- closeButton.Location = new Point(96, 272);\r
- closeButton.Name = "closeButton";\r
- closeButton.Size = new Size(104, 24);\r
- closeButton.TabIndex = 0;\r
- closeButton.Text = GuiResources.GetString("Buttons.Close");\r
-\r
- \r
- // form properties\r
- this.AutoScaleBaseSize = new Size(5, 13);\r
- this.BackColor = Color.White;\r
- this.ClientSize = new Size(300, 300);\r
- this.FormBorderStyle = FormBorderStyle.FixedSingle;\r
- this.Icon = GuiResources.OpenBookIcon;\r
- this.MaximizeBox = false;\r
- this.MinimizeBox = false;\r
- this.Name = "AboutForm";\r
- this.ShowInTaskbar = false;\r
- this.StartPosition = FormStartPosition.CenterParent;\r
- this.Text = GuiResources.GetString("Form.About.Title");\r
-\r
- // bind events\r
- closeButton.Click += new EventHandler(closeButton_Click);\r
-\r
- // add components\r
- this.Controls.AddRange(new Control[] { closeButton, aboutLogo});\r
-\r
- this.ResumeLayout(false);\r
- }\r
-\r
- // events\r
- private void closeButton_Click(object sender, EventArgs args)\r
- {\r
- this.Close();\r
- }\r
- }\r
-}\r
+++ /dev/null
-// AssemblyTreeImages.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Drawing;\r
-using System.Windows.Forms;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- /// <summary>\r
- /// Summary description for AssemblyBrowserImages.\r
- /// </summary>\r
- public class AssemblyTreeImages\r
- {\r
- private static Image[] images = null;\r
- private static ImageList imageList = null;\r
-\r
- // this class cannot be instantiated\r
- private AssemblyTreeImages()\r
- {\r
- }\r
-\r
- static AssemblyTreeImages()\r
- {\r
- Bitmap b = GuiResources.AssemblyTreeBitmap;\r
- int count = (int) b.Width / b.Height;\r
- images = new Image[count];\r
- Rectangle rect = new Rectangle(0, 0, b.Height, b.Height);\r
- imageList = new ImageList();\r
-\r
- for (int j = 0; j < count; j++)\r
- {\r
- images[j] = b.Clone(rect, b.PixelFormat);\r
- rect.X += b.Height;\r
-\r
- imageList.Images.Add(images[j]);\r
- }\r
- }\r
- \r
- // access as an ImageList for TreeView, ToolBar\r
- public static ImageList List { get { return imageList; } }\r
-\r
- public static Image AssemblyClosedImage { get { return images[AssemblyClosed]; } }\r
- public static Image AssemblyOpenImage { get { return images[AssemblyOpen]; } }\r
- public static Image NamespaceImage { get { return images[Namespace]; } }\r
- public static Image ClassImage { get { return images[Class]; } }\r
- public static Image InterfaceImage { get { return images[Interface]; } }\r
- public static Image StructImage { get { return images[Struct]; } }\r
- public static Image EnumImage { get { return images[Enum]; } }\r
- public static Image ConstructorImage { get { return images[Constructor]; } }\r
- public static Image MethodImage { get { return images[Method]; } }\r
- public static Image EventImage { get { return images[Event]; } }\r
- public static Image PropertyImage { get { return images[Property]; } }\r
- public static Image DelegateImage { get { return images[Delegate]; } }\r
- public static Image OperatorImage { get { return images[Operator]; } }\r
- public static Image FieldImage { get { return images[Field]; } }\r
- public static Image ShortcutsImage { get { return images[Shortcuts]; } }\r
-\r
- // imageList indexes\r
- public static int AssemblyClosed = 0;\r
- public static int AssemblyOpen = 1;\r
- public static int Namespace = 2;\r
- public static int Class = 3;\r
- public static int Interface = 4;\r
- public static int Struct = 5;\r
- public static int Enum = 6;\r
- public static int Constructor = 7;\r
- public static int Method = 8;\r
- public static int Event = 9;\r
- public static int Property = 10;\r
- public static int Delegate = 11;\r
- public static int Operator = 12;\r
- public static int Field = 13;\r
- public static int Shortcuts = 14;\r
- }\r
-}\r
+++ /dev/null
-// AssemblyTreeLoader.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// Adam Treat (manyoso@yahoo.com)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-// Copyright (c) 2002 Adam Treat\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-//\r
-// Much of the reflection guts of this class come from the original Monodoc\r
-// XML stub generator, by Adam Treat, and much of the guts of *that* were\r
-// derived from NDoc (http://ndoc.sourceforge.net).\r
-\r
-using Mono.Doc.Core;\r
-using System;\r
-using System.Collections;\r
-using System.Reflection;\r
-using System.Windows.Forms;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- public class AssemblyTreeLoader\r
- {\r
- #region Instance Fields\r
-\r
- private AssemblyLoader loader;\r
-\r
- #endregion // Instance Fields\r
-\r
- #region Constructors and Destructors\r
-\r
- public AssemblyTreeLoader(AssemblyLoader loader)\r
- {\r
- this.loader = loader;\r
- }\r
-\r
- #endregion // Constructors and Destructors\r
-\r
- #region Private Instance Methods\r
-\r
- private TreeNode GetNodeForType(Type t)\r
- {\r
- string nodeName = GetTypeDisplayName(t) + " ";\r
- TreeNode typeNode = new TreeNode();\r
- typeNode.Tag =\r
- TypeNameHelper.GetName(t, NamingFlags.TypeSpecifier | NamingFlags.FullName);\r
-\r
- if (t.IsClass && !IsDelegate(t))\r
- {\r
- // Type is class\r
- typeNode.ImageIndex = AssemblyTreeImages.Class;\r
- typeNode.SelectedImageIndex = AssemblyTreeImages.Class;\r
- typeNode.Text = nodeName + "Class"; // TODO: i18n\r
- \r
- // Constructors, Fields, Properties, Methods, Operators, Events\r
- TreeNode[] categories = new TreeNode[6];\r
- categories[0] = GetConstructorsNode(t);\r
- categories[1] = GetFieldsNode(t);\r
- categories[2] = GetPropertiesNode(t);\r
- categories[3] = GetMethodsNode(t);\r
- categories[4] = GetOperatorsNode(t);\r
- categories[5] = GetEventsNode(t);\r
-\r
- foreach (TreeNode cat in categories)\r
- {\r
- if (cat != null) \r
- {\r
- typeNode.Nodes.Add(cat);\r
- }\r
- }\r
- }\r
- else if (t.IsInterface)\r
- {\r
- // Type is interface\r
- typeNode.ImageIndex = AssemblyTreeImages.Interface;\r
- typeNode.SelectedImageIndex = AssemblyTreeImages.Interface;\r
- typeNode.Text = nodeName + "Interface"; // TODO: i18n\r
-\r
- // Methods, properties, events\r
- TreeNode methodsNode = GetMethodsNode(t);\r
- TreeNode propsNode = GetPropertiesNode(t);\r
- TreeNode eventsNode = GetEventsNode(t);\r
-\r
- if (methodsNode != null)\r
- {\r
- typeNode.Nodes.Add(methodsNode);\r
- }\r
-\r
- if (propsNode != null)\r
- {\r
- typeNode.Nodes.Add(propsNode);\r
- }\r
-\r
- if (eventsNode != null)\r
- {\r
- typeNode.Nodes.Add(eventsNode);\r
- }\r
- }\r
- else if (t.IsValueType && !t.IsEnum)\r
- {\r
- // Type is struct\r
- typeNode.ImageIndex = AssemblyTreeImages.Struct;\r
- typeNode.SelectedImageIndex = AssemblyTreeImages.Struct;\r
- typeNode.Text = nodeName + "Structure"; // TODO: i18n\r
-\r
- // Constructors, Fields, Properties, Methods, Operators, Events\r
- TreeNode[] categories = new TreeNode[6];\r
- categories[0] = GetConstructorsNode(t);\r
- categories[1] = GetFieldsNode(t);\r
- categories[2] = GetPropertiesNode(t);\r
- categories[3] = GetMethodsNode(t);\r
- categories[4] = GetOperatorsNode(t);\r
- categories[5] = GetEventsNode(t);\r
-\r
- foreach (TreeNode cat in categories)\r
- {\r
- if (cat != null) \r
- {\r
- typeNode.Nodes.Add(cat);\r
- }\r
- }\r
- }\r
- else if (t.IsEnum)\r
- {\r
- // Type is enumeration\r
- typeNode.ImageIndex = AssemblyTreeImages.Enum;\r
- typeNode.SelectedImageIndex = AssemblyTreeImages.Enum;\r
- typeNode.Text = nodeName + "Enumeration"; // TODO: i18n\r
- }\r
- else if (t.IsClass && IsDelegate(t))\r
- {\r
- // Type is delegate\r
- typeNode.ImageIndex = AssemblyTreeImages.Delegate;\r
- typeNode.SelectedImageIndex = AssemblyTreeImages.Delegate;\r
- typeNode.Text = nodeName + "Delegate"; // TODO: i18n\r
- }\r
- else \r
- {\r
- MessageBox.Show(\r
- "Encountered unexpected type during tree load: " + t.FullName,\r
- "What the heck is this?"\r
- );\r
- }\r
-\r
- return typeNode;\r
- }\r
-\r
- private TreeNode GetConstructorsNode(Type t)\r
- {\r
- ConstructorInfo[] ctors = loader.GetConstructors(t);\r
-\r
- if (ctors.Length > 0)\r
- {\r
- TreeNode cNode = new TreeNode("Constructors");\r
- cNode.ImageIndex = AssemblyTreeImages.Constructor;\r
- cNode.SelectedImageIndex = AssemblyTreeImages.Constructor;\r
-\r
- foreach (ConstructorInfo ctor in ctors)\r
- {\r
- TreeNode ctorNode = new TreeNode();\r
- ctorNode.ImageIndex = AssemblyTreeImages.Constructor;\r
- ctorNode.SelectedImageIndex = AssemblyTreeImages.Constructor;\r
- ctorNode.Tag = GetTag(ctor);\r
- ctorNode.Text = TypeNameHelper.GetName(ctor,\r
- NamingFlags.ForceMethodParams | NamingFlags.ShortParamTypes).\r
- Replace("#ctor", t.Name + " Constructor ").\r
- Replace(",", ", ");\r
-\r
- cNode.Nodes.Add(ctorNode);\r
- }\r
-\r
- return cNode;\r
- }\r
- else\r
- {\r
- return null;\r
- }\r
- }\r
-\r
- private TreeNode GetFieldsNode(Type t)\r
- {\r
- FieldInfo[] fields = loader.GetFields(t);\r
-\r
- if (fields.Length > 0)\r
- {\r
- TreeNode fNode = new TreeNode("Fields");\r
- fNode.ImageIndex = AssemblyTreeImages.Field;\r
- fNode.SelectedImageIndex = AssemblyTreeImages.Field;\r
-\r
- foreach (FieldInfo field in fields)\r
- {\r
- TreeNode fieldNode = new TreeNode();\r
- fieldNode.ImageIndex = AssemblyTreeImages.Field;\r
- fieldNode.SelectedImageIndex = AssemblyTreeImages.Field;\r
- fieldNode.Tag = GetTag(field);\r
- fieldNode.Text = field.Name + " Field";\r
-\r
- fNode.Nodes.Add(fieldNode);\r
- }\r
-\r
- return fNode;\r
- }\r
- else\r
- {\r
- return null;\r
- }\r
- }\r
-\r
- private TreeNode GetPropertiesNode(Type t)\r
- {\r
- PropertyInfo[] properties = loader.GetProperties(t);\r
-\r
- if (properties.Length > 0)\r
- {\r
- TreeNode pNode = new TreeNode("Properties");\r
- pNode.ImageIndex = AssemblyTreeImages.Property;\r
- pNode.SelectedImageIndex = AssemblyTreeImages.Property;\r
- \r
- foreach (PropertyInfo property in properties)\r
- {\r
- TreeNode propertyNode = new TreeNode();\r
- propertyNode.ImageIndex = AssemblyTreeImages.Property;\r
- propertyNode.SelectedImageIndex = AssemblyTreeImages.Property;\r
- propertyNode.Tag = GetTag(property);\r
- propertyNode.Text = property.Name + " Property";\r
-\r
- pNode.Nodes.Add(propertyNode);\r
- }\r
-\r
- return pNode;\r
- }\r
- else\r
- {\r
- return null;\r
- }\r
- }\r
-\r
- private TreeNode GetMethodsNode(Type t)\r
- {\r
- MethodInfo[] methods = loader.GetMethods(t);\r
-\r
- if (methods.Length > 0)\r
- {\r
- TreeNode mNode = new TreeNode("Methods");\r
- mNode.ImageIndex = AssemblyTreeImages.Method;\r
- mNode.SelectedImageIndex = AssemblyTreeImages.Method;\r
- Hashtable overloads = new Hashtable();\r
-\r
- // group method overloads by name\r
- foreach (MethodInfo method in methods)\r
- {\r
- ArrayList overloadList = overloads[method.Name] as ArrayList;\r
-\r
- if (overloadList == null)\r
- {\r
- overloadList = new ArrayList();\r
- overloads[method.Name] = overloadList;\r
- \r
- overloadList.Add(method);\r
- }\r
- else\r
- {\r
- overloadList.Add(method);\r
- }\r
- }\r
-\r
- // create nodes, grouping overloaded methods\r
- foreach (string methodName in overloads.Keys)\r
- {\r
- ArrayList overloadList = overloads[methodName] as ArrayList;\r
-\r
- if (overloadList.Count > 1)\r
- {\r
- // overloaded method\r
- TreeNode overloadNode = new TreeNode();\r
- overloadNode.ImageIndex = AssemblyTreeImages.Method;\r
- overloadNode.SelectedImageIndex = AssemblyTreeImages.Method;\r
- overloadNode.Text = methodName + " Method";\r
- overloadNode.Tag = "TODO:OVERLOAD";\r
-\r
- foreach (MethodInfo m in overloadList)\r
- {\r
- overloadNode.Nodes.Add(GetOverloadedMethodNode(m));\r
- }\r
-\r
- mNode.Nodes.Add(overloadNode);\r
- }\r
- else\r
- {\r
- // not overloaded\r
- MethodInfo m = overloadList[0] as MethodInfo;\r
- TreeNode methodNode = new TreeNode();\r
- methodNode.ImageIndex = AssemblyTreeImages.Method;\r
- methodNode.SelectedImageIndex = AssemblyTreeImages.Method;\r
- methodNode.Tag = GetTag(m);\r
- methodNode.Text = m.Name +\r
- TypeNameHelper.GetName(m, NamingFlags.HideMethodParams).\r
- Replace(m.Name, " ") + " Method";\r
-\r
- mNode.Nodes.Add(methodNode);\r
- }\r
- }\r
-\r
- return mNode;\r
- }\r
- else\r
- {\r
- return null;\r
- }\r
- }\r
-\r
- private TreeNode GetOverloadedMethodNode(MethodInfo m)\r
- {\r
- TreeNode mNode = new TreeNode();\r
- mNode.Tag = GetTag(m);\r
- mNode.Text = m.Name + TypeNameHelper.GetName(m,\r
- NamingFlags.ForceMethodParams | NamingFlags.ShortParamTypes).\r
- Replace(",", ", ").Replace(m.Name, " ") + " Method";\r
-\r
- return mNode;\r
- }\r
-\r
- private TreeNode GetOperatorsNode(Type t)\r
- {\r
- MethodInfo[] operatorMethods = loader.GetOperators(t);\r
- \r
- if (operatorMethods.Length > 0)\r
- {\r
- TreeNode oNode = new TreeNode("Operators");\r
- oNode.ImageIndex = AssemblyTreeImages.Operator;\r
- oNode.SelectedImageIndex = AssemblyTreeImages.Operator;\r
-\r
- foreach (MethodInfo om in operatorMethods)\r
- {\r
- TreeNode omNode = new TreeNode();\r
- omNode.ImageIndex = AssemblyTreeImages.Operator;\r
- omNode.SelectedImageIndex = AssemblyTreeImages.Operator;\r
- omNode.Tag = GetTag(om);\r
- omNode.Text = om.Name.Replace("op_", "") + " Operator";\r
-\r
- oNode.Nodes.Add(omNode);\r
- }\r
-\r
- return oNode;\r
- }\r
- else\r
- {\r
- return null;\r
- }\r
- }\r
-\r
- private TreeNode GetEventsNode(Type t)\r
- {\r
- EventInfo[] events = loader.GetEvents(t);\r
-\r
- if (events.Length > 0)\r
- {\r
- TreeNode eNode = new TreeNode("Events");\r
- eNode.ImageIndex = AssemblyTreeImages.Event;\r
- eNode.SelectedImageIndex = AssemblyTreeImages.Event;\r
-\r
- foreach (EventInfo e in events)\r
- {\r
- TreeNode eiNode = new TreeNode();\r
- eiNode.ImageIndex = AssemblyTreeImages.Event;\r
- eiNode.SelectedImageIndex = AssemblyTreeImages.Event;\r
- eiNode.Tag = GetTag(e);\r
- eiNode.Text = e.Name + " Event";\r
-\r
- eNode.Nodes.Add(eiNode);\r
- }\r
-\r
- return eNode;\r
- }\r
- else\r
- {\r
- return null;\r
- }\r
- }\r
-\r
- private bool IsDelegate(Type type)
- {
- return type.BaseType.FullName == "System.Delegate" ||
- type.BaseType.FullName == "System.MulticastDelegate";
- }
-
- private string GetTypeDisplayName(Type type)
- {
- string[] s = type.FullName.Split(new char[] {'.'});
- string name = s[s.Length - 1];
-
- return name.Replace('+', '.');
- }\r
-\r
- private string GetTag(MemberInfo m)\r
- {\r
- return TypeNameHelper.GetName(m, NamingFlags.TypeSpecifier | NamingFlags.FullName);\r
- }\r
-\r
- #endregion // Private Instance Methods\r
-\r
- #region Public Instance Methods\r
-\r
- public void LoadNode(TreeNode node)\r
- {\r
- // create root element\r
- TreeNode root = new TreeNode(loader.Assembly.GetName().Name + " Assembly");\r
- root.ImageIndex = AssemblyTreeImages.AssemblyOpen;\r
- root.SelectedImageIndex = AssemblyTreeImages.AssemblyOpen;\r
- root.Tag = "A:" + loader.Assembly.GetName().Name;\r
-\r
- node.Nodes.Add(root);\r
-\r
- // dictionary of namespaces\r
- Hashtable namespaces = new Hashtable();\r
-\r
- foreach (Type t in loader.GetTypes())\r
- {\r
- TreeNode nsNode = (TreeNode) namespaces[t.Namespace];\r
-\r
- if (nsNode == null)\r
- {\r
- nsNode = new TreeNode(t.Namespace);\r
- nsNode.ImageIndex = AssemblyTreeImages.Namespace;\r
- nsNode.SelectedImageIndex = AssemblyTreeImages.Namespace;\r
- nsNode.Tag = "N:" + t.Namespace;\r
- namespaces[t.Namespace] = nsNode;\r
-\r
- }\r
-\r
- // TODO: sort types before adding\r
- TreeNode typeNode = GetNodeForType(t);\r
- \r
- nsNode.Nodes.Add(typeNode);\r
- }\r
- \r
-\r
- // add sorted namespace nodes to root\r
- foreach (string nsName in new SortedStringValues(namespaces.Keys))\r
- {\r
- root.Nodes.Add((TreeNode) namespaces[nsName]);\r
- }\r
- }\r
-\r
- #endregion // Public Instance Methods\r
- }\r
-}\r
+++ /dev/null
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Drawing;\r
-using System.Collections;\r
-using System.ComponentModel;\r
-using System.Windows.Forms;\r
-using System.IO;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- /// <summary>\r
- /// Summary description for DirectorySelectorForm.\r
- /// </summary>\r
- public class DirectorySelectorForm : System.Windows.Forms.Form\r
- {\r
- private DirectoryInfo currentDirectory;\r
- private string selectedDirectoryName;\r
-\r
- private System.Windows.Forms.Label labelPath;\r
- private System.Windows.Forms.TextBox textBoxPath;\r
- private System.Windows.Forms.TreeView tree;\r
- private System.Windows.Forms.Button buttonOK;\r
- private System.Windows.Forms.Button buttonCancel;\r
- private System.Windows.Forms.Button buttonParentDir;\r
-\r
- /// <summary>\r
- /// Required designer variable.\r
- /// </summary>\r
- private System.ComponentModel.Container components = null;\r
-\r
- public DirectorySelectorForm()\r
- {\r
- //\r
- // Required for Windows Form Designer support\r
- //\r
- InitializeComponent();\r
-\r
- //\r
- // TODO: Add any constructor code after InitializeComponent call\r
- //\r
-\r
- this.buttonParentDir.ImageList = AssemblyTreeImages.List;\r
- this.buttonParentDir.ImageIndex = AssemblyTreeImages.Shortcuts; // TODO: need prev. dir icon\r
- this.tree.ImageList = AssemblyTreeImages.List;\r
- this.tree.ImageIndex = AssemblyTreeImages.Shortcuts; // TODO: need folder icon\r
- this.tree.SelectedImageIndex = AssemblyTreeImages.Shortcuts; // TODO: need folder icon\r
-\r
- if (SetCurrentDirectory(Directory.GetCurrentDirectory()))\r
- {\r
- this.textBoxPath.Text = this.currentDirectory.FullName;\r
- this.selectedDirectoryName = this.currentDirectory.FullName;\r
- \r
- InitializeTree();\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Clean up any resources being used.\r
- /// </summary>\r
- protected override void Dispose( bool disposing )\r
- {\r
- if( disposing )\r
- {\r
- if(components != null)\r
- {\r
- components.Dispose();\r
- }\r
- }\r
- base.Dispose( disposing );\r
- }\r
-\r
- #region Private Instance Methods\r
-\r
- private void InitializeTree()\r
- {\r
- this.tree.Nodes.Clear();\r
-\r
- foreach (DirectoryInfo dirInfo in this.currentDirectory.GetDirectories())\r
- {\r
- TreeNode dirNode = new TreeNode(dirInfo.Name);\r
- dirNode.Tag = dirInfo.FullName;\r
-\r
- CreateSubdirectoryNodes(dirNode);\r
- this.tree.Nodes.Add(dirNode);\r
- }\r
- }\r
-\r
- private void CreateSubdirectoryNodes(TreeNode dirNode)\r
- {\r
- DirectoryInfo dirInfo = new DirectoryInfo(dirNode.Tag as string);\r
-\r
- foreach (DirectoryInfo childDirInfo in dirInfo.GetDirectories())\r
- {\r
- TreeNode childDirNode = new TreeNode(childDirInfo.Name);\r
- childDirNode.Tag = childDirInfo.FullName;\r
-\r
- dirNode.Nodes.Add(childDirNode);\r
- }\r
- }\r
-\r
- private bool SetCurrentDirectory(string dirName)\r
- {\r
- string errorMessage = null;\r
- DirectoryInfo newDirectory = null;\r
-\r
- try\r
- {\r
- newDirectory = new DirectoryInfo(dirName);\r
- }\r
- catch (ArgumentNullException)\r
- {\r
- errorMessage = "cannot be null.";\r
- }\r
- catch (DirectoryNotFoundException)\r
- {\r
- errorMessage = "was not found.";\r
- }\r
- catch (ArgumentException)\r
- {\r
- errorMessage = "contains invalid characters.";\r
- }\r
- catch (PathTooLongException)\r
- {\r
- errorMessage = "is too long.";\r
- }\r
-\r
- if (errorMessage != null)\r
- {\r
- MessageBox.Show("The selected path " + errorMessage,\r
- "Problem Opening Directory",\r
- MessageBoxButtons.OK,\r
- MessageBoxIcon.Error\r
- );\r
-\r
- return false;\r
- }\r
- else\r
- {\r
- this.currentDirectory = newDirectory;\r
- \r
- return true;\r
- }\r
- }\r
-\r
- #endregion // Private Instance Methods\r
-\r
- #region Public Instance Properties\r
-\r
- public string DirectoryName\r
- {\r
- get { return selectedDirectoryName; }\r
- }\r
-\r
- #endregion // Public Instance Properties\r
-\r
- #region Windows Form Designer generated code\r
- /// <summary>\r
- /// Required method for Designer support - do not modify\r
- /// the contents of this method with the code editor.\r
- /// </summary>\r
- private void InitializeComponent()\r
- {\r
- this.labelPath = new System.Windows.Forms.Label();\r
- this.textBoxPath = new System.Windows.Forms.TextBox();\r
- this.tree = new System.Windows.Forms.TreeView();\r
- this.buttonOK = new System.Windows.Forms.Button();\r
- this.buttonCancel = new System.Windows.Forms.Button();\r
- this.buttonParentDir = new System.Windows.Forms.Button();\r
- this.SuspendLayout();\r
- // \r
- // labelPath\r
- // \r
- this.labelPath.Location = new System.Drawing.Point(8, 8);\r
- this.labelPath.Name = "labelPath";\r
- this.labelPath.Size = new System.Drawing.Size(40, 16);\r
- this.labelPath.TabIndex = 0;\r
- this.labelPath.Text = "Path:";\r
- this.labelPath.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\r
- // \r
- // textBoxPath\r
- // \r
- this.textBoxPath.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.textBoxPath.Location = new System.Drawing.Point(48, 6);\r
- this.textBoxPath.Name = "textBoxPath";\r
- this.textBoxPath.Size = new System.Drawing.Size(232, 20);\r
- this.textBoxPath.TabIndex = 1;\r
- this.textBoxPath.Text = "";\r
- this.textBoxPath.Leave += new System.EventHandler(this.textBoxPath_Leave);\r
- // \r
- // tree\r
- // \r
- this.tree.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \r
- | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.tree.ImageIndex = -1;\r
- this.tree.Location = new System.Drawing.Point(8, 32);\r
- this.tree.Name = "tree";\r
- this.tree.SelectedImageIndex = -1;\r
- this.tree.Size = new System.Drawing.Size(304, 288);\r
- this.tree.TabIndex = 3;\r
- this.tree.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.tree_BeforeSelect);\r
- this.tree.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.tree_BeforeExpand);\r
- // \r
- // buttonOK\r
- // \r
- this.buttonOK.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonOK.Location = new System.Drawing.Point(144, 328);\r
- this.buttonOK.Name = "buttonOK";\r
- this.buttonOK.TabIndex = 4;\r
- this.buttonOK.Text = "OK";\r
- this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);\r
- // \r
- // buttonCancel\r
- // \r
- this.buttonCancel.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonCancel.Location = new System.Drawing.Point(232, 328);\r
- this.buttonCancel.Name = "buttonCancel";\r
- this.buttonCancel.TabIndex = 5;\r
- this.buttonCancel.Text = "Cancel";\r
- this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);\r
- // \r
- // buttonParentDir\r
- // \r
- this.buttonParentDir.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonParentDir.Location = new System.Drawing.Point(288, 5);\r
- this.buttonParentDir.Name = "buttonParentDir";\r
- this.buttonParentDir.Size = new System.Drawing.Size(24, 23);\r
- this.buttonParentDir.TabIndex = 6;\r
- this.buttonParentDir.Text = "..";\r
- this.buttonParentDir.Click += new System.EventHandler(this.buttonParentDir_Click);\r
- // \r
- // DirectorySelectorForm\r
- // \r
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\r
- this.ClientSize = new System.Drawing.Size(320, 358);\r
- this.Controls.AddRange(new System.Windows.Forms.Control[] {\r
- this.buttonParentDir,\r
- this.buttonCancel,\r
- this.buttonOK,\r
- this.tree,\r
- this.textBoxPath,\r
- this.labelPath});\r
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;\r
- this.Name = "DirectorySelectorForm";\r
- this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;\r
- this.Text = "Select Directory";\r
- this.ResumeLayout(false);\r
-\r
- }\r
- #endregion\r
-\r
- private void buttonCancel_Click(object sender, System.EventArgs e)\r
- {\r
- this.DialogResult = DialogResult.Cancel;\r
- this.Close();\r
- }\r
-\r
- private void buttonOK_Click(object sender, System.EventArgs e)\r
- {\r
- this.DialogResult = DialogResult.OK;\r
- this.Close();\r
- }\r
-\r
- private void textBoxPath_Leave(object sender, System.EventArgs e)\r
- {\r
- if (SetCurrentDirectory(textBoxPath.Text))\r
- {\r
- InitializeTree();\r
- }\r
- }\r
-\r
- private void tree_BeforeExpand(object sender, System.Windows.Forms.TreeViewCancelEventArgs e)\r
- {\r
- foreach (TreeNode childDirNode in e.Node.Nodes)\r
- {\r
- if (childDirNode.Nodes.Count == 0)\r
- {\r
- CreateSubdirectoryNodes(childDirNode);\r
- }\r
- }\r
- }\r
-\r
- private void tree_BeforeSelect(object sender, System.Windows.Forms.TreeViewCancelEventArgs e)\r
- {\r
- string path = e.Node.Tag as string;\r
- this.textBoxPath.Text = path;\r
- this.selectedDirectoryName = path;\r
- }\r
-\r
- private void buttonParentDir_Click(object sender, System.EventArgs e)\r
- {\r
- DirectoryInfo parent = this.currentDirectory.Parent;\r
-\r
- if (parent != null && SetCurrentDirectory(parent.FullName))\r
- {\r
- textBoxPath.Text = parent.FullName;\r
- InitializeTree();\r
- }\r
- }\r
- }\r
-}\r
+++ /dev/null
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Drawing;\r
-using System.Collections;\r
-using System.ComponentModel;\r
-using System.Windows.Forms;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- /// <summary>\r
- /// Summary description for EditPropertyForm.\r
- /// </summary>\r
- public class EditPropertyForm : System.Windows.Forms.Form\r
- {\r
- private System.Windows.Forms.Label labelPropertyName;\r
- private System.Windows.Forms.Label labelPropertyValue;\r
- private System.Windows.Forms.TextBox textBoxPropertyName;\r
- private System.Windows.Forms.TextBox textBoxPropertyValue;\r
- private System.Windows.Forms.Button buttonOk;\r
- private System.Windows.Forms.Button buttonCancel;\r
- /// <summary>\r
- /// Required designer variable.\r
- /// </summary>\r
- private System.ComponentModel.Container components = null;\r
-\r
- public EditPropertyForm()\r
- {\r
- //\r
- // Required for Windows Form Designer support\r
- //\r
- InitializeComponent();\r
-\r
- //\r
- // TODO: Add any constructor code after InitializeComponent call\r
- //\r
- }\r
-\r
- /// <summary>\r
- /// Clean up any resources being used.\r
- /// </summary>\r
- protected override void Dispose( bool disposing )\r
- {\r
- if( disposing )\r
- {\r
- if(components != null)\r
- {\r
- components.Dispose();\r
- }\r
- }\r
- base.Dispose( disposing );\r
- }\r
-\r
- #region Windows Form Designer generated code\r
- /// <summary>\r
- /// Required method for Designer support - do not modify\r
- /// the contents of this method with the code editor.\r
- /// </summary>\r
- private void InitializeComponent()\r
- {\r
- this.labelPropertyName = new System.Windows.Forms.Label();\r
- this.labelPropertyValue = new System.Windows.Forms.Label();\r
- this.textBoxPropertyName = new System.Windows.Forms.TextBox();\r
- this.textBoxPropertyValue = new System.Windows.Forms.TextBox();\r
- this.buttonOk = new System.Windows.Forms.Button();\r
- this.buttonCancel = new System.Windows.Forms.Button();\r
- this.SuspendLayout();\r
- // \r
- // labelPropertyName\r
- // \r
- this.labelPropertyName.Location = new System.Drawing.Point(8, 8);\r
- this.labelPropertyName.Name = "labelPropertyName";\r
- this.labelPropertyName.Size = new System.Drawing.Size(100, 16);\r
- this.labelPropertyName.TabIndex = 0;\r
- this.labelPropertyName.Text = "Property Name";\r
- // \r
- // labelPropertyValue\r
- // \r
- this.labelPropertyValue.Location = new System.Drawing.Point(8, 56);\r
- this.labelPropertyValue.Name = "labelPropertyValue";\r
- this.labelPropertyValue.Size = new System.Drawing.Size(96, 16);\r
- this.labelPropertyValue.TabIndex = 1;\r
- this.labelPropertyValue.Text = "Property Value";\r
- // \r
- // textBoxPropertyName\r
- // \r
- this.textBoxPropertyName.Location = new System.Drawing.Point(8, 24);\r
- this.textBoxPropertyName.Name = "textBoxPropertyName";\r
- this.textBoxPropertyName.Size = new System.Drawing.Size(272, 20);\r
- this.textBoxPropertyName.TabIndex = 2;\r
- this.textBoxPropertyName.Text = "New Property";\r
- // \r
- // textBoxPropertyValue\r
- // \r
- this.textBoxPropertyValue.Location = new System.Drawing.Point(8, 72);\r
- this.textBoxPropertyValue.Name = "textBoxPropertyValue";\r
- this.textBoxPropertyValue.Size = new System.Drawing.Size(272, 20);\r
- this.textBoxPropertyValue.TabIndex = 3;\r
- this.textBoxPropertyValue.Text = "Property Value";\r
- // \r
- // buttonOk\r
- // \r
- this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK;\r
- this.buttonOk.Location = new System.Drawing.Point(120, 104);\r
- this.buttonOk.Name = "buttonOk";\r
- this.buttonOk.TabIndex = 4;\r
- this.buttonOk.Text = "OK";\r
- this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click);\r
- // \r
- // buttonCancel\r
- // \r
- this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
- this.buttonCancel.Location = new System.Drawing.Point(208, 104);\r
- this.buttonCancel.Name = "buttonCancel";\r
- this.buttonCancel.TabIndex = 5;\r
- this.buttonCancel.Text = "Cancel";\r
- this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);\r
- // \r
- // EditPropertyForm\r
- // \r
- this.AcceptButton = this.buttonOk;\r
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\r
- this.CancelButton = this.buttonCancel;\r
- this.ClientSize = new System.Drawing.Size(292, 136);\r
- this.Controls.AddRange(new System.Windows.Forms.Control[] {\r
- this.buttonCancel,\r
- this.buttonOk,\r
- this.textBoxPropertyValue,\r
- this.textBoxPropertyName,\r
- this.labelPropertyValue,\r
- this.labelPropertyName});\r
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;\r
- this.Name = "EditPropertyForm";\r
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\r
- this.Text = "Edit Project Property";\r
- this.ResumeLayout(false);\r
-\r
- }\r
- #endregion\r
-\r
- private void buttonCancel_Click(object sender, System.EventArgs e)\r
- {\r
- this.Close();\r
- }\r
-\r
- private void buttonOk_Click(object sender, System.EventArgs e)\r
- {\r
- this.Close();\r
- }\r
-\r
- #region Public Instance Properties\r
-\r
- public string PropertyName\r
- {\r
- get { return this.textBoxPropertyName.Text; }\r
- set { this.textBoxPropertyName.Text = value; }\r
- }\r
-\r
- public string PropertyValue\r
- {\r
- get { return this.textBoxPropertyValue.Text; }\r
- set { this.textBoxPropertyValue.Text = value; }\r
- }\r
-\r
- #endregion // Public Instance Properties\r
- }\r
-}\r
+++ /dev/null
-// ExampleCodeEditorForm.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Drawing;\r
-using System.Collections;\r
-using System.ComponentModel;\r
-using System.Windows.Forms;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- /// <summary>\r
- /// Summary description for ExampleCodeEditorForm.\r
- /// </summary>\r
- public class ExampleCodeEditorForm : System.Windows.Forms.Form\r
- {\r
- // TODO: figure out how to munge TextBox to support simple autoindent.\r
-\r
- private System.Windows.Forms.Label labelExampleLanguage;\r
- private System.Windows.Forms.ComboBox comboBoxExampleLanguage;\r
- private System.Windows.Forms.Button buttonOk;\r
- private System.Windows.Forms.Button buttonCancel;\r
- private System.Windows.Forms.TextBox textBoxExampleText;\r
- /// <summary>\r
- /// Required designer variable.\r
- /// </summary>\r
- private System.ComponentModel.Container components = null;\r
-\r
- public ExampleCodeEditorForm()\r
- {\r
- //\r
- // Required for Windows Form Designer support\r
- //\r
- InitializeComponent();\r
-\r
- //\r
- // TODO: Add any constructor code after InitializeComponent call\r
- //\r
- }\r
-\r
- /// <summary>\r
- /// Clean up any resources being used.\r
- /// </summary>\r
- protected override void Dispose( bool disposing )\r
- {\r
- if( disposing )\r
- {\r
- if(components != null)\r
- {\r
- components.Dispose();\r
- }\r
- }\r
- base.Dispose( disposing );\r
- }\r
-\r
- #region Windows Form Designer generated code\r
- /// <summary>\r
- /// Required method for Designer support - do not modify\r
- /// the contents of this method with the code editor.\r
- /// </summary>\r
- private void InitializeComponent()\r
- {\r
- this.labelExampleLanguage = new System.Windows.Forms.Label();\r
- this.comboBoxExampleLanguage = new System.Windows.Forms.ComboBox();\r
- this.buttonOk = new System.Windows.Forms.Button();\r
- this.buttonCancel = new System.Windows.Forms.Button();\r
- this.textBoxExampleText = new System.Windows.Forms.TextBox();\r
- this.SuspendLayout();\r
- // \r
- // labelExampleLanguage\r
- // \r
- this.labelExampleLanguage.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);\r
- this.labelExampleLanguage.Location = new System.Drawing.Point(168, 8);\r
- this.labelExampleLanguage.Name = "labelExampleLanguage";\r
- this.labelExampleLanguage.Size = new System.Drawing.Size(112, 16);\r
- this.labelExampleLanguage.TabIndex = 0;\r
- this.labelExampleLanguage.Text = "Example Language:";\r
- this.labelExampleLanguage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\r
- // \r
- // comboBoxExampleLanguage\r
- // \r
- this.comboBoxExampleLanguage.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);\r
- this.comboBoxExampleLanguage.Items.AddRange(new object[] {\r
- "C#"});\r
- this.comboBoxExampleLanguage.Location = new System.Drawing.Point(280, 6);\r
- this.comboBoxExampleLanguage.Name = "comboBoxExampleLanguage";\r
- this.comboBoxExampleLanguage.Size = new System.Drawing.Size(121, 21);\r
- this.comboBoxExampleLanguage.TabIndex = 1;\r
- // \r
- // buttonOk\r
- // \r
- this.buttonOk.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonOk.Location = new System.Drawing.Point(248, 353);\r
- this.buttonOk.Name = "buttonOk";\r
- this.buttonOk.Size = new System.Drawing.Size(64, 24);\r
- this.buttonOk.TabIndex = 2;\r
- this.buttonOk.Text = "OK";\r
- // \r
- // buttonCancel\r
- // \r
- this.buttonCancel.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
- this.buttonCancel.Location = new System.Drawing.Point(328, 353);\r
- this.buttonCancel.Name = "buttonCancel";\r
- this.buttonCancel.Size = new System.Drawing.Size(64, 24);\r
- this.buttonCancel.TabIndex = 3;\r
- this.buttonCancel.Text = "Cancel";\r
- // \r
- // textBoxExampleText\r
- // \r
- this.textBoxExampleText.AcceptsReturn = true;\r
- this.textBoxExampleText.AcceptsTab = true;\r
- this.textBoxExampleText.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \r
- | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.textBoxExampleText.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));\r
- this.textBoxExampleText.Location = new System.Drawing.Point(8, 32);\r
- this.textBoxExampleText.Multiline = true;\r
- this.textBoxExampleText.Name = "textBoxExampleText";\r
- this.textBoxExampleText.ScrollBars = System.Windows.Forms.ScrollBars.Both;\r
- this.textBoxExampleText.Size = new System.Drawing.Size(392, 313);\r
- this.textBoxExampleText.TabIndex = 4;\r
- this.textBoxExampleText.Text = "// example code";\r
- this.textBoxExampleText.WordWrap = false;\r
- // \r
- // ExampleCodeEditorForm\r
- // \r
- this.AcceptButton = this.buttonOk;\r
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\r
- this.CancelButton = this.buttonCancel;\r
- this.ClientSize = new System.Drawing.Size(408, 382);\r
- this.Controls.AddRange(new System.Windows.Forms.Control[] {\r
- this.textBoxExampleText,\r
- this.buttonCancel,\r
- this.buttonOk,\r
- this.comboBoxExampleLanguage,\r
- this.labelExampleLanguage});\r
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;\r
- this.Name = "ExampleCodeEditorForm";\r
- this.ShowInTaskbar = false;\r
- this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;\r
- this.Text = "Example Code Editor";\r
- this.ResumeLayout(false);\r
-\r
- }\r
- #endregion\r
- }\r
-}\r
+++ /dev/null
-// GenericEditorForm.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Drawing;\r
-using System.Collections;\r
-using System.ComponentModel;\r
-using System.Windows.Forms;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- /// <summary>\r
- /// Summary description for GenericEditorForm.\r
- /// </summary>\r
- public class GenericEditorForm : System.Windows.Forms.Form\r
- {\r
- protected System.Windows.Forms.ToolBar toolBar;\r
- protected System.Windows.Forms.Label labelSummary;\r
- protected System.Windows.Forms.TextBox textBoxSummary;\r
- protected System.Windows.Forms.Label labelRemarks;\r
- protected System.Windows.Forms.TextBox textBoxRemarks;\r
- protected System.Windows.Forms.Label labelSeeAlso;\r
- protected System.Windows.Forms.ComboBox comboBoxLanguage;\r
- protected System.Windows.Forms.Label labelLanguage;\r
- protected System.Windows.Forms.ListView listViewSeeAlso;\r
- /// <summary>\r
- /// Required designer variable.\r
- /// </summary>\r
- private System.ComponentModel.Container components = null;\r
-\r
- public GenericEditorForm()\r
- {\r
- //\r
- // Required for Windows Form Designer support\r
- //\r
- InitializeComponent();\r
-\r
- // TODO: hack so I can see the toolbar and ListView\r
- toolBar.ImageList = AssemblyTreeImages.List;\r
- listViewSeeAlso.SmallImageList = AssemblyTreeImages.List;\r
-\r
- for (int j = 0; j < toolBar.ImageList.Images.Count; j++) \r
- {\r
- ToolBarButton b = new ToolBarButton();\r
- b.ImageIndex = j;\r
- toolBar.Buttons.Add(b);\r
-\r
- ListViewItem i = new ListViewItem("See Also " + j.ToString(), j);\r
- listViewSeeAlso.Items.Add(i);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Clean up any resources being used.\r
- /// </summary>\r
- protected override void Dispose( bool disposing )\r
- {\r
- if( disposing )\r
- {\r
- if(components != null)\r
- {\r
- components.Dispose();\r
- }\r
- }\r
- base.Dispose( disposing );\r
- }\r
-\r
- #region Windows Form Designer generated code\r
- /// <summary>\r
- /// Required method for Designer support - do not modify\r
- /// the contents of this method with the code editor.\r
- /// </summary>\r
- private void InitializeComponent()\r
- {\r
- this.toolBar = new System.Windows.Forms.ToolBar();\r
- this.labelSummary = new System.Windows.Forms.Label();\r
- this.textBoxSummary = new System.Windows.Forms.TextBox();\r
- this.labelRemarks = new System.Windows.Forms.Label();\r
- this.textBoxRemarks = new System.Windows.Forms.TextBox();\r
- this.labelSeeAlso = new System.Windows.Forms.Label();\r
- this.comboBoxLanguage = new System.Windows.Forms.ComboBox();\r
- this.labelLanguage = new System.Windows.Forms.Label();\r
- this.listViewSeeAlso = new System.Windows.Forms.ListView();\r
- this.SuspendLayout();\r
- // \r
- // toolBar\r
- // \r
- this.toolBar.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.toolBar.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;\r
- this.toolBar.Divider = false;\r
- this.toolBar.Dock = System.Windows.Forms.DockStyle.None;\r
- this.toolBar.DropDownArrows = true;\r
- this.toolBar.Location = new System.Drawing.Point(8, 0);\r
- this.toolBar.Name = "toolBar";\r
- this.toolBar.ShowToolTips = true;\r
- this.toolBar.Size = new System.Drawing.Size(416, 23);\r
- this.toolBar.TabIndex = 0;\r
- this.toolBar.TextAlign = System.Windows.Forms.ToolBarTextAlign.Right;\r
- this.toolBar.Wrappable = false;\r
- // \r
- // labelSummary\r
- // \r
- this.labelSummary.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.labelSummary.Location = new System.Drawing.Point(8, 64);\r
- this.labelSummary.Name = "labelSummary";\r
- this.labelSummary.Size = new System.Drawing.Size(416, 16);\r
- this.labelSummary.TabIndex = 1;\r
- this.labelSummary.Text = "Summary";\r
- // \r
- // textBoxSummary\r
- // \r
- this.textBoxSummary.AcceptsReturn = true;\r
- this.textBoxSummary.AcceptsTab = true;\r
- this.textBoxSummary.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.textBoxSummary.Location = new System.Drawing.Point(8, 80);\r
- this.textBoxSummary.Multiline = true;\r
- this.textBoxSummary.Name = "textBoxSummary";\r
- this.textBoxSummary.Size = new System.Drawing.Size(416, 72);\r
- this.textBoxSummary.TabIndex = 2;\r
- this.textBoxSummary.Text = "Insert summary here.";\r
- // \r
- // labelRemarks\r
- // \r
- this.labelRemarks.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.labelRemarks.Location = new System.Drawing.Point(8, 160);\r
- this.labelRemarks.Name = "labelRemarks";\r
- this.labelRemarks.Size = new System.Drawing.Size(416, 16);\r
- this.labelRemarks.TabIndex = 3;\r
- this.labelRemarks.Text = "Remarks";\r
- // \r
- // textBoxRemarks\r
- // \r
- this.textBoxRemarks.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \r
- | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.textBoxRemarks.Location = new System.Drawing.Point(8, 176);\r
- this.textBoxRemarks.Multiline = true;\r
- this.textBoxRemarks.Name = "textBoxRemarks";\r
- this.textBoxRemarks.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\r
- this.textBoxRemarks.Size = new System.Drawing.Size(416, 192);\r
- this.textBoxRemarks.TabIndex = 3;\r
- this.textBoxRemarks.Text = "Insert remarks here.";\r
- // \r
- // labelSeeAlso\r
- // \r
- this.labelSeeAlso.Anchor = ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.labelSeeAlso.Location = new System.Drawing.Point(8, 376);\r
- this.labelSeeAlso.Name = "labelSeeAlso";\r
- this.labelSeeAlso.Size = new System.Drawing.Size(416, 16);\r
- this.labelSeeAlso.TabIndex = 5;\r
- this.labelSeeAlso.Text = "See Also";\r
- // \r
- // comboBoxLanguage\r
- // \r
- this.comboBoxLanguage.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);\r
- this.comboBoxLanguage.Location = new System.Drawing.Point(304, 32);\r
- this.comboBoxLanguage.Name = "comboBoxLanguage";\r
- this.comboBoxLanguage.Size = new System.Drawing.Size(121, 21);\r
- this.comboBoxLanguage.TabIndex = 1;\r
- this.comboBoxLanguage.Text = "English (en)";\r
- // \r
- // labelLanguage\r
- // \r
- this.labelLanguage.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.labelLanguage.Location = new System.Drawing.Point(8, 34);\r
- this.labelLanguage.Name = "labelLanguage";\r
- this.labelLanguage.Size = new System.Drawing.Size(296, 16);\r
- this.labelLanguage.TabIndex = 8;\r
- this.labelLanguage.Text = "Language:";\r
- this.labelLanguage.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\r
- // \r
- // listViewSeeAlso\r
- // \r
- this.listViewSeeAlso.Anchor = ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.listViewSeeAlso.GridLines = true;\r
- this.listViewSeeAlso.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;\r
- this.listViewSeeAlso.LabelWrap = false;\r
- this.listViewSeeAlso.Location = new System.Drawing.Point(8, 392);\r
- this.listViewSeeAlso.Name = "listViewSeeAlso";\r
- this.listViewSeeAlso.Size = new System.Drawing.Size(416, 72);\r
- this.listViewSeeAlso.Sorting = System.Windows.Forms.SortOrder.Ascending;\r
- this.listViewSeeAlso.TabIndex = 4;\r
- this.listViewSeeAlso.View = System.Windows.Forms.View.List;\r
- // \r
- // GenericEditorForm\r
- // \r
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\r
- this.ClientSize = new System.Drawing.Size(432, 477);\r
- this.Controls.AddRange(new System.Windows.Forms.Control[] {\r
- this.listViewSeeAlso,\r
- this.labelLanguage,\r
- this.comboBoxLanguage,\r
- this.labelSeeAlso,\r
- this.textBoxRemarks,\r
- this.labelRemarks,\r
- this.textBoxSummary,\r
- this.labelSummary,\r
- this.toolBar});\r
- this.Name = "GenericEditorForm";\r
- this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;\r
- this.Text = "GenericEditorForm";\r
- this.ResumeLayout(false);\r
-\r
- }\r
- #endregion\r
- }\r
-}\r
+++ /dev/null
-<VisualStudioProject>\r
- <CSHARP\r
- ProjectType = "Local"\r
- ProductVersion = "7.0.9466"\r
- SchemaVersion = "1.0"\r
- ProjectGuid = "{B76CBA27-ABBD-45FE-AFC3-A629BC13BAAE}"\r
- >\r
- <Build>\r
- <Settings\r
- ApplicationIcon = ""\r
- AssemblyKeyContainerName = ""\r
- AssemblyName = "monodoc"\r
- AssemblyOriginatorKeyFile = ""\r
- DefaultClientScript = "JScript"\r
- DefaultHTMLPageLayout = "Grid"\r
- DefaultTargetSchema = "IE50"\r
- DelaySign = "false"\r
- OutputType = "WinExe"\r
- RootNamespace = "Mono.Doc.Gui"\r
- StartupObject = "Mono.Doc.Gui.GuiDriver"\r
- >\r
- <Config\r
- Name = "Debug"\r
- AllowUnsafeBlocks = "false"\r
- BaseAddress = "285212672"\r
- CheckForOverflowUnderflow = "false"\r
- ConfigurationOverrideFile = ""\r
- DefineConstants = "DEBUG;TRACE"\r
- DocumentationFile = ""\r
- DebugSymbols = "true"\r
- FileAlignment = "4096"\r
- IncrementalBuild = "true"\r
- Optimize = "false"\r
- OutputPath = "..\..\build\"\r
- RegisterForComInterop = "false"\r
- RemoveIntegerChecks = "false"\r
- TreatWarningsAsErrors = "false"\r
- WarningLevel = "4"\r
- />\r
- <Config\r
- Name = "Release"\r
- AllowUnsafeBlocks = "false"\r
- BaseAddress = "285212672"\r
- CheckForOverflowUnderflow = "false"\r
- ConfigurationOverrideFile = ""\r
- DefineConstants = "TRACE"\r
- DocumentationFile = ""\r
- DebugSymbols = "false"\r
- FileAlignment = "4096"\r
- IncrementalBuild = "false"\r
- Optimize = "true"\r
- OutputPath = "..\..\build\"\r
- RegisterForComInterop = "false"\r
- RemoveIntegerChecks = "false"\r
- TreatWarningsAsErrors = "false"\r
- WarningLevel = "4"\r
- />\r
- </Settings>\r
- <References>\r
- <Reference\r
- Name = "Core"\r
- Project = "{73F5A60D-A5E3-4852-B4C6-478275E733F9}"\r
- Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"\r
- />\r
- <Reference\r
- Name = "System"\r
- AssemblyName = "System"\r
- HintPath = "D:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.dll"\r
- />\r
- <Reference\r
- Name = "System.Drawing"\r
- AssemblyName = "System.Drawing"\r
- HintPath = "D:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll"\r
- />\r
- <Reference\r
- Name = "System.Windows.Forms"\r
- AssemblyName = "System.Windows.Forms"\r
- HintPath = "D:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll"\r
- />\r
- <Reference\r
- Name = "System.Data"\r
- AssemblyName = "System.Data"\r
- HintPath = "D:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"\r
- />\r
- <Reference\r
- Name = "System.XML"\r
- AssemblyName = "System.Xml"\r
- HintPath = "D:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"\r
- />\r
- </References>\r
- </Build>\r
- <Files>\r
- <Include>\r
- <File\r
- RelPath = "AboutForm.cs"\r
- SubType = "Form"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "AboutForm.resx"\r
- DependentUpon = "AboutForm.cs"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- <File\r
- RelPath = "AssemblyTreeImages.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "AssemblyTreeLoader.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "DirectorySelectorForm.cs"\r
- SubType = "Form"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "DirectorySelectorForm.resx"\r
- DependentUpon = "DirectorySelectorForm.cs"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- <File\r
- RelPath = "EditPropertyForm.cs"\r
- SubType = "Form"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "EditPropertyForm.resx"\r
- DependentUpon = "EditPropertyForm.cs"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- <File\r
- RelPath = "ExampleCodeEditorForm.cs"\r
- SubType = "Form"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "ExampleCodeEditorForm.resx"\r
- DependentUpon = "ExampleCodeEditorForm.cs"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- <File\r
- RelPath = "GenericEditorForm.cs"\r
- SubType = "Form"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "GenericEditorForm.resx"\r
- DependentUpon = "GenericEditorForm.cs"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- <File\r
- RelPath = "GuiDriver.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "GuiResources.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "ImageResources.resx"\r
- Link = "..\..\etc\gui\ImageResources.resx"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- <File\r
- RelPath = "MainForm.cs"\r
- SubType = "Form"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "MainForm.resx"\r
- DependentUpon = "MainForm.cs"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- <File\r
- RelPath = "MdiToolBar.cs"\r
- SubType = "Component"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "MdiToolBar.resx"\r
- DependentUpon = "MdiToolBar.cs"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- <File\r
- RelPath = "ProjectOptionsForm.cs"\r
- SubType = "Form"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "ProjectOptionsForm.resx"\r
- DependentUpon = "ProjectOptionsForm.cs"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- <File\r
- RelPath = "TextResources.resx"\r
- Link = "..\..\etc\gui\TextResources.resx"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- <File\r
- RelPath = "TypeEditorForm.cs"\r
- SubType = "Form"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "TypeEditorForm.resx"\r
- DependentUpon = "TypeEditorForm.cs"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- <File\r
- RelPath = "UnexpectedErrorForm.cs"\r
- SubType = "Form"\r
- BuildAction = "Compile"\r
- />\r
- <File\r
- RelPath = "UnexpectedErrorForm.resx"\r
- DependentUpon = "UnexpectedErrorForm.cs"\r
- BuildAction = "EmbeddedResource"\r
- />\r
- </Include>\r
- </Files>\r
- </CSHARP>\r
-</VisualStudioProject>\r
-\r
+++ /dev/null
-// GuiDriver.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Windows.Forms;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- public abstract class GuiDriver\r
- {\r
- [STAThread]\r
- public static void Main(string[] args) \r
- {\r
- try\r
- {\r
- // DEBUG: testing UnexpectedErrorForm\r
- //throw new ApplicationException("test exception");\r
- Application.Run(new MainForm((args.Length > 0) ? args[0] : null));\r
- }\r
- catch (Exception e)\r
- {\r
- UnexpectedErrorForm error = new UnexpectedErrorForm(e);\r
- error.ShowDialog();\r
- }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// GuiResources.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Drawing;\r
-using System.Reflection;\r
-using System.Resources;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- /// <summary>\r
- /// Summary description for Resources.\r
- /// </summary>\r
- public class GuiResources\r
- {\r
- private static ResourceManager imageMgr = null;\r
- private static ResourceManager textMgr = null;\r
-\r
- // this class cannot be instantiated\r
- private GuiResources()\r
- {\r
- }\r
-\r
- static GuiResources()\r
- {\r
- imageMgr = new ResourceManager("Mono.Doc.Gui.ImageResources", Assembly.GetExecutingAssembly());\r
- textMgr = new ResourceManager("Mono.Doc.Gui.TextResources", Assembly.GetExecutingAssembly());\r
- }\r
-\r
- public static Bitmap AssemblyTreeBitmap\r
- {\r
- get { return (Bitmap) imageMgr.GetObject("AssemblyTree.Bitmap"); }\r
- }\r
-\r
- public static Bitmap AboutMonodocBitmap\r
- {\r
- get { return (Bitmap) imageMgr.GetObject("AboutMonodoc.Bitmap"); }\r
- }\r
-\r
- public static Bitmap ErrorExplosionBitmap\r
- {\r
- get { return (Bitmap) imageMgr.GetObject("ErrorExplosion.Bitmap"); }\r
- }\r
-\r
- public static Icon OpenBookIcon\r
- {\r
- get { return (Icon) imageMgr.GetObject("OpenBook.Icon"); }\r
- }\r
-\r
- public static Icon ClosedBookIcon\r
- {\r
- get { return (Icon) imageMgr.GetObject("ClosedBook.Icon"); }\r
- }\r
-\r
- public static string GetString(string key)\r
- {\r
- return textMgr.GetString(key);\r
- }\r
- }\r
-}\r
+++ /dev/null
-// MainForm.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Collections;\r
-using System.ComponentModel;\r
-using System.Drawing;\r
-using System.IO;\r
-using System.Reflection;\r
-using System.Windows.Forms;\r
-\r
-using Mono.Doc.Core;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- public class MainForm : Form\r
- {\r
- #region Private Instance Fields\r
-\r
- // project\r
- private DocProject project;\r
- private string projectName;\r
-\r
- // mdi toolbar\r
- private MdiToolBar mdiToolBar;\r
-\r
- // main menu / items\r
- private MainMenu mainMenu;\r
- private MenuItem menuFile;\r
- private MenuItem menuFileNew;\r
- private MenuItem menuFileOpen;\r
- private MenuItem menuFileClose;\r
- private MenuItem menuFileSave;\r
- private MenuItem menuFileSaveAs;\r
- private MenuItem menuFileSeparator1;\r
- private MenuItem menuFileRecent;\r
- private MenuItem menuFileSeparator2;\r
- private MenuItem menuFileExit;\r
- private MenuItem menuEdit;\r
- private MenuItem menuWindow;\r
- private MenuItem menuWindowCascade;\r
- private MenuItem menuWindowTile;\r
- private MenuItem menuWindowTileHorizontal;\r
- private MenuItem menuDebug;\r
- private MenuItem menuDebugHaltAndCatchFire;\r
- private MenuItem menuDebugDisplayGeneric;\r
- private MenuItem menuHelp;\r
- private MenuItem menuHelpAbout;\r
-\r
- // tree context menu / items\r
- private ContextMenu treeProjectMenu;\r
- private MenuItem treeMenuProjectAddAssembly;\r
- private MenuItem treeMenuProjectAddDirectory;\r
- private MenuItem treeMenuProjectSeparator1;\r
- private MenuItem treeMenuProjectOptions;\r
- private ContextMenu treeShortcutMenu;\r
- private MenuItem treeMenuShortcutClear;\r
- private ContextMenu treeDirectoryMenu;\r
- private MenuItem treeMenuDirectoryAdd;\r
- private ContextMenu treeAssemblyMenu;\r
- private MenuItem treeMenuAssemblyAdd;\r
-\r
- // status bar\r
- private StatusBar status;\r
-\r
- // project tree\r
- private TreeView tree;\r
- private TreeNode treeProjectRootNode;\r
- private TreeNode treeShortcutsNode;\r
- private TreeNode treeDirectoryNode;\r
- private TreeNode treeAssemblyNode;\r
-\r
- // splitter\r
- private Splitter verticalSplitter;\r
-\r
- #endregion // Private Instance Fields\r
-\r
- #region Constructors and Destructors\r
-\r
- public MainForm(string projectFile)\r
- {\r
- this.project = new DocProject();\r
- this.project.Modified += new EventHandler(this.project_Modified );\r
-\r
- UpdateTitle();\r
-\r
- this.SuspendLayout();\r
-\r
- // this\r
- this.AutoScaleBaseSize = new Size(5, 13);\r
- this.IsMdiContainer = true;\r
- this.Name = "MainForm";\r
-\r
- // mdiToolBar\r
- this.mdiToolBar = new MdiToolBar();\r
- this.mdiToolBar.Dock = DockStyle.Top; // TODO: make this configurable\r
- this.mdiToolBar.TextAlign = ToolBarTextAlign.Right;\r
- this.mdiToolBar.Divider = true; // TODO: only if it's docked at the top.\r
- this.mdiToolBar.ImageList = AssemblyTreeImages.List;\r
- this.mdiToolBar.Appearance = ToolBarAppearance.Flat;\r
-\r
- // set initial size to 75% of the current screen\r
- // TODO: this should only happen if we have no size prefs\r
- // HACK: not sure how best to determine the current screen for multihead users\r
- Rectangle workArea = Screen.PrimaryScreen.WorkingArea;\r
- int x = (int) (workArea.Width * 0.75);\r
- int y = (int) (workArea.Height * 0.75);\r
- this.ClientSize = new Size(x, y);\r
-\r
- // won't completely remove flicker, but it helps\r
- this.SetStyle(ControlStyles.DoubleBuffer, true);\r
-\r
- // main menu / items\r
- this.mainMenu = new MainMenu();\r
- this.menuFile = new MenuItem();\r
- this.menuFileNew = new MenuItem();\r
- this.menuFileOpen = new MenuItem();\r
- this.menuFileClose = new MenuItem();\r
- this.menuFileSave = new MenuItem();\r
- this.menuFileSaveAs = new MenuItem();\r
- this.menuFileSeparator1 = new MenuItem();\r
- this.menuFileRecent = new MenuItem();\r
- this.menuFileSeparator2 = new MenuItem();\r
- this.menuFileExit = new MenuItem();\r
- this.menuEdit = new MenuItem();\r
- this.menuWindow = new MenuItem();\r
- this.menuWindowCascade = new MenuItem();\r
- this.menuWindowTile = new MenuItem();\r
- this.menuWindowTileHorizontal = new MenuItem();\r
- this.menuDebug = new MenuItem();\r
- this.menuDebugHaltAndCatchFire = new MenuItem();\r
- this.menuDebugDisplayGeneric = new MenuItem();\r
- this.menuHelp = new MenuItem();\r
- this.menuHelpAbout = new MenuItem();\r
-\r
- InitializeMainMenu();\r
-\r
- // status bar\r
- this.status = new StatusBar();\r
- this.status.Text = "Ready.";\r
-\r
- // project tree\r
- this.tree = new TreeView();\r
- this.treeAssemblyNode = new TreeNode();\r
- this.treeDirectoryNode = new TreeNode();\r
- this.treeProjectRootNode = new TreeNode();\r
- this.treeShortcutsNode = new TreeNode();\r
-\r
- InitializeTree();\r
-\r
- // vertical splitter\r
- // TODO: figure out how to store location in prefs\r
- this.verticalSplitter = new Splitter();\r
- this.verticalSplitter.Name = "verticalSplitter";\r
- this.verticalSplitter.TabStop = false;\r
-\r
- // add components and layout\r
- this.Menu = this.mainMenu;\r
- this.Controls.AddRange(new Control[] {\r
- this.mdiToolBar,\r
- this.verticalSplitter,\r
- this.tree,\r
- this.status\r
- });\r
-\r
- this.ResumeLayout(false);\r
-\r
- // project tree context menus\r
- this.treeProjectMenu = new ContextMenu();\r
- this.treeMenuProjectAddAssembly = new MenuItem();\r
- this.treeMenuProjectAddDirectory = new MenuItem();\r
- this.treeMenuProjectSeparator1 = new MenuItem();\r
- this.treeMenuProjectOptions = new MenuItem();\r
-\r
- this.treeShortcutMenu = new ContextMenu();\r
- this.treeMenuShortcutClear = new MenuItem();\r
-\r
- this.treeDirectoryMenu = new ContextMenu();\r
- this.treeMenuDirectoryAdd = new MenuItem();\r
-\r
- this.treeAssemblyMenu = new ContextMenu();\r
- this.treeMenuAssemblyAdd = new MenuItem();\r
-\r
- InitializeTreeContextMenu();\r
- }\r
-\r
- protected override void Dispose(bool disposing)\r
- {\r
- base.Dispose(disposing);\r
- }\r
-\r
- #endregion // Constructors and Destructors\r
-\r
- #region Private Instance Methods\r
-\r
- private void DisplayCorrectTreeMenu(Point showAt)\r
- {\r
- ContextMenu displayMenu = null;\r
-\r
- if (this.treeProjectRootNode == tree.SelectedNode)\r
- {\r
- displayMenu = this.treeProjectMenu;\r
- }\r
- else if (this.treeShortcutsNode == tree.SelectedNode)\r
- {\r
- displayMenu = this.treeShortcutMenu;\r
- }\r
- else if (this.treeDirectoryNode == tree.SelectedNode)\r
- {\r
- displayMenu = this.treeDirectoryMenu;\r
- }\r
- else if (this.treeAssemblyNode == tree.SelectedNode)\r
- {\r
- displayMenu = this.treeAssemblyMenu;\r
- }\r
-\r
- if (displayMenu != null)\r
- {\r
- displayMenu.Show(this.tree, showAt);\r
- }\r
- }\r
-\r
- private void Clear()\r
- {\r
- project.Clear();\r
- }\r
-\r
- private void CloseProject()\r
- {\r
- if (project.IsModified)\r
- {\r
- // TODO: i18n\r
- DialogResult r = MessageBox.Show(\r
- "Save changes to " + projectName + "?",\r
- "Save Modified Project",\r
- MessageBoxButtons.YesNoCancel,\r
- MessageBoxIcon.Question,\r
- MessageBoxDefaultButton.Button1\r
- );\r
-\r
- switch (r)\r
- {\r
- case DialogResult.Yes:\r
- SaveOrSaveAsProject();\r
- Clear();\r
- UpdateTitle();\r
- InitializeTree();\r
- break;\r
- case DialogResult.No:\r
- Clear();\r
- UpdateTitle();\r
- InitializeTree();\r
- break;\r
- }\r
- }\r
- else\r
- {\r
- Clear();\r
- UpdateTitle();\r
- InitializeTree();\r
- }\r
- }\r
-\r
- private void UpdateTitle()\r
- {\r
- string title = GuiResources.GetString("Form.Main.Title");\r
-\r
- if (project.IsNewProject)\r
- {\r
- projectName = DocProject.UntitledProjectName;\r
- }\r
- else\r
- {\r
- projectName = Path.GetFileName(project.FilePath);\r
- projectName = projectName.Substring(0, projectName.LastIndexOf('.'));\r
- }\r
-\r
- this.Text = projectName + (project.IsModified ? "*" : "") + " - " + title;\r
- }\r
-\r
- private void SaveOrSaveAsProject()\r
- {\r
- if (project.IsNewProject)\r
- {\r
- SaveAsProject();\r
- }\r
- else\r
- {\r
- SaveProject();\r
- }\r
- }\r
-\r
- private void SaveAsProject()\r
- {\r
- SaveFileDialog save = new SaveFileDialog();\r
-\r
- if (project.IsNewProject)\r
- {\r
- save.FileName =\r
- "." + \r
- Path.DirectorySeparatorChar +\r
- DocProject.UntitledProjectName +\r
- ".mdproj"; // TODO: abstract constant\r
- }\r
- else\r
- {\r
- save.FileName = project.FilePath;\r
- }\r
-\r
- save.Filter = "Monodoc Project Files (*.mdproj)|*.mdproj|All Files (*.*)|*.*"; // TODO: abstract constrant\r
- save.RestoreDirectory = true;\r
-\r
- if (save.ShowDialog() == DialogResult.OK)\r
- {\r
- project.FilePath = save.FileName;\r
- SaveProject();\r
- InitializeTree();\r
- }\r
- }\r
-\r
- private void SaveProject()\r
- {\r
- try\r
- {\r
- project.Save();\r
- UpdateTitle();\r
- }\r
- catch (MonodocException mde)\r
- {\r
- // TODO: error handling\r
- MessageBox.Show("MonodocException during project save: " + mde.Message);\r
- }\r
- catch (Exception e)\r
- {\r
- // TODO: better error handling\r
- MessageBox.Show("OTHER exception during project open: " + e.Message);\r
- }\r
- }\r
-\r
- private void LoadSourceDocuments()\r
- {\r
- int fileCount = 0;\r
-\r
- try\r
- {\r
- foreach (string dirName in this.project.XmlDirectories)\r
- {\r
- // TODO: abstract constant\r
- RecursiveFileList fileList = new RecursiveFileList(dirName, "*.xml");\r
-\r
- foreach (FileInfo f in fileList.Files)\r
- {\r
- this.status.Text = "Scanning file: " + f.Name;\r
- fileCount++;\r
- }\r
- }\r
-\r
- this.status.Text = "Scanned " + fileCount + " XML source files.";\r
- }\r
- catch (Exception e)\r
- {\r
- // TODO: better error handling\r
- MessageBox.Show("Problem while trying to scan XML source directories.\n" +\r
- e.Message + "\n" +\r
- e.StackTrace\r
- );\r
- }\r
- }\r
-\r
- private void OpenProject(string fileName)\r
- {\r
- try\r
- {\r
- project.Load(fileName);\r
- UpdateTitle();\r
- InitializeTree();\r
- LoadSourceDocuments();\r
- }\r
- catch (MonodocException mde)\r
- {\r
- // TODO: better error handling\r
- MessageBox.Show("MonodocException during project open: " + mde.Message);\r
- }\r
- catch (Exception e)\r
- {\r
- // TODO: better error handling\r
- MessageBox.Show("OTHER exception during project open: " + e.Message + "\n" + e.StackTrace);\r
- }\r
- }\r
-\r
- #endregion // Private Instance Methods\r
-\r
- #region Tree Init\r
-\r
- private void InitializeTree()\r
- {\r
- \r
- // tree\r
- this.tree.Dock = DockStyle.Left;\r
- this.tree.ImageList = AssemblyTreeImages.List;\r
- this.tree.ImageIndex = 0;\r
- this.tree.SelectedImageIndex = 0;\r
- this.tree.Name = "tree";\r
- this.tree.TabIndex = 1;\r
- this.tree.AfterSelect += new TreeViewEventHandler(this.tree_AfterSelect);\r
- this.tree.MouseUp += new MouseEventHandler(this.tree_MouseUp);\r
-\r
- // treeAssemblyNode\r
- this.treeAssemblyNode.Text = "Assemblies"; // TODO: i18n\r
- this.treeAssemblyNode.ImageIndex = AssemblyTreeImages.AssemblyClosed;\r
- this.treeAssemblyNode.SelectedImageIndex = AssemblyTreeImages.AssemblyClosed;\r
- this.treeAssemblyNode.Tag = "ASSEMBLIES"; // TODO: abstract constant\r
- \r
- // treeDirectoryNode\r
- this.treeDirectoryNode.Text = "Source Directories"; // TODO: i18n\r
- this.treeDirectoryNode.ImageIndex = AssemblyTreeImages.Shortcuts; // TODO: folder image\r
- this.treeDirectoryNode.SelectedImageIndex = AssemblyTreeImages.Shortcuts;\r
- this.treeDirectoryNode.Tag = "DIRECTORIES"; // TODO: abstract constant\r
-\r
- // treeProjectRootNode\r
- this.treeProjectRootNode.Text = projectName + " Project"; // TODO: i18n\r
- this.treeProjectRootNode.ImageIndex = AssemblyTreeImages.Shortcuts; // TODO: project image\r
- this.treeProjectRootNode.SelectedImageIndex = AssemblyTreeImages.Shortcuts;\r
- this.treeProjectRootNode.Tag = "PROJECT"; // TODO: abstract constant\r
-\r
- // treeShortcutsNode\r
- this.treeShortcutsNode.Text = "Shortcuts"; // TODO: i18n\r
- this.treeShortcutsNode.ImageIndex = AssemblyTreeImages.Shortcuts;\r
- this.treeShortcutsNode.SelectedImageIndex = AssemblyTreeImages.Shortcuts;\r
- this.treeShortcutsNode.Tag = "SHORTCUTS"; // TODO: abstract constant\r
-\r
- this.tree.BeginUpdate();\r
- this.tree.Nodes.Clear();\r
-\r
- // ugh. appears necessary to effectively rebuild the tree.\r
- TreeNode[] nodesToRemove = new TreeNode[] {\r
- this.treeAssemblyNode,\r
- this.treeDirectoryNode,\r
- this.treeProjectRootNode,\r
- this.treeShortcutsNode\r
- };\r
-\r
- foreach (TreeNode n in nodesToRemove)\r
- {\r
- n.Nodes.Clear();\r
-\r
- if (n.Parent != null)\r
- {\r
- n.Remove();\r
- }\r
- }\r
-\r
- tree.Nodes.Add(this.treeProjectRootNode);\r
-\r
- this.treeProjectRootNode.Nodes.AddRange(\r
- new TreeNode[] {\r
- this.treeShortcutsNode,\r
- this.treeDirectoryNode,\r
- this.treeAssemblyNode\r
- });\r
-\r
- // project xml directories\r
- foreach (string xmlDir in project.XmlDirectories)\r
- {\r
- TreeNode dirNode = new TreeNode(xmlDir);\r
- dirNode.ImageIndex = AssemblyTreeImages.Shortcuts; // TODO: folder image\r
- dirNode.SelectedImageIndex = AssemblyTreeImages.Shortcuts;\r
- dirNode.Tag = "DIRECTORY:" + xmlDir;\r
-\r
- this.treeDirectoryNode.Nodes.Add(dirNode);\r
- }\r
-\r
- // project assemblies\r
- try\r
- {\r
- foreach (string assemblyFile in this.project.AssemblyFiles)\r
- {\r
- AssemblyLoader asmLoader = new AssemblyLoader(assemblyFile);\r
- AssemblyTreeLoader treeLoader = new AssemblyTreeLoader(asmLoader);\r
- \r
- treeLoader.LoadNode(this.treeAssemblyNode);\r
- }\r
- } \r
- catch (ApplicationException ae)\r
- {\r
- // TODO: better error handling\r
- MessageBox.Show(ae.Message, "Error Loading project assemblies");\r
- }\r
-\r
- this.treeProjectRootNode.Expand();\r
- this.treeAssemblyNode.Expand();\r
- this.treeDirectoryNode.Expand();\r
- this.tree.EndUpdate();\r
- }\r
-\r
- #endregion // Tree Init\r
- \r
- #region Tree Events\r
-\r
- private void tree_AfterSelect(object sender, TreeViewEventArgs args)\r
- {\r
- this.status.Text = (string) args.Node.Tag;\r
- }\r
-\r
- private void tree_MouseUp(object sender, MouseEventArgs args)\r
- {\r
- if (args.Button == MouseButtons.Right)\r
- {\r
- tree.SelectedNode = tree.GetNodeAt(args.X, args.Y);\r
-\r
- if (tree.SelectedNode != null)\r
- {\r
- Point menuLoc = this.PointToClient(tree.PointToScreen(new Point(args.X, args.Y)));\r
- this.status.Text = "display tree menu at " + menuLoc.ToString();\r
- DisplayCorrectTreeMenu(menuLoc);\r
- }\r
- }\r
- }\r
-\r
- #endregion // Tree Events\r
-\r
- #region Tree Context Menu Init\r
-\r
- private void InitializeTreeContextMenu()\r
- {\r
- // treeProjectMenu\r
- this.treeProjectMenu.MenuItems.AddRange(\r
- new MenuItem[] {\r
- this.treeMenuProjectAddAssembly,\r
- this.treeMenuProjectAddDirectory,\r
- this.treeMenuProjectSeparator1,\r
- this.treeMenuProjectOptions\r
- });\r
-\r
- this.treeMenuProjectAddAssembly.Index = 0;\r
- this.treeMenuProjectAddAssembly.Text = "Add Assembly..."; // TODO: i18n\r
- this.treeMenuProjectAddAssembly.Click +=\r
- new EventHandler(this.treeMenuProjectAddAssembly_Click);\r
-\r
- this.treeMenuProjectAddDirectory.Index = 1;\r
- this.treeMenuProjectAddDirectory.Text = "Add Directory..."; // TODO: i18n\r
- this.treeMenuProjectAddDirectory.Click +=\r
- new EventHandler(this.treeMenuProjectAddDirectory_Click);\r
-\r
- this.treeMenuProjectSeparator1.Index = 2;\r
- this.treeMenuProjectSeparator1.Text = "-";\r
-\r
- this.treeMenuProjectOptions.Index = 3;\r
- this.treeMenuProjectOptions.Text = "Options..."; // TODO: i18n\r
- this.treeMenuProjectOptions.Click +=\r
- new EventHandler(this.treeMenuProjectOptions_Click);\r
-\r
- // treeShortcutMenu\r
- this.treeShortcutMenu.MenuItems.AddRange(\r
- new MenuItem[] {\r
- this.treeMenuShortcutClear\r
- });\r
-\r
- this.treeMenuShortcutClear.Index = 0;\r
- this.treeMenuShortcutClear.Text = "Clear Shortcuts"; // TODO: i18n\r
- this.treeMenuShortcutClear.Click += new EventHandler(this.treeMenuShortcutClear_Click);\r
-\r
- // treeDirectoryMenu\r
- this.treeDirectoryMenu.MenuItems.AddRange(\r
- new MenuItem[] {\r
- this.treeMenuDirectoryAdd\r
- });\r
-\r
- this.treeMenuDirectoryAdd.Index = 0;\r
- this.treeMenuDirectoryAdd.Text = "Add Directory..."; // TODO: i18n\r
- this.treeMenuDirectoryAdd.Click += new EventHandler(this.treeMenuDirectoryAdd_Click);\r
-\r
- // treeAssemblyMenu\r
- this.treeAssemblyMenu.MenuItems.AddRange(\r
- new MenuItem[] {\r
- this.treeMenuAssemblyAdd\r
- });\r
-\r
- this.treeMenuAssemblyAdd.Index = 0;\r
- this.treeMenuAssemblyAdd.Text = "Add Assembly..."; // TODO: i18n\r
- this.treeMenuAssemblyAdd.Click += new EventHandler(this.treeMenuAssemblyAdd_Click);\r
- }\r
-\r
- #endregion // Tree Context Menu Init\r
-\r
- #region Tree Context Menu Events\r
-\r
- private void treeMenuProjectAddAssembly_Click(object sender, EventArgs args)\r
- {\r
- MessageBox.Show("TODO: add assembly to project");\r
- }\r
-\r
- private void treeMenuProjectAddDirectory_Click(object sender, EventArgs args)\r
- {\r
- MessageBox.Show("TODO: add source directory to project");\r
- }\r
-\r
- private void treeMenuProjectOptions_Click(object sender, EventArgs args)\r
- {\r
- ProjectOptionsForm options = new ProjectOptionsForm(this.project);\r
- options.ShowDialog();\r
- options.Dispose();\r
- }\r
-\r
- private void treeMenuShortcutClear_Click(object sender, EventArgs args)\r
- {\r
- treeShortcutsNode.Nodes.Clear();\r
- }\r
-\r
- private void treeMenuDirectoryAdd_Click(object sender, EventArgs args)\r
- {\r
- this.treeMenuProjectAddDirectory_Click(sender, args);\r
- }\r
-\r
- private void treeMenuAssemblyAdd_Click(object sender, EventArgs args)\r
- {\r
- this.treeMenuProjectAddAssembly_Click(sender, args);\r
- }\r
-\r
- #endregion // Tree Context Menu Events\r
-\r
- #region Main Menu Init\r
-\r
- private void InitializeMainMenu()\r
- {\r
- // main\r
- this.mainMenu.MenuItems.AddRange(\r
- new MenuItem[] {\r
- this.menuFile,\r
- this.menuEdit,\r
- this.menuWindow,\r
- this.menuDebug,\r
- this.menuHelp\r
- });\r
-\r
- // File\r
- this.menuFile.Index = 0;\r
- this.menuFile.Text = "File"; // TODO: i18n\r
- \r
- this.menuFile.MenuItems.AddRange(\r
- new MenuItem[] {\r
- this.menuFileNew,\r
- this.menuFileOpen,\r
- this.menuFileClose,\r
- this.menuFileSave,\r
- this.menuFileSaveAs,\r
- this.menuFileSeparator1,\r
- this.menuFileRecent,\r
- this.menuFileSeparator2,\r
- this.menuFileExit\r
- });\r
-\r
- // File|New Project\r
- this.menuFileNew.Index = 0;\r
- this.menuFileNew.Text = "New Project"; // TODO: i18n\r
- this.menuFileNew.Click += new EventHandler(this.menuFileNew_Click);\r
-\r
- // File|Open Project\r
- this.menuFileOpen.Index = 1;\r
- this.menuFileOpen.Text = "Open Project..."; // TODO: i18n\r
- this.menuFileOpen.Click += new EventHandler(this.menuFileOpen_Click);\r
-\r
-\r
- // File|Save Project\r
- this.menuFileSave.Index = 2;\r
- this.menuFileSave.Text = "Save Project"; // TODO: i18n\r
- this.menuFileSave.Click += new EventHandler(this.menuFileSave_Click);\r
-\r
- // File|Save Project As\r
- this.menuFileSaveAs.Index = 3;\r
- this.menuFileSaveAs.Text = "Save Project As..."; // TODO: i18n\r
- this.menuFileSaveAs.Click += new EventHandler(this.menuFileSaveAs_Click);\r
-\r
- // File|Separator1\r
- this.menuFileSeparator1.Index = 4;\r
- this.menuFileSeparator1.Text = "-";\r
-\r
- // File|Recent Projects\r
- this.menuFileRecent.Index = 5;\r
- this.menuFileRecent.Text = "Recent Projects"; // TODO: i18n\r
-\r
- // File|Separator2\r
- this.menuFileSeparator2.Index = 6;\r
- this.menuFileSeparator2.Text = "-";\r
-\r
- // File|Close Project\r
- this.menuFileClose.Index = 7;\r
- this.menuFileClose.Text = "Close Project"; // TODO: i18n\r
- this.menuFileClose.Click += new EventHandler(this.menuFileClose_Click);\r
-\r
- // File|Exit\r
- this.menuFileExit.Index = 8;\r
- this.menuFileExit.Text = "Exit"; // TODO: i18n\r
- this.menuFileExit.Click += new EventHandler(this.menuFileExit_Click);\r
-\r
- // Edit\r
- this.menuEdit.Index = 1;\r
- this.menuEdit.Text = "Edit"; // TODO: i18n\r
-\r
- // Window\r
- this.menuWindow.Index = 2;\r
- this.menuWindow.Text = "Window"; // TODO: i18n\r
- this.menuWindow.MdiList = true;\r
-\r
- this.menuWindow.MenuItems.AddRange(\r
- new MenuItem[] {\r
- this.menuWindowCascade,\r
- this.menuWindowTile,\r
- this.menuWindowTileHorizontal\r
- });\r
-\r
- // Window|Cascade\r
- this.menuWindowCascade.Index = 0;\r
- this.menuWindowCascade.Text = "Cascade"; // TODO: i18n\r
- this.menuWindowCascade.Click += new EventHandler(this.menuWindowCascade_Click);\r
-\r
- // Window|Tile\r
- this.menuWindowTile.Index = 1;\r
- this.menuWindowTile.Text = "Tile"; // TODO: i18n\r
- this.menuWindowTile.Click += new EventHandler(this.menuWindowTile_Click);\r
- \r
- // Window|Tile Horizontal\r
- this.menuWindowTileHorizontal.Index = 2;\r
- this.menuWindowTileHorizontal.Text = "Tile Horizontal"; // TODO: i18n\r
- this.menuWindowTileHorizontal.Click += new EventHandler(this.menuWindowTileHorizontal_Click);\r
-\r
- // DEBUG\r
- this.menuDebug.Index = 3;\r
- this.menuDebug.Text = "DEBUG";\r
-\r
- this.menuDebug.MenuItems.AddRange(\r
- new MenuItem[] {\r
- this.menuDebugHaltAndCatchFire,\r
- this.menuDebugDisplayGeneric\r
- });\r
-\r
- // DEBUG|Halt and Catch Fire\r
- this.menuDebugHaltAndCatchFire.Index = 0;\r
- this.menuDebugHaltAndCatchFire.Text = "Halt and Catch Fire";\r
- this.menuDebugHaltAndCatchFire.Click += new EventHandler(this.menuDebugHaltAndCatchFire_Click);\r
-\r
- // DEBUG|Display Generic\r
- this.menuDebugDisplayGeneric.Index = 1;\r
- this.menuDebugDisplayGeneric.Text = "Display Generic Form";\r
- this.menuDebugDisplayGeneric.Click += new EventHandler(this.menuDebugDisplayGeneric_Click);\r
-\r
- // Help\r
- this.menuHelp.Index = 4;\r
- this.menuHelp.Text = "Help"; // TODO: i18n\r
-\r
- this.menuHelp.MenuItems.AddRange(\r
- new MenuItem[] {\r
- this.menuHelpAbout\r
- });\r
-\r
- // Help|About\r
- this.menuHelpAbout.Index = 0;\r
- this.menuHelpAbout.Text = "About..."; // TODO: i18n\r
- this.menuHelpAbout.Click += new EventHandler(this.menuHelpAbout_Click);\r
- }\r
-\r
- #endregion // Main Menu Init\r
- \r
- #region Main Menu Events\r
-\r
- private void menuFileNew_Click(object sender, EventArgs e)\r
- {\r
- CloseProject();\r
- }\r
-\r
- private void menuFileOpen_Click(object sender, EventArgs e)\r
- {\r
- OpenFileDialog open = new OpenFileDialog();\r
- open.Filter = "Monodoc Project Files (*.mdproj)|*.mdproj| All Files (*.*)|*.*";\r
-\r
- if (open.ShowDialog() == DialogResult.OK)\r
- {\r
- OpenProject(open.FileName);\r
- }\r
- }\r
-\r
- private void menuFileClose_Click(object sender, EventArgs e)\r
- {\r
- CloseProject();\r
- }\r
-\r
- private void menuFileSave_Click(object sender, EventArgs e)\r
- {\r
- if (project.IsNewProject || project.IsModified)\r
- {\r
- SaveOrSaveAsProject();\r
- }\r
- }\r
-\r
- private void menuFileSaveAs_Click(object sender, EventArgs e)\r
- {\r
- SaveAsProject();\r
- }\r
-\r
- private void menuFileExit_Click(object sender, EventArgs e)\r
- {\r
- Application.Exit();\r
- }\r
-\r
- private void menuWindowCascade_Click(object sender, EventArgs e)\r
- {\r
- this.LayoutMdi(MdiLayout.Cascade);\r
- }\r
-\r
- private void menuWindowTile_Click(object sender, EventArgs e)\r
- {\r
- this.LayoutMdi(MdiLayout.TileVertical);\r
- }\r
-\r
- private void menuWindowTileHorizontal_Click(object sender, EventArgs e)\r
- {\r
- this.LayoutMdi(MdiLayout.TileHorizontal);\r
- }\r
-\r
- private void menuDebugHaltAndCatchFire_Click(object sender, EventArgs e)\r
- {\r
- throw new ApplicationException("Test Exception Message",\r
- new ApplicationException("Inner Exception Message")\r
- );\r
- }\r
-\r
- private void menuDebugDisplayGeneric_Click(object sender, EventArgs e)\r
- {\r
- GenericEditorForm generic = new GenericEditorForm();\r
- generic.MdiParent = this;\r
- generic.Tag = "mditoolbarimageindex[1]";\r
- generic.Show();\r
- }\r
-\r
- private void menuHelpAbout_Click(object sender, EventArgs e)\r
- {\r
- Form aboutForm = new AboutForm();\r
- aboutForm.ShowDialog();\r
- }\r
-\r
- #endregion // Main Menu Events\r
-\r
- #region Other Events and Handlers\r
-\r
- private void project_Modified(object sender, EventArgs args)\r
- {\r
- UpdateTitle();\r
- InitializeTree();\r
- }\r
-\r
- protected override void OnClosing(CancelEventArgs e)\r
- {\r
- base.OnClosing(e);\r
-\r
- // this code is nearly duplicated from CloseProject()\r
- if (project.IsModified)\r
- {\r
- // TODO: i18n\r
- DialogResult r = MessageBox.Show(\r
- "Save changes to " + projectName + "?",\r
- "Save Modified Project",\r
- MessageBoxButtons.YesNoCancel,\r
- MessageBoxIcon.Question,\r
- MessageBoxDefaultButton.Button1\r
- );\r
-\r
- switch (r)\r
- {\r
- case DialogResult.Yes:\r
- SaveOrSaveAsProject();\r
- break;\r
- case DialogResult.Cancel:\r
- e.Cancel = true;\r
- break;\r
- }\r
- }\r
- }\r
- #endregion // Other Events and Handlers\r
- }\r
-}\r
+++ /dev/null
-// MdiToolBar.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Collections;\r
-using System.ComponentModel;\r
-using System.Windows.Forms;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- public class MdiToolBar : ToolBar\r
- {\r
- #region Private Instance Fields\r
-\r
- private Hashtable mdiChildren = null;\r
- private Form currentMdiChild = null;\r
-\r
- #endregion // Private Instance Fields\r
-\r
- #region Constructors and Destructors\r
-\r
- public MdiToolBar() : base()\r
- {\r
- this.mdiChildren = new Hashtable();\r
- }\r
-\r
- #endregion // Constructors and Destructors\r
-\r
- #region Event Handlers\r
-\r
- private void mdiParent_MdiChildActivate(object sender, EventArgs args)\r
- {\r
- Form activeMdiChild = ((Form) sender).ActiveMdiChild;\r
-\r
- if (activeMdiChild != null)\r
- {\r
- if (this.mdiChildren[activeMdiChild] == null) \r
- {\r
- // need a new button\r
- ToolBarButton newButton = new ToolBarButton(activeMdiChild.Text);\r
- newButton.Style = ToolBarButtonStyle.ToggleButton;\r
- this.mdiChildren[activeMdiChild] = newButton;\r
- activeMdiChild.Closing += new CancelEventHandler(this.mdiChild_Closing);\r
-\r
- // tooltip\r
- newButton.ToolTipText = activeMdiChild.Text;\r
-\r
- // separators\r
- if ((this.Appearance == ToolBarAppearance.Flat) && (this.Buttons.Count > 0)) \r
- {\r
- ToolBarButton sep = new ToolBarButton();\r
- sep.Style = ToolBarButtonStyle.Separator;\r
- \r
- this.Buttons.Add(sep);\r
- }\r
-\r
- // image index. if the mdi child form's Tag property is a string\r
- // and contains the text "mditoolbarimageindex[n]", where n is\r
- // an integer, the associated button's ImageIndex property will be\r
- // set to n.\r
-\r
- String formTag = activeMdiChild.Tag as string;\r
-\r
- if (formTag != null)\r
- {\r
- string lookFor = "mditoolbarimageindex[";\r
- int index = formTag.IndexOf(lookFor);\r
-\r
- if (index != -1)\r
- {\r
- int startIndex = index + lookFor.Length;\r
- int endIndex = formTag.IndexOf("]", startIndex);\r
- string imageIndexStr = formTag.Substring(startIndex, endIndex - startIndex);\r
-\r
- MessageBox.Show("mditoolbar: imageIndexStr: " + imageIndexStr);\r
- \r
- try\r
- {\r
- newButton.ImageIndex = int.Parse(imageIndexStr);\r
- }\r
- catch\r
- {\r
- }\r
- }\r
- }\r
- else\r
- {\r
- // use default index\r
- newButton.ImageIndex = 0;\r
- }\r
-\r
- this.Buttons.Add(newButton);\r
- }\r
-\r
- this.CurrentMdiChild = activeMdiChild;\r
- }\r
- else\r
- {\r
- // last MDI child removed; clean up\r
- this.mdiChildren.Clear();\r
- this.Buttons.Clear();\r
- this.currentMdiChild = null;\r
- }\r
- }\r
-\r
- private void mdiChild_Closing(object sender, CancelEventArgs args)\r
- {\r
- ToolBarButton b = (ToolBarButton) this.mdiChildren[sender];\r
-\r
- // deal with separators\r
- if ((this.Appearance == ToolBarAppearance.Flat) && (this.Buttons.Count > 1))\r
- {\r
- int bIndex = this.Buttons.IndexOf(b);\r
-\r
- if (bIndex == 0) \r
- {\r
- this.Buttons.RemoveAt(bIndex + 1);\r
- } \r
- else \r
- {\r
- this.Buttons.RemoveAt(bIndex - 1);\r
- }\r
- }\r
-\r
- this.Buttons.Remove(b);\r
- this.mdiChildren.Remove(sender);\r
- }\r
-\r
- #endregion // Event Handlers\r
-\r
- #region Overridden Event Handlers\r
-\r
- protected override void OnButtonClick(ToolBarButtonClickEventArgs args)\r
- {\r
- base.OnButtonClick(args);\r
-\r
- args.Button.Pushed = true;\r
-\r
- // linear search, but double-hashing seems worthless.\r
- foreach (Form keyChild in this.mdiChildren.Keys) \r
- {\r
- if (args.Button == this.mdiChildren[keyChild])\r
- {\r
- keyChild.Activate();\r
- break;\r
- }\r
- }\r
- }\r
-\r
- protected override void OnParentChanged(EventArgs args)\r
- {\r
- base.OnParentChanged(args);\r
-\r
- // TODO: potential for multiple registration of event handler?\r
- if (this.Parent is Form && ((Form) this.Parent).IsMdiContainer) \r
- {\r
- ((Form) this.Parent).MdiChildActivate\r
- += new EventHandler(this.mdiParent_MdiChildActivate);\r
- }\r
- }\r
-\r
- #endregion // Overridden Event Handlers\r
-\r
- #region Private Instance Properties\r
-\r
- private Form CurrentMdiChild \r
- {\r
- get { return this.currentMdiChild; }\r
- set \r
- {\r
- if (this.currentMdiChild != null) \r
- {\r
- ToolBarButton child = this.mdiChildren[this.currentMdiChild] as ToolBarButton;\r
-\r
- if (child != null)\r
- {\r
- child.Pushed = false;\r
- }\r
- }\r
-\r
- ((ToolBarButton) this.mdiChildren[value]).Pushed = true;\r
- this.currentMdiChild = value;\r
- }\r
- }\r
-\r
- #endregion // Private Instance Properties\r
- }\r
-}\r
+++ /dev/null
-// ProjectOptionsForm.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using Mono.Doc.Core;\r
-using System;\r
-using System.Drawing;\r
-using System.Collections;\r
-using System.ComponentModel;\r
-using System.Windows.Forms;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- /// <summary>\r
- /// Summary description for ProjectOptionsForm.\r
- /// </summary>\r
- public class ProjectOptionsForm : System.Windows.Forms.Form\r
- {\r
- private DocProject project;\r
- private bool isModified;\r
-\r
- private System.Windows.Forms.Button buttonOK;\r
- private System.Windows.Forms.Button buttonCancel;\r
- private System.Windows.Forms.Button buttonApply;\r
- private System.Windows.Forms.GroupBox groupBoxAssemblies;\r
- private System.Windows.Forms.Button buttonAssemblyRemove;\r
- private System.Windows.Forms.Button buttonAssemblyAdd;\r
- private System.Windows.Forms.ListBox listBoxAssembliesToDocument;\r
- private System.Windows.Forms.GroupBox groupBoxDirectories;\r
- private System.Windows.Forms.Button buttonDirectoryRemove;\r
- private System.Windows.Forms.Button buttonDirectoryAdd;\r
- private System.Windows.Forms.ListBox listBoxXmlSourceDirectories;\r
- private System.Windows.Forms.GroupBox groupBoxProperties;\r
- private System.Windows.Forms.ListView listViewProperties;\r
- private System.Windows.Forms.ToolBar toolBarProperties;\r
- private System.Windows.Forms.ToolBarButton toolBarButtonNewProperty;\r
- private System.Windows.Forms.ToolBarButton toolBarButtonEditProperty;\r
- private System.Windows.Forms.ToolBarButton toolBarButtonRemoveProperty;\r
- private System.Windows.Forms.ColumnHeader columnHeaderName;\r
- private System.Windows.Forms.ColumnHeader columnHeaderValue;\r
- /// <summary>\r
- /// Required designer variable.\r
- /// </summary>\r
- private System.ComponentModel.Container components = null;\r
-\r
- public ProjectOptionsForm(DocProject project)\r
- {\r
- //this.SetStyle(ControlStyles.DoubleBuffer, true);\r
- \r
- this.project = project;\r
- this.isModified = false;\r
-\r
- //\r
- // Required for Windows Form Designer support\r
- //\r
- InitializeComponent();\r
-\r
- //\r
- // TODO: Add any constructor code after InitializeComponent call\r
- //\r
-\r
- this.toolBarProperties.ImageList = AssemblyTreeImages.List; // TODO: need real images\r
-\r
- // load list of assemblies\r
- this.listBoxAssembliesToDocument.BeginUpdate();\r
- this.listBoxAssembliesToDocument.Items.Clear();\r
-\r
- foreach (string assemblyFile in project.AssemblyFiles)\r
- {\r
- this.listBoxAssembliesToDocument.Items.Add(assemblyFile);\r
- }\r
- \r
- this.listBoxAssembliesToDocument.EndUpdate();\r
-\r
- // load list of XML directories\r
- this.listBoxXmlSourceDirectories.BeginUpdate();\r
- this.listBoxXmlSourceDirectories.Items.Clear();\r
-\r
- foreach (string xmlDir in project.XmlDirectories)\r
- {\r
- this.listBoxXmlSourceDirectories.Items.Add(xmlDir);\r
- }\r
-\r
- this.listBoxXmlSourceDirectories.EndUpdate();\r
-\r
- // load properties\r
- foreach (string name in project.Properties.Keys)\r
- {\r
- ListViewItem entry = new ListViewItem(name);\r
-\r
- entry.SubItems.Add(project.Properties[name] as string);\r
- this.listViewProperties.Items.Add(entry);\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Clean up any resources being used.\r
- /// </summary>\r
- protected override void Dispose( bool disposing )\r
- {\r
- if( disposing )\r
- {\r
- if(components != null)\r
- {\r
- components.Dispose();\r
- }\r
- }\r
- base.Dispose( disposing );\r
- }\r
-\r
- #region Windows Form Designer generated code\r
- /// <summary>\r
- /// Required method for Designer support - do not modify\r
- /// the contents of this method with the code editor.\r
- /// </summary>\r
- private void InitializeComponent()\r
- {\r
- this.buttonOK = new System.Windows.Forms.Button();\r
- this.buttonCancel = new System.Windows.Forms.Button();\r
- this.buttonApply = new System.Windows.Forms.Button();\r
- this.groupBoxAssemblies = new System.Windows.Forms.GroupBox();\r
- this.buttonAssemblyRemove = new System.Windows.Forms.Button();\r
- this.buttonAssemblyAdd = new System.Windows.Forms.Button();\r
- this.listBoxAssembliesToDocument = new System.Windows.Forms.ListBox();\r
- this.groupBoxDirectories = new System.Windows.Forms.GroupBox();\r
- this.buttonDirectoryRemove = new System.Windows.Forms.Button();\r
- this.buttonDirectoryAdd = new System.Windows.Forms.Button();\r
- this.listBoxXmlSourceDirectories = new System.Windows.Forms.ListBox();\r
- this.groupBoxProperties = new System.Windows.Forms.GroupBox();\r
- this.toolBarProperties = new System.Windows.Forms.ToolBar();\r
- this.toolBarButtonNewProperty = new System.Windows.Forms.ToolBarButton();\r
- this.toolBarButtonEditProperty = new System.Windows.Forms.ToolBarButton();\r
- this.toolBarButtonRemoveProperty = new System.Windows.Forms.ToolBarButton();\r
- this.listViewProperties = new System.Windows.Forms.ListView();\r
- this.columnHeaderName = new System.Windows.Forms.ColumnHeader();\r
- this.columnHeaderValue = new System.Windows.Forms.ColumnHeader();\r
- this.groupBoxAssemblies.SuspendLayout();\r
- this.groupBoxDirectories.SuspendLayout();\r
- this.groupBoxProperties.SuspendLayout();\r
- this.SuspendLayout();\r
- // \r
- // buttonOK\r
- // \r
- this.buttonOK.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonOK.Location = new System.Drawing.Point(168, 394);\r
- this.buttonOK.Name = "buttonOK";\r
- this.buttonOK.TabIndex = 10;\r
- this.buttonOK.Text = "OK";\r
- this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);\r
- // \r
- // buttonCancel\r
- // \r
- this.buttonCancel.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
- this.buttonCancel.Location = new System.Drawing.Point(344, 394);\r
- this.buttonCancel.Name = "buttonCancel";\r
- this.buttonCancel.Size = new System.Drawing.Size(72, 23);\r
- this.buttonCancel.TabIndex = 11;\r
- this.buttonCancel.Text = "Cancel";\r
- this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);\r
- // \r
- // buttonApply\r
- // \r
- this.buttonApply.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonApply.Location = new System.Drawing.Point(256, 394);\r
- this.buttonApply.Name = "buttonApply";\r
- this.buttonApply.TabIndex = 12;\r
- this.buttonApply.Text = "Apply";\r
- this.buttonApply.Click += new System.EventHandler(this.buttonApply_Click);\r
- // \r
- // groupBoxAssemblies\r
- // \r
- this.groupBoxAssemblies.Controls.AddRange(new System.Windows.Forms.Control[] {\r
- this.buttonAssemblyRemove,\r
- this.buttonAssemblyAdd,\r
- this.listBoxAssembliesToDocument});\r
- this.groupBoxAssemblies.Location = new System.Drawing.Point(9, 8);\r
- this.groupBoxAssemblies.Name = "groupBoxAssemblies";\r
- this.groupBoxAssemblies.Size = new System.Drawing.Size(408, 96);\r
- this.groupBoxAssemblies.TabIndex = 17;\r
- this.groupBoxAssemblies.TabStop = false;\r
- this.groupBoxAssemblies.Text = "Assemblies";\r
- // \r
- // buttonAssemblyRemove\r
- // \r
- this.buttonAssemblyRemove.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonAssemblyRemove.Location = new System.Drawing.Point(320, 40);\r
- this.buttonAssemblyRemove.Name = "buttonAssemblyRemove";\r
- this.buttonAssemblyRemove.Size = new System.Drawing.Size(80, 19);\r
- this.buttonAssemblyRemove.TabIndex = 8;\r
- this.buttonAssemblyRemove.Text = "Remove";\r
- this.buttonAssemblyRemove.Click += new System.EventHandler(this.buttonAssemblyRemove_Click);\r
- // \r
- // buttonAssemblyAdd\r
- // \r
- this.buttonAssemblyAdd.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonAssemblyAdd.Location = new System.Drawing.Point(320, 16);\r
- this.buttonAssemblyAdd.Name = "buttonAssemblyAdd";\r
- this.buttonAssemblyAdd.Size = new System.Drawing.Size(80, 19);\r
- this.buttonAssemblyAdd.TabIndex = 7;\r
- this.buttonAssemblyAdd.Text = "Add...";\r
- this.buttonAssemblyAdd.Click += new System.EventHandler(this.buttonAssemblyAdd_Click);\r
- // \r
- // listBoxAssembliesToDocument\r
- // \r
- this.listBoxAssembliesToDocument.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.listBoxAssembliesToDocument.Location = new System.Drawing.Point(8, 16);\r
- this.listBoxAssembliesToDocument.Name = "listBoxAssembliesToDocument";\r
- this.listBoxAssembliesToDocument.Size = new System.Drawing.Size(304, 69);\r
- this.listBoxAssembliesToDocument.TabIndex = 6;\r
- // \r
- // groupBoxDirectories\r
- // \r
- this.groupBoxDirectories.Controls.AddRange(new System.Windows.Forms.Control[] {\r
- this.buttonDirectoryRemove,\r
- this.buttonDirectoryAdd,\r
- this.listBoxXmlSourceDirectories});\r
- this.groupBoxDirectories.Location = new System.Drawing.Point(9, 112);\r
- this.groupBoxDirectories.Name = "groupBoxDirectories";\r
- this.groupBoxDirectories.Size = new System.Drawing.Size(408, 96);\r
- this.groupBoxDirectories.TabIndex = 18;\r
- this.groupBoxDirectories.TabStop = false;\r
- this.groupBoxDirectories.Text = "XML Source Directories";\r
- // \r
- // buttonDirectoryRemove\r
- // \r
- this.buttonDirectoryRemove.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonDirectoryRemove.Location = new System.Drawing.Point(320, 40);\r
- this.buttonDirectoryRemove.Name = "buttonDirectoryRemove";\r
- this.buttonDirectoryRemove.Size = new System.Drawing.Size(80, 19);\r
- this.buttonDirectoryRemove.TabIndex = 8;\r
- this.buttonDirectoryRemove.Text = "Remove";\r
- this.buttonDirectoryRemove.Click += new System.EventHandler(this.buttonDirectoryRemove_Click);\r
- // \r
- // buttonDirectoryAdd\r
- // \r
- this.buttonDirectoryAdd.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);\r
- this.buttonDirectoryAdd.Location = new System.Drawing.Point(320, 16);\r
- this.buttonDirectoryAdd.Name = "buttonDirectoryAdd";\r
- this.buttonDirectoryAdd.Size = new System.Drawing.Size(80, 19);\r
- this.buttonDirectoryAdd.TabIndex = 7;\r
- this.buttonDirectoryAdd.Text = "Add...";\r
- this.buttonDirectoryAdd.Click += new System.EventHandler(this.buttonDirectoryAdd_Click);\r
- // \r
- // listBoxXmlSourceDirectories\r
- // \r
- this.listBoxXmlSourceDirectories.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.listBoxXmlSourceDirectories.Location = new System.Drawing.Point(8, 16);\r
- this.listBoxXmlSourceDirectories.Name = "listBoxXmlSourceDirectories";\r
- this.listBoxXmlSourceDirectories.Size = new System.Drawing.Size(304, 69);\r
- this.listBoxXmlSourceDirectories.TabIndex = 6;\r
- // \r
- // groupBoxProperties\r
- // \r
- this.groupBoxProperties.Controls.AddRange(new System.Windows.Forms.Control[] {\r
- this.toolBarProperties,\r
- this.listViewProperties});\r
- this.groupBoxProperties.Location = new System.Drawing.Point(9, 216);\r
- this.groupBoxProperties.Name = "groupBoxProperties";\r
- this.groupBoxProperties.Size = new System.Drawing.Size(408, 168);\r
- this.groupBoxProperties.TabIndex = 19;\r
- this.groupBoxProperties.TabStop = false;\r
- this.groupBoxProperties.Text = "Properties";\r
- // \r
- // toolBarProperties\r
- // \r
- this.toolBarProperties.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.toolBarProperties.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {\r
- this.toolBarButtonNewProperty,\r
- this.toolBarButtonEditProperty,\r
- this.toolBarButtonRemoveProperty});\r
- this.toolBarProperties.Divider = false;\r
- this.toolBarProperties.Dock = System.Windows.Forms.DockStyle.None;\r
- this.toolBarProperties.DropDownArrows = true;\r
- this.toolBarProperties.Location = new System.Drawing.Point(8, 16);\r
- this.toolBarProperties.Name = "toolBarProperties";\r
- this.toolBarProperties.ShowToolTips = true;\r
- this.toolBarProperties.Size = new System.Drawing.Size(392, 23);\r
- this.toolBarProperties.TabIndex = 2;\r
- this.toolBarProperties.TextAlign = System.Windows.Forms.ToolBarTextAlign.Right;\r
- this.toolBarProperties.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBarProperties_ButtonClick);\r
- // \r
- // toolBarButtonNewProperty\r
- // \r
- this.toolBarButtonNewProperty.ImageIndex = 0;\r
- this.toolBarButtonNewProperty.ToolTipText = "New Property";\r
- // \r
- // toolBarButtonEditProperty\r
- // \r
- this.toolBarButtonEditProperty.Enabled = false;\r
- this.toolBarButtonEditProperty.ImageIndex = 1;\r
- this.toolBarButtonEditProperty.ToolTipText = "Edit Property";\r
- // \r
- // toolBarButtonRemoveProperty\r
- // \r
- this.toolBarButtonRemoveProperty.Enabled = false;\r
- this.toolBarButtonRemoveProperty.ImageIndex = 2;\r
- this.toolBarButtonRemoveProperty.ToolTipText = "Remove Property";\r
- // \r
- // listViewProperties\r
- // \r
- this.listViewProperties.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \r
- | System.Windows.Forms.AnchorStyles.Left) \r
- | System.Windows.Forms.AnchorStyles.Right);\r
- this.listViewProperties.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {\r
- this.columnHeaderName,\r
- this.columnHeaderValue});\r
- this.listViewProperties.FullRowSelect = true;\r
- this.listViewProperties.GridLines = true;\r
- this.listViewProperties.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;\r
- this.listViewProperties.Location = new System.Drawing.Point(8, 40);\r
- this.listViewProperties.Name = "listViewProperties";\r
- this.listViewProperties.Size = new System.Drawing.Size(392, 120);\r
- this.listViewProperties.TabIndex = 1;\r
- this.listViewProperties.View = System.Windows.Forms.View.Details;\r
- this.listViewProperties.SelectedIndexChanged += new System.EventHandler(this.listViewProperties_SelectedIndexChanged);\r
- // \r
- // columnHeaderName\r
- // \r
- this.columnHeaderName.Text = "Name";\r
- this.columnHeaderName.Width = 171;\r
- // \r
- // columnHeaderValue\r
- // \r
- this.columnHeaderValue.Text = "Value";\r
- this.columnHeaderValue.Width = 217;\r
- // \r
- // ProjectOptionsForm\r
- // \r
- this.AcceptButton = this.buttonOK;\r
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\r
- this.CancelButton = this.buttonCancel;\r
- this.ClientSize = new System.Drawing.Size(426, 423);\r
- this.Controls.AddRange(new System.Windows.Forms.Control[] {\r
- this.groupBoxProperties,\r
- this.groupBoxAssemblies,\r
- this.buttonApply,\r
- this.buttonCancel,\r
- this.buttonOK,\r
- this.groupBoxDirectories});\r
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
- this.MaximizeBox = false;\r
- this.Name = "ProjectOptionsForm";\r
- this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;\r
- this.Text = "Monodoc Project Options";\r
- this.groupBoxAssemblies.ResumeLayout(false);\r
- this.groupBoxDirectories.ResumeLayout(false);\r
- this.groupBoxProperties.ResumeLayout(false);\r
- this.ResumeLayout(false);\r
-\r
- }\r
- #endregion\r
-\r
- #region Private Instance Methods\r
-\r
- private void SaveProjectChanges()\r
- {\r
- project.AssemblyFiles.Clear();\r
-\r
- foreach (string assemblyFile in this.listBoxAssembliesToDocument.Items)\r
- {\r
- project.AssemblyFiles.Add(assemblyFile);\r
- }\r
-\r
- project.XmlDirectories.Clear();\r
- \r
- foreach (string xmlDir in this.listBoxXmlSourceDirectories.Items)\r
- {\r
- project.XmlDirectories.Add(xmlDir);\r
- }\r
-\r
- project.Properties.Clear();\r
-\r
- foreach (ListViewItem prop in this.listViewProperties.Items)\r
- {\r
- project.Properties[prop.SubItems[0].Text] = prop.SubItems[1].Text;\r
- }\r
-\r
- project.IsModified = true;\r
- this.isModified = false;\r
- }\r
-\r
- #endregion // Private Instance Methods\r
-\r
- private void buttonCancel_Click(object sender, System.EventArgs e)\r
- {\r
- this.Close();\r
- }\r
-\r
- private void buttonApply_Click(object sender, System.EventArgs e)\r
- {\r
- if (this.isModified)\r
- {\r
- SaveProjectChanges();\r
- }\r
- }\r
-\r
- private void buttonOK_Click(object sender, System.EventArgs e)\r
- {\r
- if (this.isModified)\r
- {\r
- SaveProjectChanges();\r
- }\r
-\r
- this.Close();\r
- }\r
-\r
- private void buttonAssemblyAdd_Click(object sender, System.EventArgs e)\r
- {\r
- OpenFileDialog open = new OpenFileDialog();\r
- open.Filter = "Assembly Files (*.dll; *.exe)|*.dll; *.exe|All Files (*.*)|*.*";\r
-\r
- if (open.ShowDialog() == DialogResult.OK)\r
- {\r
- this.listBoxAssembliesToDocument.Items.Add(open.FileName);\r
- this.isModified = true;\r
- }\r
- }\r
-\r
- private void buttonAssemblyRemove_Click(object sender, System.EventArgs e)\r
- {\r
- this.listBoxAssembliesToDocument.Items.Remove(\r
- this.listBoxAssembliesToDocument.SelectedItem\r
- );\r
- this.isModified = true;\r
- }\r
-\r
- private void buttonDirectoryAdd_Click(object sender, System.EventArgs e)\r
- {\r
- DirectorySelectorForm dirSel = new DirectorySelectorForm();\r
- \r
- if (dirSel.ShowDialog() == DialogResult.OK)\r
- {\r
- this.listBoxXmlSourceDirectories.Items.Add(dirSel.DirectoryName);\r
- this.isModified = true;\r
- }\r
-\r
- dirSel.Dispose();\r
- }\r
- private void buttonDirectoryRemove_Click(object sender, System.EventArgs e)\r
- {\r
- this.listBoxXmlSourceDirectories.Items.Remove(\r
- this.listBoxXmlSourceDirectories.SelectedItem\r
- );\r
- this.isModified = true;\r
- }\r
-\r
- private void toolBarProperties_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)\r
- {\r
- if (e.Button == toolBarButtonNewProperty)\r
- {\r
- EditPropertyForm edit = new EditPropertyForm();\r
-\r
- if (edit.ShowDialog() == DialogResult.OK)\r
- {\r
- ListViewItem item = null;\r
-\r
- foreach (ListViewItem existingItem in this.listViewProperties.Items)\r
- {\r
- if (existingItem.Text == edit.PropertyName)\r
- {\r
- item = existingItem;\r
- break;\r
- }\r
- }\r
-\r
- if (item != null)\r
- {\r
- DialogResult dr = MessageBox.Show(\r
- "A property named " + edit.PropertyName + " already exists. Overwrite?",\r
- "Property Exists", MessageBoxButtons.YesNo, MessageBoxIcon.Question\r
- );\r
-\r
- if (dr == DialogResult.Yes && item.SubItems[1].Text != edit.PropertyValue)\r
- {\r
- item.SubItems[0].Text = edit.PropertyName;\r
- item.SubItems[1].Text = edit.PropertyValue;\r
- this.isModified = true;\r
- }\r
- }\r
- else\r
- {\r
- ListViewItem newProperty = new ListViewItem(edit.PropertyName);\r
- \r
- newProperty.SubItems.Add(edit.PropertyValue);\r
- this.listViewProperties.Items.Add(newProperty);\r
- \r
- newProperty.Selected = true;\r
- this.isModified = true;\r
- }\r
- }\r
-\r
- edit.Dispose();\r
- }\r
- else if (e.Button == toolBarButtonEditProperty)\r
- {\r
- if (this.listViewProperties.SelectedItems.Count > 0)\r
- {\r
- ListViewItem selectedItem = this.listViewProperties.SelectedItems[0];\r
- EditPropertyForm edit = new EditPropertyForm();\r
- edit.PropertyName = selectedItem.SubItems[0].Text;\r
- edit.PropertyValue = selectedItem.SubItems[1].Text;\r
-\r
- if (edit.ShowDialog(this) == DialogResult.OK &&\r
- (selectedItem.SubItems[0].Text != edit.PropertyName ||\r
- selectedItem.SubItems[1].Text != edit.PropertyValue))\r
- {\r
- selectedItem.SubItems[0].Text = edit.PropertyName;\r
- selectedItem.SubItems[1].Text = edit.PropertyValue;\r
- selectedItem.Selected = true;\r
- this.isModified = true;\r
- }\r
-\r
- edit.Dispose();\r
- }\r
- }\r
- else if (e.Button == toolBarButtonRemoveProperty)\r
- {\r
- foreach (ListViewItem item in this.listViewProperties.SelectedItems)\r
- {\r
- item.Remove();\r
- }\r
- }\r
- }\r
-\r
- private void listViewProperties_SelectedIndexChanged(object sender, System.EventArgs e)\r
- {\r
- if (this.listViewProperties.SelectedItems.Count > 0)\r
- {\r
- this.toolBarButtonEditProperty.Enabled = true;\r
- this.toolBarButtonRemoveProperty.Enabled = true;\r
- }\r
- else\r
- {\r
- this.toolBarButtonEditProperty.Enabled = false;\r
- this.toolBarButtonRemoveProperty.Enabled = false;\r
- }\r
- }\r
- }\r
-}\r
+++ /dev/null
-// TypeEditorForm.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- public class TypeEditorForm : GenericEditorForm\r
- {\r
- private System.Windows.Forms.Label labelMembers;\r
- private System.Windows.Forms.ComboBox comboBoxMembers;\r
-\r
- private void InitializeComponent()\r
- {\r
- this.labelMembers = new System.Windows.Forms.Label();\r
- this.comboBoxMembers = new System.Windows.Forms.ComboBox();\r
- this.SuspendLayout();\r
- // \r
- // toolBar\r
- // \r
- //this.toolBar.ButtonSize = new System.Drawing.Size(43, 22);\r
- this.toolBar.Visible = true;\r
- // \r
- // labelSummary\r
- // \r
- this.labelSummary.Visible = true;\r
- // \r
- // textBoxSummary\r
- // \r
- this.textBoxSummary.Visible = true;\r
- // \r
- // labelRemarks\r
- // \r
- this.labelRemarks.Visible = true;\r
- // \r
- // textBoxRemarks\r
- // \r
- this.textBoxRemarks.Visible = true;\r
- // \r
- // labelSeeAlso\r
- // \r
- this.labelSeeAlso.Visible = true;\r
- // \r
- // comboBoxLanguage\r
- // \r
- this.comboBoxLanguage.ItemHeight = 13;\r
- this.comboBoxLanguage.Visible = true;\r
- // \r
- // labelLanguage\r
- // \r
- this.labelLanguage.Location = new System.Drawing.Point(232, 34);\r
- this.labelLanguage.Size = new System.Drawing.Size(72, 16);\r
- this.labelLanguage.Visible = true;\r
- // \r
- // listView1\r
- // \r
- this.listViewSeeAlso.Visible = true;\r
- // \r
- // labelMembers\r
- // \r
- this.labelMembers.Location = new System.Drawing.Point(8, 34);\r
- this.labelMembers.Name = "labelMembers";\r
- this.labelMembers.Size = new System.Drawing.Size(56, 16);\r
- this.labelMembers.TabIndex = 10;\r
- this.labelMembers.Text = "Members:";\r
- // \r
- // comboBoxMembers\r
- // \r
- this.comboBoxMembers.Location = new System.Drawing.Point(64, 32);\r
- this.comboBoxMembers.Name = "comboBoxMembers";\r
- this.comboBoxMembers.Size = new System.Drawing.Size(168, 21);\r
- this.comboBoxMembers.TabIndex = 11;\r
- this.comboBoxMembers.Text = "comboBox1";\r
- // \r
- // TypeEditorForm\r
- // \r
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\r
- this.ClientSize = new System.Drawing.Size(432, 469);\r
- this.Controls.AddRange(new System.Windows.Forms.Control[] {\r
- this.listViewSeeAlso,\r
- this.labelLanguage,\r
- this.comboBoxLanguage,\r
- this.labelSeeAlso,\r
- this.textBoxRemarks,\r
- this.labelRemarks,\r
- this.textBoxSummary,\r
- this.labelSummary,\r
- this.toolBar,\r
- this.comboBoxMembers,\r
- this.labelMembers});\r
- this.Name = "TypeEditorForm";\r
- this.Text = "TypeEditorForm";\r
- this.ResumeLayout(false);\r
-\r
- }\r
- \r
- public TypeEditorForm() : base()\r
- {\r
- InitializeComponent();\r
- }\r
- }\r
-}\r
+++ /dev/null
-// UnexpectedErrorForm.cs\r
-// John Barnette (jbarn@httcb.net)\r
-// \r
-// Copyright (c) 2002 John Barnette\r
-//\r
-// This file is part of Monodoc, a multilingual API documentation tool.\r
-//\r
-// Monodoc is free software; you can redistribute it and/or modify\r
-// it under the terms of the GNU General Public License as published by\r
-// the Free Software Foundation; either version 2 of the License, or\r
-// (at your option) any later version.\r
-// \r
-// Monodoc is distributed in the hope that it will be useful,\r
-// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
-// GNU General Public License for more details.\r
-// \r
-// You should have received a copy of the GNU General Public License\r
-// along with Monodoc; if not, write to the Free Software\r
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-\r
-using System;\r
-using System.Drawing;\r
-using System.Collections;\r
-using System.ComponentModel;\r
-using System.Windows.Forms;\r
-\r
-namespace Mono.Doc.Gui\r
-{\r
- /// <summary>\r
- /// Summary description for UnexpectedErrorForm.\r
- /// </summary>\r
- public class UnexpectedErrorForm : System.Windows.Forms.Form\r
- {\r
- private System.Windows.Forms.PictureBox pictureBoxExplosion;\r
- private System.Windows.Forms.Label labelErrorExplanation;\r
- private System.Windows.Forms.TextBox textBoxErrorMessage;\r
- private System.Windows.Forms.Button buttonSendErrorReport;\r
- private System.Windows.Forms.Button buttonQuit;\r
- private System.Windows.Forms.Button buttonContinue;\r
- /// <summary>\r
- /// Required designer variable.\r
- /// </summary>\r
- private System.ComponentModel.Container components = null;\r
-\r
- public UnexpectedErrorForm(Exception e)\r
- {\r
- //\r
- // Required for Windows Form Designer support\r
- //\r
- InitializeComponent();\r
-\r
- //\r
- // TODO: Add any constructor code after InitializeComponent call\r
- //\r
-\r
- this.pictureBoxExplosion.Image = GuiResources.ErrorExplosionBitmap;\r
-\r
- this.textBoxErrorMessage.Text +=\r
- "Exception: " + e.GetType().FullName + "\n" +\r
- "Message: " + e.Message + "\n\n" +\r
- "Stack Trace: \n" + e.StackTrace + "\n\n";\r
-\r
- while (e.InnerException != null)\r
- {\r
- e = e.InnerException;\r
- this.textBoxErrorMessage.Text +=\r
- "--- NESTED EXCEPTION ---\n" +\r
- "Exception: " + e.GetType().FullName + "\n" +\r
- "Message: " + e.Message + "\n\n" +\r
- "Stack Trace: \n" + e.StackTrace + "\n\n";\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Clean up any resources being used.\r
- /// </summary>\r
- protected override void Dispose( bool disposing )\r
- {\r
- if( disposing )\r
- {\r
- if(components != null)\r
- {\r
- components.Dispose();\r
- }\r
- }\r
- base.Dispose( disposing );\r
- }\r
-\r
- #region Windows Form Designer generated code\r
- /// <summary>\r
- /// Required method for Designer support - do not modify\r
- /// the contents of this method with the code editor.\r
- /// </summary>\r
- private void InitializeComponent()\r
- {\r
- this.pictureBoxExplosion = new System.Windows.Forms.PictureBox();\r
- this.labelErrorExplanation = new System.Windows.Forms.Label();\r
- this.textBoxErrorMessage = new System.Windows.Forms.TextBox();\r
- this.buttonQuit = new System.Windows.Forms.Button();\r
- this.buttonSendErrorReport = new System.Windows.Forms.Button();\r
- this.buttonContinue = new System.Windows.Forms.Button();\r
- this.SuspendLayout();\r
- // \r
- // pictureBoxExplosion\r
- // \r
- this.pictureBoxExplosion.Location = new System.Drawing.Point(8, 8);\r
- this.pictureBoxExplosion.Name = "pictureBoxExplosion";\r
- this.pictureBoxExplosion.Size = new System.Drawing.Size(65, 64);\r
- this.pictureBoxExplosion.TabIndex = 0;\r
- this.pictureBoxExplosion.TabStop = false;\r
- // \r
- // labelErrorExplanation\r
- // \r
- this.labelErrorExplanation.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);\r
- this.labelErrorExplanation.Location = new System.Drawing.Point(96, 8);\r
- this.labelErrorExplanation.Name = "labelErrorExplanation";\r
- this.labelErrorExplanation.Size = new System.Drawing.Size(216, 64);\r
- this.labelErrorExplanation.TabIndex = 1;\r
- this.labelErrorExplanation.Text = "Kaboom! Monodoc has thrown an unexpected exception. Seeing as we\'re in heavy de" +\r
- "velopment, this is hardly surprising. Relevant debugging information follows.";\r
- // \r
- // textBoxErrorMessage\r
- // \r
- this.textBoxErrorMessage.AcceptsReturn = true;\r
- this.textBoxErrorMessage.Location = new System.Drawing.Point(8, 88);\r
- this.textBoxErrorMessage.Multiline = true;\r
- this.textBoxErrorMessage.Name = "textBoxErrorMessage";\r
- this.textBoxErrorMessage.ReadOnly = true;\r
- this.textBoxErrorMessage.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\r
- this.textBoxErrorMessage.Size = new System.Drawing.Size(304, 216);\r
- this.textBoxErrorMessage.TabIndex = 2;\r
- this.textBoxErrorMessage.Text = "";\r
- // \r
- // buttonQuit\r
- // \r
- this.buttonQuit.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
- this.buttonQuit.Location = new System.Drawing.Point(144, 312);\r
- this.buttonQuit.Name = "buttonQuit";\r
- this.buttonQuit.TabIndex = 3;\r
- this.buttonQuit.Text = "Quit";\r
- this.buttonQuit.Click += new System.EventHandler(this.buttonExit_Click);\r
- // \r
- // buttonSendErrorReport\r
- // \r
- this.buttonSendErrorReport.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
- this.buttonSendErrorReport.Location = new System.Drawing.Point(8, 312);\r
- this.buttonSendErrorReport.Name = "buttonSendErrorReport";\r
- this.buttonSendErrorReport.Size = new System.Drawing.Size(117, 23);\r
- this.buttonSendErrorReport.TabIndex = 4;\r
- this.buttonSendErrorReport.Text = "Send Error Report";\r
- this.buttonSendErrorReport.Click += new System.EventHandler(this.buttonSendErrorReport_Click);\r
- // \r
- // buttonContinue\r
- // \r
- this.buttonContinue.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
- this.buttonContinue.Location = new System.Drawing.Point(232, 312);\r
- this.buttonContinue.Name = "buttonContinue";\r
- this.buttonContinue.TabIndex = 5;\r
- this.buttonContinue.Text = "Continue";\r
- this.buttonContinue.Click += new System.EventHandler(this.buttonContinue_Click);\r
- // \r
- // UnexpectedErrorForm\r
- // \r
- this.AcceptButton = this.buttonQuit;\r
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\r
- this.CancelButton = this.buttonContinue;\r
- this.ClientSize = new System.Drawing.Size(320, 341);\r
- this.Controls.AddRange(new System.Windows.Forms.Control[] {\r
- this.buttonContinue,\r
- this.buttonSendErrorReport,\r
- this.buttonQuit,\r
- this.textBoxErrorMessage,\r
- this.labelErrorExplanation,\r
- this.pictureBoxExplosion});\r
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
- this.MaximizeBox = false;\r
- this.MinimizeBox = false;\r
- this.Name = "UnexpectedErrorForm";\r
- this.Text = "Monodoc Error";\r
- this.ResumeLayout(false);\r
-\r
- }\r
- #endregion\r
-\r
- private void buttonExit_Click(object sender, System.EventArgs e)\r
- {\r
- Application.Exit();\r
- }\r
-\r
- private void buttonSendErrorReport_Click(object sender, System.EventArgs e)\r
- {\r
- MessageBox.Show("TODO: This is coming, as soon as I figure out the best " +\r
- "delivery mechanism. Promise.", "Unimplemented Feature"\r
- );\r
- }\r
-\r
- private void buttonContinue_Click(object sender, System.EventArgs e)\r
- {\r
- MessageBox.Show("TODO: implement continue.", "Unimplemented Feature");\r
- }\r
- }\r
-}\r
+++ /dev/null
-Microsoft Visual Studio Solution File, Format Version 7.00\r
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gui", "Gui\Gui.csproj", "{B76CBA27-ABBD-45FE-AFC3-A629BC13BAAE}"\r
-EndProject\r
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Core\Core.csproj", "{73F5A60D-A5E3-4852-B4C6-478275E733F9}"\r
-EndProject\r
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xmltest", "xmltest\xmltest.csproj", "{D83D563A-46E7-4CBA-87EE-FEA674A0CACE}"\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfiguration) = preSolution\r
- ConfigName.0 = Debug\r
- ConfigName.1 = Release\r
- EndGlobalSection\r
- GlobalSection(ProjectDependencies) = postSolution\r
- EndGlobalSection\r
- GlobalSection(ProjectConfiguration) = postSolution\r
- {B76CBA27-ABBD-45FE-AFC3-A629BC13BAAE}.Debug.ActiveCfg = Release|.NET\r
- {B76CBA27-ABBD-45FE-AFC3-A629BC13BAAE}.Debug.Build.0 = Release|.NET\r
- {B76CBA27-ABBD-45FE-AFC3-A629BC13BAAE}.Release.ActiveCfg = Release|.NET\r
- {B76CBA27-ABBD-45FE-AFC3-A629BC13BAAE}.Release.Build.0 = Release|.NET\r
- {73F5A60D-A5E3-4852-B4C6-478275E733F9}.Debug.ActiveCfg = Release|.NET\r
- {73F5A60D-A5E3-4852-B4C6-478275E733F9}.Debug.Build.0 = Release|.NET\r
- {73F5A60D-A5E3-4852-B4C6-478275E733F9}.Release.ActiveCfg = Release|.NET\r
- {73F5A60D-A5E3-4852-B4C6-478275E733F9}.Release.Build.0 = Release|.NET\r
- {D83D563A-46E7-4CBA-87EE-FEA674A0CACE}.Debug.ActiveCfg = Debug|.NET\r
- {D83D563A-46E7-4CBA-87EE-FEA674A0CACE}.Debug.Build.0 = Debug|.NET\r
- {D83D563A-46E7-4CBA-87EE-FEA674A0CACE}.Release.ActiveCfg = Release|.NET\r
- {D83D563A-46E7-4CBA-87EE-FEA674A0CACE}.Release.Build.0 = Release|.NET\r
- EndGlobalSection\r
- GlobalSection(ExtensibilityGlobals) = postSolution\r
- EndGlobalSection\r
- GlobalSection(ExtensibilityAddIns) = postSolution\r
- EndGlobalSection\r
-EndGlobal\r
+++ /dev/null
-using System;\r
-using System.Xml.Serialization;\r
-\r
-using Mono.Doc.Core;\r
-\r
-namespace Mono.Doc.XmlTest\r
-{\r
- public class Driver\r
- {\r
- private static string assemblyFile = \r
- @"D:\projects\mcs\doctools\build\System.Xml.dll";\r
- private static string sampleClass = "System.Xml.XmlDocument";\r
- private static string sampleEnum = "System.Xml.WriteState";\r
-\r
- public Driver()\r
- {\r
- }\r
-\r
- public static void Main(string[] args)\r
- {\r
- AssemblyLoader loader = new AssemblyLoader(assemblyFile);\r
- Type t = loader.Assembly.GetType(sampleClass, true, false);\r
- MonodocFile file = new MonodocFile();\r
- XmlSerializer ser = new XmlSerializer(file.GetType());\r
- ClassDoc aClass = new ClassDoc(t, loader);\r
-\r
- file.Types.Add(aClass);\r
-\r
- EnumDoc anEnum = new EnumDoc(loader.Assembly.GetType(sampleEnum, true, false), loader);\r
-\r
- file.Types.Add(anEnum);\r
-\r
- // serialize to stdout for now\r
- ser.Serialize(Console.Out, file);\r
- Console.WriteLine();\r
- }\r
- }\r
-}\r
+++ /dev/null
-<VisualStudioProject>\r
- <CSHARP\r
- ProjectType = "Local"\r
- ProductVersion = "7.0.9466"\r
- SchemaVersion = "1.0"\r
- ProjectGuid = "{D83D563A-46E7-4CBA-87EE-FEA674A0CACE}"\r
- >\r
- <Build>\r
- <Settings\r
- ApplicationIcon = ""\r
- AssemblyKeyContainerName = ""\r
- AssemblyName = "xmltest"\r
- AssemblyOriginatorKeyFile = ""\r
- DefaultClientScript = "JScript"\r
- DefaultHTMLPageLayout = "Grid"\r
- DefaultTargetSchema = "IE50"\r
- DelaySign = "false"\r
- OutputType = "Exe"\r
- RootNamespace = "Mono.Doc.XmlTest"\r
- StartupObject = "Mono.Doc.XmlTest.Driver"\r
- >\r
- <Config\r
- Name = "Debug"\r
- AllowUnsafeBlocks = "false"\r
- BaseAddress = "285212672"\r
- CheckForOverflowUnderflow = "false"\r
- ConfigurationOverrideFile = ""\r
- DefineConstants = "DEBUG;TRACE"\r
- DocumentationFile = ""\r
- DebugSymbols = "true"\r
- FileAlignment = "4096"\r
- IncrementalBuild = "true"\r
- Optimize = "false"\r
- OutputPath = "..\..\build\"\r
- RegisterForComInterop = "false"\r
- RemoveIntegerChecks = "false"\r
- TreatWarningsAsErrors = "false"\r
- WarningLevel = "4"\r
- />\r
- <Config\r
- Name = "Release"\r
- AllowUnsafeBlocks = "false"\r
- BaseAddress = "285212672"\r
- CheckForOverflowUnderflow = "false"\r
- ConfigurationOverrideFile = ""\r
- DefineConstants = "TRACE"\r
- DocumentationFile = ""\r
- DebugSymbols = "false"\r
- FileAlignment = "4096"\r
- IncrementalBuild = "false"\r
- Optimize = "true"\r
- OutputPath = "bin\Release\"\r
- RegisterForComInterop = "false"\r
- RemoveIntegerChecks = "false"\r
- TreatWarningsAsErrors = "false"\r
- WarningLevel = "4"\r
- />\r
- </Settings>\r
- <References>\r
- <Reference\r
- Name = "System"\r
- AssemblyName = "System"\r
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.dll"\r
- />\r
- <Reference\r
- Name = "System.Data"\r
- AssemblyName = "System.Data"\r
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"\r
- />\r
- <Reference\r
- Name = "System.XML"\r
- AssemblyName = "System.XML"\r
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"\r
- />\r
- <Reference\r
- Name = "Core"\r
- Project = "{73F5A60D-A5E3-4852-B4C6-478275E733F9}"\r
- Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"\r
- />\r
- </References>\r
- </Build>\r
- <Files>\r
- <Include>\r
- <File\r
- RelPath = "Driver.cs"\r
- SubType = "Code"\r
- BuildAction = "Compile"\r
- />\r
- </Include>\r
- </Files>\r
- </CSHARP>\r
-</VisualStudioProject>\r
-\r