Skip to content

Commit

Permalink
Removed the totals and perentages from the tally display.
Browse files Browse the repository at this point in the history
Fixed the export of the guardian data
Updated version numbers
  • Loading branch information
SteveMaier-IRT committed Sep 12, 2023
1 parent 8b5d308 commit 28f67a1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
Grid.Column="2"
FontAttributes="Bold"
Text="{helper:Translate VotesText}" />
<Label
<!--<Label
Grid.Column="3"
FontAttributes="Bold"
Text="{helper:Translate PercentText}" />
Text="{helper:Translate PercentText}" />-->
</Grid>
<Line
BackgroundColor="{StaticResource Gray950}"
Expand Down Expand Up @@ -70,11 +70,11 @@
Grid.Column="2"
Margin="10"
Text="{Binding Votes}" />
<Label
<!--<Label
Grid.Column="3"
Margin="10"
Text="{Binding Percent, StringFormat='{0:F1}'}"
VerticalOptions="End" />
VerticalOptions="End" />-->
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
Expand All @@ -83,7 +83,7 @@
Grid.Row="3"
BackgroundColor="{StaticResource Gray400}"
ColumnDefinitions="4*, 2*, *, *">
<Label
<!--<Label
Grid.Column="0"
Margin="10"
FontAttributes="Bold,Italic"
Expand All @@ -97,7 +97,7 @@
Grid.Column="3"
Margin="10"
FontAttributes="Bold"
Text="100.0%" />
Text="100.0%" />-->
</Grid>
</Grid>
</ContentView>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<ApplicationIdGuid>c0679a79-bc22-46ad-9c49-93de983e3fa2</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.90.0</ApplicationDisplayVersion>
<ApplicationDisplayVersion>1.90.2.1</ApplicationDisplayVersion>
<ApplicationVersion>2</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.3</SupportedOSPlatformVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System.IO.Compression;
using System.Text.Json;
using MongoDB.Driver;

using Newtonsoft.Json;

namespace ElectionGuard.UI.Helpers;

public static class ElectionRecordGenerator
Expand Down Expand Up @@ -67,7 +68,7 @@ private static async Task ExportGuardiansAsync(string guardianFolder, string key
var guardians = await guardianPublicKeyService.GetAllByKeyCeremonyIdAsync(keyCeremonyId);
foreach (var guardian in guardians)
{
await File.WriteAllTextAsync(Path.Combine(guardianFolder, $"{GUARDIAN_PREFIX}{guardian.GuardianId}.json"), JsonSerializer.Serialize(guardian.PublicKey));
await File.WriteAllTextAsync(Path.Combine(guardianFolder, $"{GUARDIAN_PREFIX}{guardian.GuardianId}.json"), JsonConvert.SerializeObject(guardian.PublicKey));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">

<Identity Name="ElectionGuard.Admin" Publisher="CN=Microsoft" Version="0.0.0.0" />
<Identity Name="ElectionGuard.Admin" Publisher="CN=Microsoft" Version="1.90.2.1" />

<mp:PhoneIdentity PhoneProductId="F7E69798-9268-43DC-A51E-3A95FA4992AD" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ private void GenerateContestData()
var percent = (float)writeInTotal / (contest.VotesAllowed * (ulong)Tally.CastBallotCount) * 100;
contestItem.Selections.Add(new() { Name = "Write-ins", Party = string.Empty, Votes = writeInTotal, Percent = percent });
}
underVoteTotal = (contest.VotesAllowed * (ulong)Tally.CastBallotCount) - totalVotes;
var underPercent = (float)underVoteTotal / (contest.VotesAllowed * (ulong)Tally.CastBallotCount) * 100;
contestItem.Selections.Add(new() { Name = "Undervotes", Party = string.Empty, Votes = underVoteTotal, Percent = underPercent });
var overPercent = (float)overVoteTotal / (contest.VotesAllowed * (ulong)Tally.CastBallotCount) * 100;
contestItem.Selections.Add(new() { Name = "Overvotes", Party = string.Empty, Votes = overVoteTotal, Percent = overPercent });
//underVoteTotal = (contest.VotesAllowed * (ulong)Tally.CastBallotCount) - totalVotes;
//var underPercent = (float)underVoteTotal / (contest.VotesAllowed * (ulong)Tally.CastBallotCount) * 100;
//contestItem.Selections.Add(new() { Name = "Undervotes", Party = string.Empty, Votes = underVoteTotal, Percent = underPercent });
//var overPercent = (float)overVoteTotal / (contest.VotesAllowed * (ulong)Tally.CastBallotCount) * 100;
//contestItem.Selections.Add(new() { Name = "Overvotes", Party = string.Empty, Votes = overVoteTotal, Percent = overPercent });

Contests.Add(contestItem);
}
Expand Down

0 comments on commit 28f67a1

Please sign in to comment.