[psycho commit] r424 - in trunk/Psycho/src: Core/Psycho.Core/Psycho.Data Core/Psycho.Core/Psycho.Style Libraries/...

1 view
Skip to first unread message

codesite...@google.com

unread,
Sep 4, 2008, 8:06:50 PM9/4/08
to psycho-...@googlegroups.com
Author: p.zurek
Date: Thu Sep 4 16:56:09 2008
New Revision: 424

Modified:
trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/ITopic.cs
trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/Topic.cs
trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/TopicList.cs
trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/IStyle.cs
trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/Style.cs
trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/StyleList.cs
trunk/Psycho/src/Libraries/Teddy/Sample/MainWindow.cs
trunk/Psycho/src/Libraries/Teddy/Teddy.Core/Teddy.Core.Layer/LayerList.cs

Log:
Changed line end character to Windows type so that VS has no problems with
it


Modified: trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/ITopic.cs
==============================================================================
--- trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/ITopic.cs (original)
+++ trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/ITopic.cs Thu Sep 4
16:56:09 2008
@@ -1,27 +1,27 @@
-//------10--------20--------30--------40--------50--------60--------70--------80
-//
-// ITopic.cs
-//
-// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//
-
-using System;
-using System.Collections.Generic;
+//------10--------20--------30--------40--------50--------60--------70--------80
+//
+// ITopic.cs
+//
+// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//

-namespace Psycho.Core
+using System;
+using System.Collections.Generic;
+
+namespace Psycho.Core
{
public interface ITopic : IMapItem
{
@@ -30,7 +30,7 @@
Note Note { get; set; }
bool IsExpanded { get; set; }
bool HasNote { get;}
- int TotalCount { get; }
+ int TotalCount { get; }
string StyleID { get; set; }
string Path { get; }
string Number { get; }
@@ -39,7 +39,7 @@
void AddSubtopic ();
void InsertSubtopic (int index, ITopic topic);
void Delete ();
- void ForEach (Action<ITopic> action);
+ void ForEach (Action<ITopic> action);
void Update ();
}
-}
+}

