Esempio n. 1
0
            /// <summary>
            /// Populates the ExplorerBarInfoSurrogate with data that is to be 
            /// serialized from the specified ExplorerBarInfo
            /// </summary>
            /// <param name="explorerBarInfo">The ExplorerBarInfo that contains the data 
            /// to be serialized</param>
            public void Load(ExplorerBarInfo explorerBarInfo)
            {
                this.TaskPaneInfoSurrogate = new TaskPaneInfo.TaskPaneInfoSurrogate();
                this.TaskPaneInfoSurrogate.Load(explorerBarInfo.TaskPane);

                this.TaskItemInfoSurrogate = new TaskItemInfo.TaskItemInfoSurrogate();
                this.TaskItemInfoSurrogate.Load(explorerBarInfo.TaskItem);

                this.ExpandoInfoSurrogate = new ExpandoInfo.ExpandoInfoSurrogate();
                this.ExpandoInfoSurrogate.Load(explorerBarInfo.Expando);

                this.HeaderInfoSurrogate = new HeaderInfo.HeaderInfoSurrogate();
                this.HeaderInfoSurrogate.Load(explorerBarInfo.Header);
            }
Esempio n. 2
0
            protected ExplorerBarInfoSurrogate(SerializationInfo info, StreamingContext context)
                : base()
            {
                int version = info.GetInt32("Version");

                this.TaskPaneInfoSurrogate = (TaskPaneInfo.TaskPaneInfoSurrogate) info.GetValue("TaskPaneInfoSurrogate", typeof(TaskPaneInfo.TaskPaneInfoSurrogate));
                this.TaskItemInfoSurrogate = (TaskItemInfo.TaskItemInfoSurrogate) info.GetValue("TaskItemInfoSurrogate", typeof(TaskItemInfo.TaskItemInfoSurrogate));
                this.ExpandoInfoSurrogate = (ExpandoInfo.ExpandoInfoSurrogate) info.GetValue("ExpandoInfoSurrogate", typeof(ExpandoInfo.ExpandoInfoSurrogate));
                this.HeaderInfoSurrogate = (HeaderInfo.HeaderInfoSurrogate) info.GetValue("HeaderInfoSurrogate", typeof(HeaderInfo.HeaderInfoSurrogate));
            }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the ExplorerBarInfoSurrogate class with default settings
 /// </summary>
 public ExplorerBarInfoSurrogate()
 {
     this.TaskPaneInfoSurrogate = null;
     this.TaskItemInfoSurrogate = null;
     this.ExpandoInfoSurrogate = null;
     this.HeaderInfoSurrogate = null;
 }
Esempio n. 4
0
            /// <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);
            }
Esempio n. 5
0
            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[]));
            }
Esempio n. 6
0
            /// <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];
            }