diff --git a/src/EVEMon/Controls/OverviewItem.Designer.cs b/src/EVEMon/Controls/OverviewItem.Designer.cs index 4ea9f2a23..9125ae01d 100644 --- a/src/EVEMon/Controls/OverviewItem.Designer.cs +++ b/src/EVEMon/Controls/OverviewItem.Designer.cs @@ -37,6 +37,7 @@ private void InitializeComponent() this.lblSkillInTraining = new EVEMon.Controls.OverviewLabel(); this.lblRemainingTime = new EVEMon.Controls.OverviewLabel(); this.lblBalance = new EVEMon.Controls.OverviewLabel(); + this.lblBoosterDuration = new EVEMon.Controls.OverviewLabel(); this.SuspendLayout(); // // pbCharacterPortrait @@ -61,14 +62,14 @@ private void InitializeComponent() this.lblTotalSkillPoints.TabIndex = 4; this.lblTotalSkillPoints.Text = "100,000,000 SP"; // - // lblLocation + // lblExtraInfo // this.lblExtraInfo.AutoEllipsis = true; this.lblExtraInfo.BackColor = System.Drawing.Color.Transparent; this.lblExtraInfo.Enabled = false; this.lblExtraInfo.ForeColor = System.Drawing.Color.DimGray; this.lblExtraInfo.Location = new System.Drawing.Point(9, 101); - this.lblExtraInfo.Name = "lblLocation"; + this.lblExtraInfo.Name = "lblExtraInfo"; this.lblExtraInfo.Size = new System.Drawing.Size(92, 13); this.lblExtraInfo.TabIndex = 1; this.lblExtraInfo.Text = "Egghelende"; @@ -145,10 +146,24 @@ private void InitializeComponent() this.lblBalance.TabIndex = 3; this.lblBalance.Text = "124,534,125,453.02 ISK"; // + // lblBoosterDuration + // + this.lblBoosterDuration.AutoEllipsis = true; + this.lblBoosterDuration.BackColor = System.Drawing.Color.Transparent; + this.lblBoosterDuration.Enabled = false; + this.lblBoosterDuration.ForeColor = System.Drawing.Color.DimGray; + this.lblBoosterDuration.Location = new System.Drawing.Point(107, 114); + this.lblBoosterDuration.Name = "lblBoosterDuration"; + this.lblBoosterDuration.Size = new System.Drawing.Size(215, 13); + this.lblBoosterDuration.TabIndex = 9; + this.lblBoosterDuration.Text = "No active booster"; + this.lblBoosterDuration.Visible = false; + // // OverviewItem // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lblBoosterDuration); this.Controls.Add(this.lblTotalSkillPoints); this.Controls.Add(this.lblExtraInfo); this.Controls.Add(this.lblSkillQueueTrainingTime); @@ -160,7 +175,7 @@ private void InitializeComponent() this.Controls.Add(this.pbCharacterPortrait); this.ForeColor = System.Drawing.SystemColors.ControlText; this.Name = "OverviewItem"; - this.Size = new System.Drawing.Size(330, 120); + this.Size = new System.Drawing.Size(330, 132); this.ResumeLayout(false); } @@ -176,5 +191,6 @@ private void InitializeComponent() private OverviewLabel lblCompletionTime; private OverviewLabel lblSkillQueueTrainingTime; private OverviewLabel lblExtraInfo; + private OverviewLabel lblBoosterDuration; } } \ No newline at end of file diff --git a/src/EVEMon/Controls/OverviewItem.cs b/src/EVEMon/Controls/OverviewItem.cs index 2b1a2b89f..7499dee85 100644 --- a/src/EVEMon/Controls/OverviewItem.cs +++ b/src/EVEMon/Controls/OverviewItem.cs @@ -127,6 +127,7 @@ protected override void OnLoad(EventArgs e) lblCompletionTime.Font = FontFactory.GetFont("Tahoma", m_regularFontSize); lblSkillQueueTrainingTime.Font = FontFactory.GetFont("Tahoma", m_regularFontSize); lblExtraInfo.Font = FontFactory.GetFont("Tahoma", m_regularFontSize); + lblBoosterDuration.Font = FontFactory.GetFont("Tahoma", m_regularFontSize); // Initializes the portrait pbCharacterPortrait.Hide(); @@ -318,6 +319,7 @@ private void UpdateContrastColor() lblRemainingTime.ForeColor = m_settingsForeColor; lblSkillInTraining.ForeColor = m_settingsForeColor; lblCompletionTime.ForeColor = m_settingsForeColor; + lblBoosterDuration.ForeColor = m_settingsForeColor; } /// @@ -380,6 +382,20 @@ private void UpdateContent() m_hasRemainingTime = false; m_hasSkillQueueTrainingTime = false; } + + var boosterDuration = ccpCharacter.SkillQueue.BoosterDuration; + + if (boosterDuration > TimeSpan.Zero) + { + lblBoosterDuration.Visible = true; + lblBoosterDuration.Text = string.Format("Booster Duration: ~{0}:{1}", (int)boosterDuration.TotalHours, boosterDuration.ToString("mm")); + } + else + { + lblBoosterDuration.Visible = false; + lblBoosterDuration.Text = "No active booster"; + } + UpdateExtraData(); // Adjusts all the controls layout PerformCustomLayout(m_isTooltip); @@ -800,6 +816,14 @@ private void PerformCustomLayout(bool tooltip) else top += smallLabelHeight; } + if (lblBoosterDuration.Visible) + { + size = GetSizeForLabel(lblBoosterDuration, m_regularFontSize, left, top, + rightPad, labelWidth, smallLabelHeight); + labelWidth = size.Width; + smallLabelHeight = size.Height; + top += smallLabelHeight; + } Width = m_preferredWidth = left + labelWidth + margin; Height = m_preferredHeight = margin + (showPortrait ? Math.Max(top, lh + margin) : top);