Inheritance: System.Windows.Forms.Button
Exemplo n.º 1
0
            /// <summary>
            /// Returns a TaskItem that contains the deserialized TaskItemSurrogate data
            /// </summary>
            /// <returns>A TaskItem that contains the deserialized TaskItemSurrogate data</returns>
            public TaskItem Save()
            {
                TaskItem taskItem = new TaskItem();

                taskItem.Name = this.Name;
                taskItem.Size = this.Size;
                taskItem.Location = this.Location;

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

                taskItem.customSettings = this.CustomSettings.Save();
                taskItem.customSettings.TaskItem = taskItem;

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

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

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

                taskItem.Font = new Font(this.FontName, this.FontSize, this.FontDecoration);
                taskItem.UseGdiText = this.UseGdiText;

                taskItem.Tag = ThemeManager.ConvertByteArrayToObject(this.Tag);

                return taskItem;
            }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the TaskLinkInfo class with default settings
        /// </summary>
        public TaskItemInfo()
        {
            // set padding values
            this.padding = new Padding(6, 0, 4, 0);

            // set margin values
            this.margin = new Margin(0, 4, 0, 0);

            // set text values
            this.linkNormal = SystemColors.ControlText;
            this.linkHot = SystemColors.ControlText;

            this.fontDecoration = FontStyle.Underline;

            this.owner = null;
        }
Exemplo n.º 3
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);
            }