Modified: trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/Topic.cs
==============================================================================
--- trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/Topic.cs (original)
+++ trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/Topic.cs Thu Sep 4
16:56:09 2008
@@ -1,132 +1,133 @@
-//------10--------20--------30--------40--------50--------60--------70--------80
-//
-// Topic.cs
-//
-// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//
-
+//------10--------20--------30--------40--------50--------60--------70--------80
+//
+// Topic.cs
+//
+// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+
using System;
using System.Collections;
using System.Collections.Generic;
-using System.Xml;
-using System.Xml.Serialization;
+using System.Xml;
+using System.Xml.Serialization;
using Psycho.Core;
-
-namespace Psycho.Core
-{
- public class Topic : MapItem, ITopic
- {
- private string text;
- private string id;
- private Topic parent;
- private Note note;
- private bool isExpanded;
- private TopicList<ITopic> subtopicList;
- private int totalCount;
- private string styleID;
- private string path;
- private string number;
- private int level;
-
- public Topic()
- {
- this.Text = "Topic ";
- }
-
- [XmlElement ()]
- public string Text {
- get { return text; }
- set { text = value; }
- }
-
- public Topic Parent {
- get { return parent; }
- set { parent = value; }
- }
-
- [XmlElement ()]
- public Note Note {
- get { return note; }
- set { note = value; }
- }
-
- [XmlElement ()]
- public bool IsExpanded {
- get { return isExpanded; }
- set { isExpanded = value; }
- }
-
- public bool HasNote {
- get {
- return (note != null &&
- !string.IsNullOrEmpty(note.Text));
- }
- }
-
- public int TotalCount {
- get { return totalCount; }
- }
-
- public string Path {
- get { return path; }
- }
-
- public string Number {
- get { return number; }
- }
-
- public int Level {
- get { return level; }
- }
-
- [XmlElement ("Subtopics")]
- public TopicList<ITopic> SubtopicList {
- get {
- return subtopicList;
- }
- }
-
- [XmlElement]
- public string StyleID {
- get { return styleID; }
- set { styleID = value; }
- }
-
- public void AddSubtopic ()
- {
- ITopic topic = new Topic();
- this.SubtopicList.Add (topic);
- }
-
- public void InsertSubtopic (int index, ITopic item)
- {
- this.SubtopicList.Insert (index, item);
}
-
- public void Delete ()
- {
+
+namespace Psycho.Core
+{
+ public class Topic : MapItem, ITopic
+ {
+ private string text;
+ private string id;
+ private Topic parent;
+ private Note note;
+ private bool isExpanded;
+ private TopicList<ITopic> subtopicList;
+ private int totalCount;
+ private string styleID;
+ private string path;
+ private string number;
+ private int level;
+
+ public Topic()
+ {
+ this.Text = "Topic ";
+ }
+
+ [XmlElement ()]
+ public string Text {
+ get { return text; }
+ set { text = value; }
+ }
+
+ public Topic Parent {
+ get { return parent; }
+ set { parent = value; }
+ }
+
+ [XmlElement ()]
+ public Note Note {
+ get { return note; }
+ set { note = value; }
+ }
+
+ [XmlElement ()]
+ public bool IsExpanded {
+ get { return isExpanded; }
+ set { isExpanded = value; }
+ }
+
+ public bool HasNote {
+ get {
+ return (note != null &&
+ !string.IsNullOrEmpty(note.Text));
+ }
+ }
+
+ public int TotalCount {
+ get { return totalCount; }
+ }
+
+ public string Path {
+ get { return path; }
+ }
+
+ public string Number {
+ get { return number; }
+ }
+
+ public int Level {
+ get { return level; }
+ }
+
+ [XmlElement ("Subtopics")]
+ public TopicList<ITopic> SubtopicList {
+ get {
+ return subtopicList;
+ }
+ }
+
+ [XmlElement]
+ public string StyleID {
+ get { return styleID; }
+ set { styleID = value; }
+ }
+
+ public void AddSubtopic ()
+ {
+ ITopic topic = new Topic();
+ this.SubtopicList.Add (topic);
+ }
+
+ public void InsertSubtopic (int index, ITopic item)
+ {
+ this.SubtopicList.Insert (index, item);
+ }
+
+ public void Delete ()
+ {
if (this.Parent != null)
this.Parent.SubtopicList.Remove(this);
- }
-
- public void ForEach (System.Action<ITopic> action)
- {
- }
-
- public void Update ()
- {
- }
- }
-}
+ }
+
+ public void ForEach (System.Action<ITopic> action)
+ {
+ }
+
+ public void Update ()
+ {
+ }
+ }
+}

Modified: trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/TopicList.cs
==============================================================================
--- trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/TopicList.cs (original)
+++ trunk/Psycho/src/Core/Psycho.Core/Psycho.Data/TopicList.cs Thu Sep 4
16:56:09 2008
@@ -1,34 +1,34 @@
-//------10--------20--------30--------40--------50--------60--------70--------80
-//
-// TopicList.cs
-//
-// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//
-
+//------10--------20--------30--------40--------50--------60--------70--------80
+//
+// TopicList.cs
+//
+// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+
using System;
-using System.Collections;
-using System.Collections.Generic;
+using System.Collections;
+using System.Collections.Generic;
using Psycho.Core;

