public ChangeStringDialog(StringBlock block, Int32 maxLength) { if (block == null) { throw new ArgumentNullException("block"); } this.block = block; this.maxLength = maxLength; InitializeComponent(); valueTextBox.MaxLength = maxLength; valueTextBox.Text = block.Value; valueTextBox.KeyDown += new KeyEventHandler(HitEnterKey); }
/// <summary> /// Gets whether a given Moveable represents a string value or variable. /// </summary> /// <param name="moveable">The Moveable to check.</param> /// <returns>True if the Moveable is a string; false otherwise.</returns> public static bool IsString(Moveable moveable) { StringBlock stringBlock = moveable as StringBlock; return stringBlock != null; }
public bool Equals(StringBlock other) { return(other != null && other.Value == Value); }
public ChangeStringDialog(StringBlock block) : this(block, 140) { }