/// <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(); }
/// <summary> /// Initializes a new instance of the Expando class with default settings /// </summary> public Expando() : base() { // This call is required by the Windows.Forms Form Designer. this.components = new System.ComponentModel.Container(); // set control styles this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.SetStyle(ControlStyles.Selectable, true); this.TabStop = true; // get the system theme settings this.systemSettings = ThemeManager.GetSystemExplorerBarSettings(); this.customSettings = new ExpandoInfo(); this.customSettings.Expando = this; this.customSettings.SetDefaultEmptyValues(); this.customHeaderSettings = new HeaderInfo(); this.customHeaderSettings.Expando = this; this.customHeaderSettings.SetDefaultEmptyValues(); this.BackColor = this.systemSettings.Expando.NormalBackColor; // the height of the Expando in the expanded state this.expandedHeight = 100; // animation this.animate = false; this.animatingFade = false; this.animatingSlide = false; this.animationImage = null; this.slideEndHeight = -1; this.animationHelper = null; this.fadeHeights = new int[AnimationHelper.NumAnimationFrames]; // size this.Size = new Size(this.systemSettings.Header.BackImageWidth, this.expandedHeight); this.titleBarHeight = this.systemSettings.Header.BackImageHeight; this.headerHeight = this.titleBarHeight; this.oldWidth = this.Width; // start expanded this.collapsed = false; // not a special group this.specialGroup = false; // unfocused titlebar this.focusState = FocusStates.None; // no title image this.titleImage = null; this.watermark = null; this.Font = new Font(this.TitleFont.Name, 8.25f, FontStyle.Regular); // don't get the Expando to layout its items itself this.autoLayout = false; // don't know which TaskPane we belong to this.taskpane = null; // internal list of items this.itemList = new ItemCollection(this); this.hiddenControls = new ArrayList(); // initialise the dummyPanel this.dummyPanel = new AnimationPanel(); this.dummyPanel.Size = this.Size; this.dummyPanel.Location = new Point(-1000, 0); this.canCollapse = true; this.showFocusCues = false; this.useDefaultTabHandling = true; this.CalcAnimationHeights(); this.slideAnimationBatched = false; this.dragging = false; this.dragStart = Point.Empty; this.beginUpdateCount = 0; this.initialising = false; this.layout = false; }
public Expando() : base() { this.components = new System.ComponentModel.Container(); this.SetStyle(ControlStyles.DoubleBuffer, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.SetStyle(ControlStyles.Selectable, true); this.TabStop = true; this.systemSettings = ThemeManager.GetSystemExplorerBarSettings(); this.customSettings = new ExpandoInfo(); this.customSettings.Expando = this; this.customSettings.SetDefaultEmptyValues(); this.customHeaderSettings = new HeaderInfo(); this.customHeaderSettings.Expando = this; this.customHeaderSettings.SetDefaultEmptyValues(); this.BackColor = this.systemSettings.Expando.NormalBackColor; this.expandedHeight = 100; this.animate = false; this.animatingFade = false; this.animatingSlide = false; this.animationImage = null; this.slideEndHeight = -1; this.animationHelper = null; this.fadeHeights = new int[AnimationHelper.NumAnimationFrames]; this.Size = new Size(this.systemSettings.Header.BackImageWidth, this.expandedHeight); this.titleBarHeight = this.systemSettings.Header.BackImageHeight; this.headerHeight = this.titleBarHeight; this.oldWidth = this.Width; this.collapsed = false; this.specialGroup = false; this.focusState = FocusStates.None; this.titleImage = null; this.watermark = null; this.Font = new Font(this.TitleFont.Name, 8.25f, FontStyle.Regular); this.autoLayout = false; this.taskpane = null; this.itemList = new ItemCollection(this); this.hiddenControls = new ArrayList(); this.dummyPanel = new AnimationPanel(); this.dummyPanel.Size = this.Size; this.dummyPanel.Location = new Point(-1000, 0); this.canCollapse = true; this.showFocusCues = false; this.useDefaultTabHandling = true; this.CalcAnimationHeights(); this.slideAnimationBatched = false; this.dragging = false; this.dragStart = Point.Empty; this.beginUpdateCount = 0; this.initialising = false; this.layout = false; }