Skip to content

Commit

Permalink
Prepare 4.0.8 release.
Browse files Browse the repository at this point in the history
- Block all corporation data querying if character appears to be in an NPC corp to suppress spurious warnings
  • Loading branch information
peterhaneve committed Sep 15, 2018
1 parent fe75d80 commit a46b476
Show file tree
Hide file tree
Showing 16 changed files with 154 additions and 154 deletions.
6 changes: 3 additions & 3 deletions SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("4.0.7.0")]
[assembly: AssemblyFileVersion("4.0.7.4842")]
[assembly: AssemblyInformationalVersion("4.0.7")]
[assembly: AssemblyVersion("4.0.8.0")]
[assembly: AssemblyFileVersion("4.0.8.4849")]
[assembly: AssemblyInformationalVersion("4.0.8")]

// Neutral Language
[assembly: NeutralResourcesLanguage("en-US")]
6 changes: 3 additions & 3 deletions SharedAssemblyInfo.template.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("4.0.7.0")]
[assembly: AssemblyFileVersion("4.0.7.$REVNUM$")]
[assembly: AssemblyInformationalVersion("4.0.7")]
[assembly: AssemblyVersion("4.0.8.0")]
[assembly: AssemblyFileVersion("4.0.8.$REVNUM$")]
[assembly: AssemblyInformationalVersion("4.0.8")]

// Neutral Language
[assembly: NeutralResourcesLanguage("en-US")]
2 changes: 1 addition & 1 deletion src/EVEMon.Common/EVEMon.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NO_THREAD_SAFETY</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand Down
14 changes: 7 additions & 7 deletions src/EVEMon.Common/Models/CCPCharacter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -732,10 +732,10 @@ private void ResetLastAPIUpdates(IEnumerable<SerializableAPIUpdate> lastUpdates)
private void EveMonClient_TimerTick(object sender, EventArgs e)
{
// Force update a monitor if the last update exceed the current datetime
foreach (IQueryMonitorEx monitor in QueryMonitors.Where(
monitor => !monitor.IsUpdating && monitor.LastUpdate > DateTime.UtcNow).Cast<IQueryMonitorEx>())
foreach (var monitor in QueryMonitors.Where(monitor => !monitor.IsUpdating &&
monitor.LastUpdate > DateTime.UtcNow))
{
monitor.ForceUpdate(true);
(monitor as IQueryMonitorEx)?.ForceUpdate(true);
}
}

Expand All @@ -755,15 +755,15 @@ private void EveMonClient_ESIKeyInfoUpdated(object sender, EventArgs e)
if (m_characterDataQuerying == null && Identity.ESIKeys.Any())
{
m_characterDataQuerying = new CharacterDataQuerying(this);
ResetLastAPIUpdates(m_lastAPIUpdates.Where(lastUpdate => Enum.IsDefined(typeof(ESIAPICharacterMethods),
lastUpdate.Method)));
ResetLastAPIUpdates(m_lastAPIUpdates.Where(lastUpdate => Enum.IsDefined(
typeof(ESIAPICharacterMethods), lastUpdate.Method)));
}

if (m_corporationDataQuerying == null && Identity.ESIKeys.Any())
{
m_corporationDataQuerying = new CorporationDataQuerying(this);
ResetLastAPIUpdates(m_lastAPIUpdates.Where(lastUpdate => Enum.IsDefined(typeof(ESIAPICorporationMethods),
lastUpdate.Method)));
ResetLastAPIUpdates(m_lastAPIUpdates.Where(lastUpdate => Enum.IsDefined(
typeof(ESIAPICorporationMethods), lastUpdate.Method)));
}
}

Expand Down
1 change: 0 additions & 1 deletion src/EVEMon.Common/Models/Character.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
using EVEMon.Common.SettingsObjects;
using EVEMon.Common.Serialization.Esi;
using EVEMon.Common.Service;
using System.Globalization;
using EVEMon.Common.Helpers;

