Exemplo n.º 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();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Populates the TaskItemInfoSurrogate with data that is to be
        /// serialized from the specified TaskItemInfo
        /// </summary>
        /// <param name="taskItemInfo">The TaskItemInfo that contains the data
        /// to be serialized</param>
        public void Load(TaskItemInfo taskItemInfo)
        {
            this.Padding = taskItemInfo.Padding;
            this.Margin  = taskItemInfo.Margin;

            this.LinkNormal = Tools.Drawing.ConvertColorToString(taskItemInfo.LinkColor);
            this.LinkHot    = Tools.Drawing.ConvertColorToString(taskItemInfo.HotLinkColor);

            this.FontDecoration = taskItemInfo.FontDecoration;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Returns a TaskItemInfo that contains the deserialized TaskItemInfoSurrogate data
        /// </summary>
        /// <returns>A TaskItemInfo that contains the deserialized TaskItemInfoSurrogate data</returns>
        public TaskItemInfo Save()
        {
            TaskItemInfo taskItemInfo = new TaskItemInfo();

            taskItemInfo.Padding = this.Padding;
            taskItemInfo.Margin  = this.Margin;

            taskItemInfo.LinkColor    = Tools.Drawing.ConvertStringToColor(this.LinkNormal);
            taskItemInfo.HotLinkColor = Tools.Drawing.ConvertStringToColor(this.LinkHot);

            taskItemInfo.FontDecoration = this.FontDecoration;

            return(taskItemInfo);
        }
Exemplo n.º 4
0
        ///// <summary>
        /////
        ///// </summary>
        //private Win32.DrawTextFlags drawTextFlags;

        #endregion


        #region Constructor

        /// <summary>
        /// Initializes a new instance of the TaskItem class with default settings
        /// </summary>
        public TaskItem()
            : base()
        {
            // set control styles
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.Selectable, true);

            this.TabStop = true;

            this.BackColor = Color.Transparent;

            // get the system theme settings
            this.systemSettings = ExplorerBarInfo.Default;

            this.customSettings          = new TaskItemInfo();
            this.customSettings.TaskItem = this;
            this.customSettings.SetDefaultEmptyValues();

            // preferred size
            this.preferredWidth  = -1;
            this.preferredHeight = -1;

            // unfocused item
            this.focusState = FocusStates.None;

            this.Cursor = Cursors.Hand;

            this.textRect  = new Rectangle();
            this.TextAlign = ContentAlignment.TopLeft;

            this.showFocusCues = false;

            this.InitStringFormat();
            this.InitDrawTextFlags();
        }