namespace Psycho.Core
{
- public class TopicList<T> : ITopicList<T>
+ public class TopicList<T> : ITopicList<T>
where T : ITopic
{
- private List<T> list;
+ private List<T> list;
private ITopic parent;

public TopicList (ITopic topic) : base()
@@ -57,87 +57,87 @@
return list[list.Count];
return null;
}
- }
-
- public void Add (T item)
- {
- list.Add (item);
- }
-
- public void Insert (int index, T item)
- {
- list.Insert (index, item);
- }
-
- void IList<T>.Insert (int index, T item)
- {
- list.Insert (index, item);
- }
-
- void IList<T>.RemoveAt (int index)
- {
- list.RemoveAt (index);
- }
-
- int IList<T>.IndexOf (T item)
- {
- return list.IndexOf (item);
- }
-
- T IList<T>.this[int index] {
- get { return list[index]; }
- set { list[index] = value; }
- }
-
- public IEnumerator<T> GetEnumerator ()
- {
- return list.GetEnumerator ();
- }
-
- IEnumerator IEnumerable.GetEnumerator ()
- {
- return GetEnumerator ();
- }
-
- void ICollection<T>.Add (T item)
- {
- list.Add (item);
- }
-
- public bool Remove (T item)
- {
- lock (this) {
- return list.Remove (item);
- }
- }
-
- void ICollection<T>.Clear ()
- {
- list.Clear ();
- }
-
- bool ICollection<T>.Contains (T item)
- {
- return list.Contains (item);
- }
-
- void ICollection<T>.CopyTo (T [] array, int arrayIndex)
- {
- list.CopyTo (array, arrayIndex);
- }
-
- public int Count {
- get {
- lock (this) {
- return list.Count;
- }
- }
- }
-
- bool ICollection<T>.IsReadOnly {
- get {
- return ((ICollection<T>)list).IsReadOnly; }
- }
+ }
+
+ public void Add (T item)
+ {
+ list.Add (item);
+ }
+
+ public void Insert (int index, T item)
+ {
+ list.Insert (index, item);
+ }
+
+ void IList<T>.Insert (int index, T item)
+ {
+ list.Insert (index, item);
+ }
+
+ void IList<T>.RemoveAt (int index)
+ {
+ list.RemoveAt (index);
+ }
+
+ int IList<T>.IndexOf (T item)
+ {
+ return list.IndexOf (item);
+ }
+
+ T IList<T>.this[int index] {
+ get { return list[index]; }
+ set { list[index] = value; }
+ }
+
+ public IEnumerator<T> GetEnumerator ()
+ {
+ return list.GetEnumerator ();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator ()
+ {
+ return GetEnumerator ();
+ }
+
+ void ICollection<T>.Add (T item)
+ {
+ list.Add (item);
+ }
+
+ public bool Remove (T item)
+ {
+ lock (this) {
+ return list.Remove (item);
+ }
+ }
+
+ void ICollection<T>.Clear ()
+ {
+ list.Clear ();
+ }
+
+ bool ICollection<T>.Contains (T item)
+ {
+ return list.Contains (item);
+ }
+
+ void ICollection<T>.CopyTo (T [] array, int arrayIndex)
+ {
+ list.CopyTo (array, arrayIndex);
+ }
+
+ public int Count {
+ get {
+ lock (this) {
+ return list.Count;
+ }
+ }
+ }
+
+ bool ICollection<T>.IsReadOnly {
+ get {
+ return ((ICollection<T>)list).IsReadOnly; }
+ }

}
}

Modified: trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/IStyle.cs
==============================================================================
--- trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/IStyle.cs (original)
+++ trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/IStyle.cs Thu Sep 4
16:56:09 2008
@@ -1,38 +1,38 @@
-//------10--------20--------30--------40--------50--------60--------70--------80
-//
-// IStyle.cs
-//
-// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//
-
-using System;
-
-namespace Psycho.Core
-{
- public interface IStyle
- {
- string Font {get; set; }
-
+//------10--------20--------30--------40--------50--------60--------70--------80
+//
+// IStyle.cs
+//
+// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+
+using System;
+
+namespace Psycho.Core
+{
+ public interface IStyle
+ {
+ string Font {get; set; }
+
FrameShape FrameShape {get; set; }

SubtopicLayout SubtopicLayout {get; set; }

ConnectionShape ConnectionShape {get; set; }

- IColor FillColor {get; set; }
+ IColor FillColor {get; set; }

IColor StrokeColor {get; set; }

@@ -68,8 +68,8 @@

bool FixedWidth {get; set; }

- int Width {get; set; }
-
- TextAlignment TextAlignment {get; set; }
- }
-}
+ int Width {get; set; }
+
+ TextAlignment TextAlignment {get; set; }
+ }
+}

