Skip to content

Commit

Permalink
Small fixes (#488)
Browse files Browse the repository at this point in the history
Fix copy folder picker
Fix metrics
Closes #487
Closes #474
  • Loading branch information
AlexMacocian authored Nov 19, 2023
1 parent e1dfd1f commit 0ba0e64
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Daybreak/Daybreak.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<LangVersion>preview</LangVersion>
<ApplicationIcon>Daybreak.ico</ApplicationIcon>
<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>
<Version>0.9.8.150</Version>
<Version>0.9.8.151</Version>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<UserSecretsId>cfb2a489-db80-448d-a969-80270f314c46</UserSecretsId>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
Expand Down
4 changes: 2 additions & 2 deletions Daybreak/Services/Charts/LiveChartInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ public void OnStartup()
.AddLightTheme()
.HasMap<Metric>((metric, index) =>
{
return new Coordinate(Convert.ToDouble(metric.Measurement), metric.Timestamp.Ticks);
return new Coordinate(metric.Timestamp.Ticks, Convert.ToDouble(metric.Measurement));
})
.HasMap<TraderQuote>((quote, point) =>
{
return new Coordinate(((double)quote.Price) / 20d, quote.Timestamp?.Ticks ?? 0);
return new Coordinate(quote.Timestamp?.Ticks ?? 0, ((double)quote.Price) / 20d);
}));
}
}
3 changes: 1 addition & 2 deletions Daybreak/Services/Guildwars/GuildwarsCopyService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public sealed class GuildwarsCopyService : IGuildwarsCopyService

private static readonly string[] FilesToCopy =
{
"d3d9.dll",
"Gw.dat",
"Gw.exe",
"GwLoginClient.dll"
Expand Down Expand Up @@ -117,7 +116,7 @@ private static bool TryGetDestinationPath(out string path)
UseDescriptionForTitle = true
};

var result = folderPicker.ShowDialog(new Win32Window(Launcher.Instance.MainWindow));
var result = folderPicker.ShowDialog();
if (result is DialogResult.Abort or DialogResult.Cancel or DialogResult.No)
{
return false;
Expand Down
1 change: 1 addition & 0 deletions Daybreak/Views/Copy/GuildwarsCopyView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
FontSize="16" Margin="10" Width="50" Height="25" Clicked="HighlightButton_Clicked" Foreground="{StaticResource MahApps.Brushes.ThemeForeground}"
HighlightColor="{StaticResource MahApps.Brushes.Accent}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
BorderBrush="{StaticResource MahApps.Brushes.ThemeForeground}"
Visibility="{Binding ElementName=_this, Path=ContinueButtonEnabled, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"
BorderThickness="1"
ToolTip="Continue"/>
</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion Daybreak/Views/GuildwarsDownloadView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private async void DownloadView_Loaded(object sender, RoutedEventArgs e)
UseDescriptionForTitle = true
};

var result = folderPicker.ShowDialog(new Win32Window(Launcher.Instance.MainWindow));
var result = folderPicker.ShowDialog();
if (result is DialogResult.Abort or DialogResult.Cancel or DialogResult.No)
{
this.installationStatus.CurrentStep = DownloadStatus.DownloadCancelled;
Expand Down

0 comments on commit 0ba0e64

Please sign in to comment.