namespace EVEMon.Common.Models
Expand Down
2 changes: 1 addition & 1 deletion src/EVEMon.Common/QueryMonitor/CorporationQueryMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public override bool HasAccess
{
m_apiKey = m_character.Identity.FindAPIKeyWithAccess((ESIAPICorporationMethods)
Method);
return m_apiKey != null;
return !m_character.IsInNPCCorporation && m_apiKey != null;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/EVEMon.LogitechG15/EVEMon.LogitechG15.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<OutputPath>bin\Release\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand Down
2 changes: 1 addition & 1 deletion src/EVEMon.PieChart/EVEMon.PieChart.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand Down
4 changes: 2 additions & 2 deletions src/EVEMon.Watchdog/EVEMon.Watchdog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugSymbols>false</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<DebugType>full</DebugType>
<DebugType>none</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand Down
2 changes: 1 addition & 1 deletion src/EVEMon.WindowsApi/EVEMon.WindowsApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand Down
16 changes: 8 additions & 8 deletions src/EVEMon/Controls/OverviewItem.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 37 additions & 37 deletions src/EVEMon/Controls/OverviewItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,8 @@ internal void UpdateOnSettingsChanged()
{
TrayPopupSettings trayPopupSettings = Settings.UI.SystemTrayPopup;
MainWindowSettings mainWindowSettings = Settings.UI.MainWindow;
PortraitSizes portraitSize = m_isTooltip
? trayPopupSettings.PortraitSize
: mainWindowSettings.OverviewItemSize;
PortraitSizes portraitSize = m_isTooltip ? trayPopupSettings.PortraitSize :
mainWindowSettings.OverviewItemSize;

// Misc fields
m_portraitSize = portraitSize.GetDefaultValue();
Expand Down Expand Up @@ -297,11 +296,9 @@ internal void UpdateOnSettingsChanged()
/// </summary>
private void UpdateContrastColor()
{
m_settingsForeColor =
(m_isTooltip && Settings.UI.SystemTrayPopup.UseIncreasedContrast)
|| (!m_isTooltip && Settings.UI.MainWindow.UseIncreasedContrastOnOverview)
? Color.Black
: Color.DimGray;
m_settingsForeColor = (m_isTooltip && Settings.UI.SystemTrayPopup.
UseIncreasedContrast) || (!m_isTooltip && Settings.UI.MainWindow.
UseIncreasedContrastOnOverview) ? Color.Black : Color.DimGray;

lblBalance.ForeColor = m_settingsForeColor;
lblTotalSkillPoints.ForeColor = m_settingsForeColor;
Expand Down Expand Up @@ -370,7 +367,14 @@ private void UpdateContent()
m_hasRemainingTime = false;
m_hasSkillQueueTrainingTime = false;
}

// Determine the character's system location
int locID = Character?.LastKnownLocation?.SolarSystemID ?? 0;
string locText;
if (locID == 0)
locText = EveMonConstants.UnknownText + " Location";
else
locText = StaticGeography.GetSolarSystemName(locID);
lblLocation.Text = locText;
// Adjusts all the controls layout
PerformCustomLayout(m_isTooltip);
}
Expand All @@ -383,18 +387,20 @@ private void FormatBalance()
lblBalance.Text = $"{Character.Balance:N} ISK";

CCPCharacter ccpCharacter = Character as CCPCharacter;

if (ccpCharacter == null)
return;

IQueryMonitor marketMonitor = ccpCharacter.QueryMonitors[ESIAPICharacterMethods.MarketOrders];
if (!Settings.UI.SafeForWork && !ccpCharacter.HasSufficientBalance && marketMonitor != null && marketMonitor.Enabled)
Color balanceColor = m_settingsForeColor;
if (ccpCharacter != null && !Settings.UI.SafeForWork)
{
lblBalance.ForeColor = Color.Orange;
return;
IQueryMonitor marketMonitor = ccpCharacter.QueryMonitors[
ESIAPICharacterMethods.MarketOrders];
// Orange if orders could fail on margin
if (!ccpCharacter.HasSufficientBalance && marketMonitor != null &&
marketMonitor.Enabled)
balanceColor = Color.Orange;
else if (ccpCharacter.Balance < 0)
// Red if negative wallet
balanceColor = Color.Red;
}

lblBalance.ForeColor = !Settings.UI.SafeForWork && ccpCharacter.Balance < 0 ? Color.Red : m_settingsForeColor;
lblBalance.ForeColor = balanceColor;
}