Modified: trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/Style.cs
==============================================================================
--- trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/Style.cs (original)
+++ trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/Style.cs Thu Sep 4
16:56:09 2008
@@ -1,31 +1,31 @@
-//------10--------20--------30--------40--------50--------60--------70--------80
-//
-// Style.cs
-//
-// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//
-
-using System;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace Psycho.Core
-{
- public class Style
- {
+//------10--------20--------30--------40--------50--------60--------70--------80
+//
+// Style.cs
+//
+// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+
+using System;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace Psycho.Core
+{
+ public class Style
+ {
string font;
FrameShape frameShape;
ConnectionPoint connectionPoint;
@@ -48,7 +48,7 @@
set { font = value; }
}

- public FrameShape FrameShape
+ public FrameShape FrameShape
{
get { return frameShape; }
set { frameShape = value; }
@@ -209,11 +209,11 @@
{
get { return width; }
set { width = value; }
- }
-
+ }
+
public TextAlignment TextAlignment{
get { return textAlignment; }
set { textAlignment = value; }
}
}
-}
+}

Modified: trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/StyleList.cs
==============================================================================
--- trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/StyleList.cs (original)
+++ trunk/Psycho/src/Core/Psycho.Core/Psycho.Style/StyleList.cs Thu Sep 4
16:56:09 2008
@@ -1,117 +1,117 @@
-//------10--------20--------30--------40--------50--------60--------70--------80
-//
-// StyleList.cs
-//
-// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace Psycho.Core
-{
- public class StyleList<T> : IStyleList<T>
+//------10--------20--------30--------40--------50--------60--------70--------80
+//
+// StyleList.cs
+//
+// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Psycho.Core
+{
+ public class StyleList<T> : IStyleList<T>
where T : IStyle
{
public StyleList () : base()
{
}
-
- private List<T> list;
+
+ private List<T> list;
+
+ public void Add (T item)
+ {
+ list.Add (item);
+ }
+
+ public void Insert (int index, T item)
+ {
+ list.Insert (index, item);
+ }
+
+ void IList<T>.Insert (int index, T item)
+ {
+ list.Insert (index, item);
+ }
+
+ void IList<T>.RemoveAt (int index)
+ {
+ list.RemoveAt (index);
+ }
+
+ int IList<T>.IndexOf (T item)
+ {
+ return list.IndexOf (item);
+ }
+
+ T IList<T>.this[int index] {
+ get { return list[index]; }
+ set { list[index] = value; }
+ }
+
+ public IEnumerator<T> GetEnumerator ()
+ {
+ return list.GetEnumerator ();
+ }

- public void Add (T item)
- {
- list.Add (item);
- }
-
- public void Insert (int index, T item)
- {
- list.Insert (index, item);
- }
-
- void IList<T>.Insert (int index, T item)
- {
- list.Insert (index, item);
- }
-
- void IList<T>.RemoveAt (int index)
- {
- list.RemoveAt (index);
- }
-
- int IList<T>.IndexOf (T item)
- {
- return list.IndexOf (item);
- }
-
- T IList<T>.this[int index] {
- get { return list[index]; }
- set { list[index] = value; }
- }
-
- public IEnumerator<T> GetEnumerator ()
- {
- return list.GetEnumerator ();
- }
-
- IEnumerator IEnumerable.GetEnumerator ()
- {
- return GetEnumerator ();
- }
-
- void ICollection<T>.Add (T item)
- {
- list.Add (item);
- }
-
- public bool Remove (T item)
- {
- lock (this) {
- return list.Remove (item);
- }
- }
-
- void ICollection<T>.Clear ()
- {
- list.Clear ();
- }
-
- bool ICollection<T>.Contains (T item)
- {
- return list.Contains (item);
- }
-
- void ICollection<T>.CopyTo (T [] array, int arrayIndex)
- {
- list.CopyTo (array, arrayIndex);
- }
-
- public int Count {
- get {
- lock (this) {
- return list.Count;
- }
- }
- }
-
- bool ICollection<T>.IsReadOnly {
- get {
- return ((ICollection<T>)list).IsReadOnly; }
- }
+ IEnumerator IEnumerable.GetEnumerator ()
+ {
+ return GetEnumerator ();
+ }
+
+ void ICollection<T>.Add (T item)
+ {
+ list.Add (item);
+ }
+
+ public bool Remove (T item)
+ {
+ lock (this) {
+ return list.Remove (item);
+ }
+ }
+
+ void ICollection<T>.Clear ()
+ {
+ list.Clear ();
+ }
+
+ bool ICollection<T>.Contains (T item)
+ {
+ return list.Contains (item);
+ }
+
+ void ICollection<T>.CopyTo (T [] array, int arrayIndex)
+ {
+ list.CopyTo (array, arrayIndex);
+ }
+
+ public int Count {
+ get {
+ lock (this) {
+ return list.Count;
+ }
+ }
+ }
+
+ bool ICollection<T>.IsReadOnly {
+ get {
+ return ((ICollection<T>)list).IsReadOnly; }
+ }

- }
-}
+ }
+}

