Skip to content

Commit

Permalink
2.28.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Sushilov authored and Vitaly Sushilov committed Feb 24, 2019
1 parent 428f679 commit ec6b605
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 64 deletions.
2 changes: 1 addition & 1 deletion Client/EvaJima/Configurations/EveJima.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Production: EVE -
# Tests: Form1
-->
<add key="EveOnlineTitle" value="Form1" />
<add key="EveOnlineTitle" value="EVE -" />


<!-- Application size -->
Expand Down
118 changes: 55 additions & 63 deletions Client/EvaJimaCore/Main/EveJimaTitlebar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public partial class EveJimaTitlebar : UserControl
public event Action OnCloseApplication;
public event Action OnHideToTray;

private string lastUserLocationUpdate = string.Empty;

public EveJimaTitlebar()
{
InitializeComponent();
Expand Down Expand Up @@ -115,96 +113,90 @@ private void Event_RedrawCurrentLocationInfo(object sender, PaintEventArgs e)

// From here only Runtime code

if (Global.Pilots.Selected != null)
{

if (lastUserLocationUpdate == Global.Pilots.Selected.Name) return;

lastUserLocationUpdate = Global.Pilots.Selected.Name;
if (Global.Pilots.Selected == null) return;

var textPositionTop = 8;
var textPositionTop = 8;

var location = Global.Pilots.Selected.Location;
var systemLabel = location.Name;
var location = Global.Pilots.Selected.Location;
var systemLabel = location.Name;

if (location.Name == "unknown") return;
if (location.Name == "unknown") return;

if (Common.IsWSpaceSystem(location.Name))
if (Common.IsWSpaceSystem(location.Name))
{
if (location.Class != null)
{
if (location.Class != null)
{
systemLabel = systemLabel + "[C" + location.Class + "]";
}
else
{
systemLabel = systemLabel + "[Shattered]";
}
systemLabel = systemLabel + "[C" + location.Class + "]";
}

var drawFont = new Font("Verdana", 7, FontStyle.Bold);
var drawBrushName = new SolidBrush(Common.GetColorBySolarSystem(location.Security.ToString()));

if (Common.IsWSpaceSystem(location.Name))
else
{
drawBrushName = new SolidBrush(Common.GetColorBySolarSystem("C" + location.Class));
systemLabel = systemLabel + "[Shattered]";
}
}

if (Global.ApplicationSettings.IsUseWhiteColorForSystems)
{
drawBrushName = new SolidBrush(Color.AliceBlue);
}
var drawFont = new Font("Verdana", 7, FontStyle.Bold);
var drawBrushName = new SolidBrush(Common.GetColorBySolarSystem(location.Security.ToString()));

var stringSize = e.Graphics.MeasureString(systemLabel, drawFont);
if (Common.IsWSpaceSystem(location.Name))
{
drawBrushName = new SolidBrush(Common.GetColorBySolarSystem("C" + location.Class));
}

var drawFormat = new StringFormat();
if (Global.ApplicationSettings.IsUseWhiteColorForSystems)
{
drawBrushName = new SolidBrush(Color.AliceBlue);
}

e.Graphics.DrawString(systemLabel, drawFont, drawBrushName, 30, textPositionTop, drawFormat);
var stringSize = e.Graphics.MeasureString(systemLabel, drawFont);

var allTitleText = systemLabel;
var drawFormat = new StringFormat();

if (Common.IsWSpaceSystem(location.Name))
{
var txtSolarSystemStaticFirst = "";
e.Graphics.DrawString(systemLabel, drawFont, drawBrushName, 30, textPositionTop, drawFormat);

if (string.IsNullOrEmpty(location.Static) == false)
{
var wormholeFirst = Global.Space.WormholeTypes[location.Static.Trim()];
var allTitleText = systemLabel;

txtSolarSystemStaticFirst = wormholeFirst.Name + "[" + wormholeFirst.LeadsTo + "]";
if (Common.IsWSpaceSystem(location.Name))
{
var txtSolarSystemStaticFirst = "";

drawBrushName = new SolidBrush(Common.GetColorBySolarSystem(wormholeFirst.LeadsTo));
if (string.IsNullOrEmpty(location.Static) == false)
{
var wormholeFirst = Global.Space.WormholeTypes[location.Static.Trim()];

if (Global.ApplicationSettings.IsUseWhiteColorForSystems)
{
drawBrushName = new SolidBrush(Color.AliceBlue);
}
txtSolarSystemStaticFirst = wormholeFirst.Name + "[" + wormholeFirst.LeadsTo + "]";

e.Graphics.DrawString(txtSolarSystemStaticFirst, drawFont, drawBrushName, 30 + stringSize.Width + 1, textPositionTop, drawFormat);
drawBrushName = new SolidBrush(Common.GetColorBySolarSystem(wormholeFirst.LeadsTo));

allTitleText = systemLabel + " " + txtSolarSystemStaticFirst;
if (Global.ApplicationSettings.IsUseWhiteColorForSystems)
{
drawBrushName = new SolidBrush(Color.AliceBlue);
}

var stringSizeStaticI = e.Graphics.MeasureString(txtSolarSystemStaticFirst, drawFont);
e.Graphics.DrawString(txtSolarSystemStaticFirst, drawFont, drawBrushName, 30 + stringSize.Width + 1, textPositionTop, drawFormat);

if (string.IsNullOrEmpty(location.Static2) == false)
{
var txtSolarSystemSecondStatic = "";
var wormholeSecond = Global.Space.WormholeTypes[location.Static2.Trim()];
allTitleText = systemLabel + " " + txtSolarSystemStaticFirst;
}

txtSolarSystemSecondStatic = wormholeSecond.Name + "[" + wormholeSecond.LeadsTo + "]";
var stringSizeStaticI = e.Graphics.MeasureString(txtSolarSystemStaticFirst, drawFont);

drawBrushName = new SolidBrush(Common.GetColorBySolarSystem(wormholeSecond.LeadsTo));
if (string.IsNullOrEmpty(location.Static2) == false)
{
var txtSolarSystemSecondStatic = "";
var wormholeSecond = Global.Space.WormholeTypes[location.Static2.Trim()];

if (Global.ApplicationSettings.IsUseWhiteColorForSystems)
{
drawBrushName = new SolidBrush(Color.AliceBlue);
}
txtSolarSystemSecondStatic = wormholeSecond.Name + "[" + wormholeSecond.LeadsTo + "]";

e.Graphics.DrawString(txtSolarSystemSecondStatic, drawFont, drawBrushName,
30 + stringSize.Width + 1 + stringSizeStaticI.Width + 3, textPositionTop, drawFormat);
drawBrushName = new SolidBrush(Common.GetColorBySolarSystem(wormholeSecond.LeadsTo));

allTitleText = systemLabel + " " + txtSolarSystemSecondStatic;
if (Global.ApplicationSettings.IsUseWhiteColorForSystems)
{
drawBrushName = new SolidBrush(Color.AliceBlue);
}

e.Graphics.DrawString(txtSolarSystemSecondStatic, drawFont, drawBrushName,
30 + stringSize.Width + 1 + stringSizeStaticI.Width + 3, textPositionTop, drawFormat);

allTitleText = systemLabel + " " + txtSolarSystemSecondStatic;
}
}
}
Expand Down

0 comments on commit ec6b605

Please sign in to comment.