public override string ToString() { if (ResourceValue == null) { return("(Nothing/null)"); } string type = ResourceValue.GetType().FullName; string tmp = String.Empty; switch (type) { case "System.String": tmp = ResourceValue.ToString(); break; case "System.Byte[]": tmp = "[Size = " + ((byte[])ResourceValue).Length + "]"; break; case "System.Drawing.Bitmap": Bitmap bmp = ResourceValue as Bitmap; tmp = "[Width = " + bmp.Size.Width + ", Height = " + bmp.Size.Height + "]"; break; case "System.Drawing.Icon": Icon icon = ResourceValue as Icon; tmp = "[Width = " + icon.Size.Width + ", Height = " + icon.Size.Height + "]"; break; case "System.Windows.Forms.Cursor": Cursor c = ResourceValue as Cursor; tmp = "[Width = " + c.Size.Width + ", Height = " + c.Size.Height + "]"; break; case "System.Boolean": tmp = ResourceValue.ToString(); break; default: tmp = ResourceValue.ToString(); break; } return(tmp); }
public ValueNode(ResourceValue value) : this() { this.Text = value.ToString(); this.value = value; }