Modified: trunk/Psycho/src/Libraries/Teddy/Sample/MainWindow.cs
==============================================================================
--- trunk/Psycho/src/Libraries/Teddy/Sample/MainWindow.cs (original)
+++ trunk/Psycho/src/Libraries/Teddy/Sample/MainWindow.cs Thu Sep 4
16:56:09 2008
@@ -1,28 +1,28 @@
-//------10--------20--------30--------40--------50--------60--------70--------80
-//
-// MainWindow.cs
-//
-// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
copy
-// of this software and associated documentation files (the "Software"),
to deal
-// in the Software without restriction, including without limitation the
rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included
in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN
-// THE SOFTWARE.
-//
-
+//------10--------20--------30--------40--------50--------60--------70--------80
+//
+// MainWindow.cs
+//
+// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
copy
+// of this software and associated documentation files (the "Software"),
to deal
+// in the Software without restriction, including without limitation the
rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included
in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN
+// THE SOFTWARE.
+//
+

using System;
using Gtk;
@@ -37,17 +37,17 @@
{
VBox globalVBox = new VBox ();

- Canvas canvas = new Canvas();
- Button addShapeButton = new Button ();
- addShapeButton.Label = "Add new shape";
-
- HBox buttonHBox = new HBox();
-
+ Canvas canvas = new Canvas();
+ Button addShapeButton = new Button ();
+ addShapeButton.Label = "Add new shape";
+
+ HBox buttonHBox = new HBox();
+
buttonHBox.PackStart (addShapeButton, false, true, 6);
-
- globalVBox.PackStart(canvas, true, true, 6);
- globalVBox.PackStart(buttonHBox, false, false, 6);
- globalVBox.ShowAll ();
+
+ globalVBox.PackStart(canvas, true, true, 6);
+ globalVBox.PackStart(buttonHBox, false, false, 6);
+ globalVBox.ShowAll ();

this.Add (globalVBox);
}

