A class that contains system defined settings for TaskItems
コード例 #1
0
ファイル: ExplorerBarInfo.cs プロジェクト: zhuangyy/Motion
            /// <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 = ThemeManager.ConvertStringToColor(this.LinkNormal);
                taskItemInfo.HotLinkColor = ThemeManager.ConvertStringToColor(this.LinkHot);

                taskItemInfo.FontDecoration = this.FontDecoration;

                return taskItemInfo;
            }
コード例 #2
0
ファイル: ExplorerBarInfo.cs プロジェクト: zhuangyy/Motion
        /// <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();

            this.officialTheme = false;
            this.classicTheme = false;
            this.shellStylePath = null;
        }
コード例 #3
0
ファイル: ExplorerBarInfo.cs プロジェクト: zhuangyy/Motion
            /// <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 = ThemeManager.ConvertColorToString(taskItemInfo.LinkColor);
                this.LinkHot = ThemeManager.ConvertColorToString(taskItemInfo.HotLinkColor);

                this.FontDecoration = taskItemInfo.FontDecoration;
            }
コード例 #4
0
ファイル: TaskItem.cs プロジェクト: zhuangyy/Motion
        /// <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 = ThemeManager.GetSystemExplorerBarSettings();

            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.useGdiText = false;

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