![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Miscellaneous Support Miscellaneous support issues. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
|
On all my properties, where the user has access to change them, like colors, etc. I've serialized like so:
/// <summary> /// DefaultTextColor /// </summary> /// <returns>Color</returns> [XmlIgnore] [Description("Set the default text color. Default: Black")] [Category("Design Layer")] [NinjaTrader.Gui.Design.DisplayName("Default Text Color")] public Color DefaultTextColor { get { return defaultTextColor; } set { defaultTextColor = value; } } [Browsable(false)] public string DefaultTextColorSerialize { get { return NinjaTrader.Gui.Design.SerializableColor.ToString( defaultTextColor); } set { defaultTextColor = NinjaTrader.Gui.Design.SerializableColor.FromStrin g(value); } } ...I've done this with Fonts as well, however, when it comes to Booleans, I can't figure out the correct syntax, as intellisense doesn't really "hint" anything. I was looking for something like: NinjaTrader.Gui.Design.SerializableBoolean.ToStrin g(blah)... how does one serialize a boolean? and for that matter, Pens, etc
Last edited by funk101; 05-21-2009 at 09:55 PM.
|
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
"bool" is a basic type like "int", "double" etc. -> no need to apply any custom handling for XML serialization
Dierk
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Serialization Error | shawnj | Indicator Development | 29 | 11-14-2011 06:11 AM |
| Serialization Error | gyoung | Miscellaneous Support | 14 | 05-03-2009 04:33 AM |
| More Serialization Bugs - SolidBrush | shawnj | Indicator Development | 3 | 12-04-2008 09:06 AM |
| Serialization Bug | shawnj | Indicator Development | 2 | 12-03-2008 12:28 AM |
| Serialization error | ct | Strategy Development | 1 | 09-12-2008 02:32 PM |