예제 #1
0
 /// <summary>
 /// Initializes a new instance of the ExplorerBarInfo class with
 /// default settings
 /// </summary>
 public ExplorerBarInfo()
 {
     this.taskPane = new TaskPaneInfo();
     this.taskItem = new TaskItemInfo();
     this.expando  = new ExpandoInfo();
     this.header   = new HeaderInfo();
 }
예제 #2
0
        /// <summary>
        /// Populates the TaskPaneInfoSurrogate with data that is to be
        /// serialized from the specified TaskPaneInfo
        /// </summary>
        /// <param name="taskPaneInfo">The TaskPaneInfo that contains the data
        /// to be serialized</param>
        public void Load(TaskPaneInfo taskPaneInfo)
        {
            this.GradientStartColor = Tools.Drawing.ConvertColorToString(taskPaneInfo.GradientStartColor);
            this.GradientEndColor   = Tools.Drawing.ConvertColorToString(taskPaneInfo.GradientEndColor);
            this.GradientDirection  = taskPaneInfo.GradientDirection;

            this.Padding = taskPaneInfo.Padding;

            this.BackImage   = taskPaneInfo.BackImage.ToByteArray();
            this.StretchMode = taskPaneInfo.StretchMode;

            this.Watermark          = taskPaneInfo.Watermark.ToByteArray();
            this.WatermarkAlignment = taskPaneInfo.WatermarkAlignment;
        }
예제 #3
0
        /// <summary>
        /// Returns a TaskPaneInfo that contains the deserialized TaskPaneInfoSurrogate data
        /// </summary>
        /// <returns>A TaskPaneInfo that contains the deserialized TaskPaneInfoSurrogate data</returns>
        public TaskPaneInfo Save()
        {
            TaskPaneInfo taskPaneInfo = new TaskPaneInfo();

            taskPaneInfo.GradientStartColor = Tools.Drawing.ConvertStringToColor(this.GradientStartColor);
            taskPaneInfo.GradientEndColor   = Tools.Drawing.ConvertStringToColor(this.GradientEndColor);
            taskPaneInfo.GradientDirection  = this.GradientDirection;

            taskPaneInfo.Padding = this.Padding;

            taskPaneInfo.BackImage   = this.BackImage.ToImage();
            taskPaneInfo.StretchMode = this.StretchMode;

            taskPaneInfo.Watermark          = this.Watermark.ToImage();
            taskPaneInfo.WatermarkAlignment = this.WatermarkAlignment;

            return(taskPaneInfo);
        }