/// <summary>
Expand All @@ -406,7 +412,8 @@ private void UpdateVisibilities()
lblRemainingTime.Visible = m_hasRemainingTime && m_showRemainingTime;
lblCompletionTime.Visible = m_hasCompletionTime && m_showCompletionTime;
lblSkillInTraining.Visible = m_hasSkillInTraining && m_showSkillInTraining;
lblSkillQueueTrainingTime.Visible = m_hasSkillQueueTrainingTime && m_showSkillQueueTrainingTime;
lblSkillQueueTrainingTime.Visible = m_hasSkillQueueTrainingTime &&
m_showSkillQueueTrainingTime;
lblBalance.Visible = m_showWalletBalance;
lblTotalSkillPoints.Visible = m_showSkillpoints;
lblLocation.Visible = m_showLocation;
Expand All @@ -419,10 +426,9 @@ private void UpdateTrainingTime()
{
if (!Visible || !Character.IsTraining)
return;

TimeSpan remainingTime = Character.CurrentlyTrainingSkill.RemainingTime;
lblRemainingTime.Text = remainingTime.ToDescriptiveText(DescriptiveTextOptions.IncludeCommas);

lblRemainingTime.Text = remainingTime.ToDescriptiveText(DescriptiveTextOptions.
IncludeCommas);
UpdateSkillQueueTrainingTime();
}

Expand All @@ -433,17 +439,8 @@ private void UpdateTrainingTime()
private void UpdateSkillQueueTrainingTime()
{
CCPCharacter ccpCharacter = Character as CCPCharacter;

lblSkillQueueTrainingTime.ForeColor = m_settingsForeColor;
// Determine the character's system location
int locID = Character?.LastKnownLocation?.SolarSystemID ?? 0;
string text = string.Empty, locText;
if (locID == 0)
locText = EveMonConstants.UnknownText + " Location";
else
locText = StaticGeography.GetSolarSystemName(locID);
lblLocation.Text = locText;

string text = string.Empty;
// Current character isn't a CCP character, so can't have a Queue
if (ccpCharacter != null && !ccpCharacter.SkillQueue.IsPaused)
{
Expand Down Expand Up @@ -706,16 +703,19 @@ private void PerformCustomLayout(bool tooltip)
if (lblLocation.Visible)
{
// Below portrait if used, else below last text
size = GetSizeForLabel(lblLocation, m_regularFontSize, showPortrait ? margin :
left, showPortrait ? (margin + portraitSize) : top, rightPad, labelWidth,
smallLabelHeight);
smallLabelHeight = size.Height;
// Add to correct side of the view
if (showPortrait)
{
lblLocation.Location = new Point(margin, margin + portraitSize);
lh += smallLabelHeight;
// Avoid overlapping text
lblLocation.Width = Math.Min(lblLocation.Width, portraitSize);
}
else
{
lblLocation.Location = new Point(left, top);
top += smallLabelHeight;
}
}
Width = m_preferredWidth = left + labelWidth + margin;
Height = m_preferredHeight = margin + (showPortrait ? Math.Max(top, lh + margin) :
Expand Down
2 changes: 1 addition & 1 deletion src/EVEMon/EVEMon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<DebugType>none</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand Down
Loading

0 comments on commit a46b476

Please sign in to comment.