Skip to content

Commit

Permalink
support of mission type recognition, the most of mission types
Browse files Browse the repository at this point in the history
  • Loading branch information
jarig committed Jan 25, 2016
1 parent 79c5b04 commit b18f0aa
Show file tree
Hide file tree
Showing 22 changed files with 139 additions and 29 deletions.
Binary file added EliteReporter/Assets/mTypes/Assassination.bmp
Binary file not shown.
Binary file added EliteReporter/Assets/mTypes/BountyKill.bmp
Binary file not shown.
Binary file added EliteReporter/Assets/mTypes/CargoTransfer.bmp
Binary file not shown.
Binary file added EliteReporter/Assets/mTypes/CourierDelivery.bmp
Binary file not shown.
Binary file added EliteReporter/Assets/mTypes/DataDelivery.bmp
Binary file not shown.
Binary file added EliteReporter/Assets/mTypes/FindAndDeliver.bmp
Binary file not shown.
Binary file not shown.
Binary file added EliteReporter/Assets/mTypes/Mining.bmp
Binary file not shown.
Binary file not shown.
Binary file added EliteReporter/Assets/mTypes/PirateCargo.bmp
Binary file not shown.
Binary file added EliteReporter/Assets/mTypes/PlanetDelivery.bmp
Binary file not shown.
Binary file added EliteReporter/Assets/mTypes/SecretCargo.bmp
Binary file not shown.
Binary file added EliteReporter/Assets/mTypes/StealAndDeliver.bmp
Binary file not shown.
Binary file not shown.
42 changes: 42 additions & 0 deletions EliteReporter/EliteReporter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,54 @@
<Content Include="Assets\3302_rus.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\Assassination.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\BountyKill.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\CargoTransfer.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\CourierDelivery.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\DataDelivery.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\FindAndDeliver.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\LostCargoDelivery.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\Mining.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\MultiStepCourierDelivery.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\PirateCargo.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\PlanetDelivery.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\reward_eng.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\reward_rus.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\SecretCargo.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\StealAndDeliver.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Assets\mTypes\TimedAssassination.bmp">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
Expand Down
40 changes: 32 additions & 8 deletions EliteReporter/Forms/EditMissionForm.Designer.cs

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

3 changes: 3 additions & 0 deletions EliteReporter/Forms/EditMissionForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public EditMissionForm(MissionInfo mInfo)
private void changeButton_Click(object sender, EventArgs e)
{
mInfo.MissionName = missionNameTextBox.Text;
mInfo.MissionType = missionTypeTextBox.Text;
try
{
mInfo.MissionTakenDateTime = DateTime.ParseExact(dateTakenTextBox.Text, "dd.MM.yyyy HH:mm", CultureInfo.InvariantCulture);
Expand Down Expand Up @@ -59,6 +60,8 @@ private void EditMissionForm_Load(object sender, EventArgs e)
dateTakenTextBox.Text = mInfo.MissionTakenDateTime.Value.ToString("dd.MM.yyyy HH:mm");
stationTakenTextBox.Text = mInfo.MissionTakenEDProfile.PortName;
systemTakenTextBox.Text = mInfo.MissionTakenEDProfile.SystemName;
if (mInfo.MissionType != null)
missionTypeTextBox.Text = mInfo.MissionType;
if (mInfo.MissionFinishedEDProfile != null)
{
stationFinishTextBox.Text = mInfo.MissionFinishedEDProfile.PortName;
Expand Down
40 changes: 24 additions & 16 deletions EliteReporter/Forms/ReportForm.Designer.cs

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

6 changes: 4 additions & 2 deletions EliteReporter/Forms/ReportForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ private void analyzeScreenShot(string pathToBmp)

if (missionListView.InvokeRequired)
{
missionListView.BeginInvoke(callback, new object []{ pathToBmp });
}
missionListView.Invoke(callback, new object []{ pathToBmp });
}
else
{
var result = analyzer.findAndAnalyzeMissionSummaryPage(pathToBmp);
Expand Down Expand Up @@ -274,6 +274,8 @@ private void fillMissionListViewItem(ListViewItem vItem, MissionInfo mInfo)
{
vItem.Text = mInfo.MissionTakenDateTime.Value.ToString("dd.MM.yyyy HH:mm");
vItem.SubItems[missionNameHeader.Index] = new ListViewItem.ListViewSubItem(vItem, mInfo.MissionName);
if (mInfo.MissionType != null)
vItem.SubItems[missionTypeHeader.Index] = new ListViewItem.ListViewSubItem(vItem, mInfo.MissionType);
vItem.SubItems[startSystemHeader.Index] = new ListViewItem.ListViewSubItem(vItem, mInfo.MissionTakenEDProfile.ToString());
vItem.SubItems[rewardHeader.Index] = new ListViewItem.ListViewSubItem(vItem, mInfo.Reward.ToString());
if (mInfo.MissionFinishedDateTime != null)
Expand Down
1 change: 1 addition & 0 deletions EliteReporter/Models/MissionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace EliteReporter.Models
public class MissionInfo
{
public string MissionName { get; set; }
public string MissionType { get; set; }
public int Reward { get; set; }

public DateTime? MissionTakenDateTime { get; set; }
Expand Down
1 change: 1 addition & 0 deletions EliteReporter/Utils/EDAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ public EDProfile getProfile()
};
} catch (Exception ex)
{
Trace.TraceInformation("Failed to get profile: " + ex.Message);
return null;
}
}
Expand Down
Loading

0 comments on commit b18f0aa

Please sign in to comment.