2010-08-20 06:07:56 +00:00
|
|
|
|
|
|
|
|
|
#region ================== Copyright (c) 2010 Pascal vd Heiden
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2010 Pascal vd Heiden
|
|
|
|
|
* This program is released under GNU General Public License
|
|
|
|
|
*
|
|
|
|
|
* 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.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region ================== Namespaces
|
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using CodeImp.DoomBuilder.Map;
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.CommentsPanel
|
|
|
|
|
{
|
|
|
|
|
public class CommentInfo
|
|
|
|
|
{
|
2014-02-21 14:42:12 +00:00
|
|
|
|
private readonly string comment;
|
2010-08-20 06:07:56 +00:00
|
|
|
|
private List<MapElement> elements;
|
2010-08-20 15:04:08 +00:00
|
|
|
|
private DataGridViewRow row;
|
|
|
|
|
|
2010-08-20 06:07:56 +00:00
|
|
|
|
// Properties
|
|
|
|
|
public string Comment { get { return comment; } }
|
|
|
|
|
public List<MapElement> Elements { get { return elements; } }
|
2010-08-20 15:04:08 +00:00
|
|
|
|
public DataGridViewRow Row { get { return row; } set { row = value; } }
|
2010-08-20 06:07:56 +00:00
|
|
|
|
|
|
|
|
|
// Constructor
|
|
|
|
|
public CommentInfo(string comment, MapElement e)
|
|
|
|
|
{
|
|
|
|
|
this.comment = comment;
|
|
|
|
|
this.elements = new List<MapElement>();
|
2010-08-20 15:04:08 +00:00
|
|
|
|
this.AddElement(e);
|
|
|
|
|
this.row = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This adds an element
|
|
|
|
|
public void AddElement(MapElement e)
|
|
|
|
|
{
|
2010-08-20 06:07:56 +00:00
|
|
|
|
this.elements.Add(e);
|
|
|
|
|
}
|
2010-08-20 15:04:08 +00:00
|
|
|
|
|
|
|
|
|
// This replaces the elements with those from another
|
|
|
|
|
public void ReplaceElements(CommentInfo other)
|
|
|
|
|
{
|
|
|
|
|
this.elements = other.elements;
|
|
|
|
|
}
|
2010-08-20 06:07:56 +00:00
|
|
|
|
}
|
|
|
|
|
}
|