|
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Drawing;
namespace ScintillaNet
{
[TypeConverterAttribute(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class LongLines : ScintillaHelperBase
{
internal LongLines(Scintilla scintilla) : base(scintilla) { }
internal bool ShouldSerialize()
{
return ShouldSerializeEdgeColor() ||
ShouldSerializeEdgeColumn() ||
ShouldSerializeEdgeMode();
}
#region EdgeMode
public EdgeMode EdgeMode
{
get
{
return (EdgeMode)NativeScintilla.GetEdgeMode();
}
set
{
NativeScintilla.SetEdgeMode((int)value);
}
}
private bool ShouldSerializeEdgeMode()
{
return EdgeMode != EdgeMode.None;
}
private void ResetEdgeMode()
{
EdgeMode = EdgeMode.None;
}
#endregion
#region EdgeColumn
public int EdgeColumn
{
get
{
return NativeScintilla.GetEdgeColumn();
}
set
{
NativeScintilla.SetEdgeColumn(value);
}
}
private bool ShouldSerializeEdgeColumn()
{
return EdgeColumn != 0;
}
private void ResetEdgeColumn()
{
EdgeColumn = 0;
}
#endregion
#region EdgeColor
public Color EdgeColor
{
get
{
if (Scintilla.ColorBag.ContainsKey("LongLines.EdgeColor"))
return Scintilla.ColorBag["LongLines.EdgeColor"];
return Color.Silver;
}
set
{
if (value == Color.Silver)
Scintilla.ColorBag.Remove("LongLines.EdgeColor");
Scintilla.ColorBag["LongLines.EdgeColor"] = value;
NativeScintilla.SetEdgeColour(Utilities.ColorToRgb(value));
}
}
private bool ShouldSerializeEdgeColor()
{
return EdgeColor != Color.Silver;
}
private void ResetEdgeColor()
{
EdgeColor = Color.Silver;
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.