Major GUI update. Switch to Tabbed GUI

This commit is contained in:
Anton Kasyanov
2017-05-25 22:08:39 +03:00
parent 38bd46ca3a
commit b4cf26635e
3 changed files with 550 additions and 290 deletions

View File

@@ -339,6 +339,31 @@ namespace EveOPreview.UI
public Action ForumUrlLinkActivated { get; set; }
#region UI events
private void ContentTabControl_DrawItem(object sender, DrawItemEventArgs e)
{
TabControl control = (TabControl)sender;
TabPage page = control.TabPages[e.Index];
Rectangle bounds = control.GetTabRect(e.Index);
Graphics graphics = e.Graphics;
Brush textBrush = new SolidBrush(SystemColors.ActiveCaptionText);
Brush backgroundBrush = (e.State == DrawItemState.Selected)
? new SolidBrush(SystemColors.Control)
: new SolidBrush(SystemColors.ControlDark);
graphics.FillRectangle(backgroundBrush, e.Bounds);
// Use our own font
Font font = new Font("Arial", this.Font.Size * 1.2f, FontStyle.Bold, GraphicsUnit.Pixel);
// Draw string and center the text
StringFormat stringFlags = new StringFormat();
stringFlags.Alignment = StringAlignment.Center;
stringFlags.LineAlignment = StringAlignment.Center;
graphics.DrawString(page.Text, font, textBrush, bounds, stringFlags);
}
private void OptionChanged_Handler(object sender, EventArgs e)
{
if (this._suppressEvents)