/// <summary>
            /// Populates the TaskItemSurrogate with data that is to be
            /// serialized from the specified TaskItem
            /// </summary>
            /// <param name="taskItem">The TaskItem that contains the data
            /// to be serialized</param>
            public void Load(TaskItem taskItem)
            {
                this.Name     = taskItem.Name;
                this.Size     = taskItem.Size;
                this.Location = taskItem.Location;

                this.BackColor = ThemeManager.ConvertColorToString(taskItem.BackColor);

                this.CustomSettings = new TaskItemInfo.TaskItemInfoSurrogate();
                this.CustomSettings.Load(taskItem.CustomSettings);

                this.Text          = taskItem.Text;
                this.ShowFocusCues = taskItem.ShowFocusCues;
                this.Image         = ThemeManager.ConvertImageToByteArray(taskItem.Image);

                this.Enabled = taskItem.Enabled;
                this.Visible = taskItem.Visible;

                this.Anchor = taskItem.Anchor;
                this.Dock   = taskItem.Dock;

                this.FontName       = taskItem.Font.FontFamily.Name;
                this.FontSize       = taskItem.Font.SizeInPoints;
                this.FontDecoration = taskItem.Font.Style;
                this.UseGdiText     = taskItem.UseGdiText;

                this.Tag = ThemeManager.ConvertObjectToByteArray(taskItem.Tag);
            }
            protected TaskItemSurrogate(SerializationInfo info, StreamingContext context) : base()
            {
                int version = info.GetInt32("Version");

                this.Name     = info.GetString("Name");
                this.Size     = (Size)info.GetValue("Size", typeof(Size));
                this.Location = (Point)info.GetValue("Location", typeof(Point));

                this.BackColor = info.GetString("BackColor");

                this.CustomSettings = (TaskItemInfo.TaskItemInfoSurrogate)info.GetValue("CustomSettings", typeof(TaskItemInfo.TaskItemInfoSurrogate));

                this.Text          = info.GetString("Text");
                this.ShowFocusCues = info.GetBoolean("ShowFocusCues");
                this.Image         = (byte[])info.GetValue("Image", typeof(byte[]));

                this.Enabled = info.GetBoolean("Enabled");
                this.Visible = info.GetBoolean("Visible");

                this.Anchor = (AnchorStyles)info.GetValue("Anchor", typeof(AnchorStyles));
                this.Dock   = (DockStyle)info.GetValue("Dock", typeof(DockStyle));

                this.FontName       = info.GetString("FontName");
                this.FontSize       = info.GetSingle("FontSize");
                this.FontDecoration = (FontStyle)info.GetValue("FontDecoration", typeof(FontStyle));

                if (version >= 3300)
                {
                    this.UseGdiText = info.GetBoolean("UseGdiText");
                }

                this.Tag = (byte[])info.GetValue("Tag", typeof(byte[]));
            }
            /// <summary>
            /// Initializes a new instance of the TaskItemSurrogate class with default settings
            /// </summary>
            public TaskItemSurrogate()
            {
                this.Name = null;

                this.Size     = Size.Empty;
                this.Location = Point.Empty;

                this.BackColor = ThemeManager.ConvertColorToString(Color.Empty);

                this.CustomSettings = null;

                this.Text          = null;
                this.ShowFocusCues = false;
                this.Image         = new byte[0];

                this.Enabled = true;
                this.Visible = true;

                this.Anchor = AnchorStyles.None;
                this.Dock   = DockStyle.None;

                this.FontName       = null;
                this.FontSize       = 8.25f;
                this.FontDecoration = FontStyle.Regular;
                this.UseGdiText     = false;

                this.Tag = new byte[0];
            }