Modified:
trunk/Psycho/src/Libraries/Teddy/Teddy.Core/Teddy.Core.Layer/LayerList.cs
==============================================================================
---
trunk/Psycho/src/Libraries/Teddy/Teddy.Core/Teddy.Core.Layer/LayerList.cs
(original)
+++
trunk/Psycho/src/Libraries/Teddy/Teddy.Core/Teddy.Core.Layer/LayerList.cs
Thu Sep 4 16:56:09 2008
@@ -1,123 +1,123 @@
-//------10--------20--------30--------40--------50--------60--------70--------80
-//
-// ILayerList.cs
-//
-// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
copy
-// of this software and associated documentation files (the "Software"),
to deal
-// in the Software without restriction, including without limitation the
rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included
in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN
-// THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace Teddy.Core
-{
- public class LayerList<T> : ILayerList<T>
+//------10--------20--------30--------40--------50--------60--------70--------80
+//
+// ILayerList.cs
+//
+// Copyright (C) 2008 Piotr Zurek p.z...@gmail.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
copy
+// of this software and associated documentation files (the "Software"),
to deal
+// in the Software without restriction, including without limitation the
rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included
in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN
+// THE SOFTWARE.
+//
+
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Teddy.Core
+{
+ public class LayerList<T> : ILayerList<T>
where T : ILayer
{
public LayerList() : base()
- {
+ {
list.Clear();
}
-
- private List<T> list;
+
+ private List<T> list;
+
+ public void Add (T item)
+ {
+ list.Add (item);
+ }
+
+ public void Insert (int index, T item)
+ {
+ list.Insert (index, item);
+ }
+
+ void IList<T>.Insert (int index, T item)
+ {
+ list.Insert (index, item);
+ }
+
+ void IList<T>.RemoveAt (int index)
+ {
+ list.RemoveAt (index);
+ }
+
+ int IList<T>.IndexOf (T item)
+ {
+ return list.IndexOf (item);
+ }
+
+ T IList<T>.this[int index] {
+ get { return list[index]; }
+ set { list[index] = value; }
+ }
+
+ public IEnumerator<T> GetEnumerator ()
+ {
+ return list.GetEnumerator ();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator ()
+ {
+ return GetEnumerator ();
+ }
+
+ void ICollection<T>.Add (T item)
+ {
+ list.Add (item);
+ }
+
+ public bool Remove (T item)
+ {
+ lock (this) {
+ return list.Remove (item);
+ }
+ }
+
+ void ICollection<T>.Clear ()
+ {
+ list.Clear ();
+ }
+
+ bool ICollection<T>.Contains (T item)
+ {
+ return list.Contains (item);
+ }
+
+ void ICollection<T>.CopyTo (T [] array, int arrayIndex)
+ {
+ list.CopyTo (array, arrayIndex);
+ }
+
+ public int Count {
+ get {
+ lock (this) {
+ return list.Count;
+ }
+ }
+ }

- public void Add (T item)
- {
- list.Add (item);
- }
-
- public void Insert (int index, T item)
- {
- list.Insert (index, item);
- }
-
- void IList<T>.Insert (int index, T item)
- {
- list.Insert (index, item);
- }
-
- void IList<T>.RemoveAt (int index)
- {
- list.RemoveAt (index);
- }
-
- int IList<T>.IndexOf (T item)
- {
- return list.IndexOf (item);
- }
-
- T IList<T>.this[int index] {
- get { return list[index]; }
- set { list[index] = value; }
- }
-
- public IEnumerator<T> GetEnumerator ()
- {
- return list.GetEnumerator ();
- }
-
- IEnumerator IEnumerable.GetEnumerator ()
- {
- return GetEnumerator ();
- }
-
- void ICollection<T>.Add (T item)
- {
- list.Add (item);
- }
-
- public bool Remove (T item)
- {
- lock (this) {
- return list.Remove (item);
- }
- }
-
- void ICollection<T>.Clear ()
- {
- list.Clear ();
- }
-
- bool ICollection<T>.Contains (T item)
- {
- return list.Contains (item);
- }
-
- void ICollection<T>.CopyTo (T [] array, int arrayIndex)
- {
- list.CopyTo (array, arrayIndex);
- }
-
- public int Count {
- get {
- lock (this) {
- return list.Count;
- }
- }
- }
-
- bool ICollection<T>.IsReadOnly {
- get {
- return ((ICollection<T>)list).IsReadOnly; }
- }
- }
+ bool ICollection<T>.IsReadOnly {
+ get {
+ return ((ICollection<T>)list).IsReadOnly; }
+ }
+ }
}

Reply all
Reply to author
Forward
0 new messages