Skip to content

Commit

Permalink
Remove open route dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
sandermvanvliet committed Nov 21, 2023
1 parent 0a09aae commit 498eed1
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 218 deletions.
5 changes: 0 additions & 5 deletions src/RoadCaptain.App.RouteBuilder/DelegateDecorator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ public async Task ShowWhatIsNewDialog(Release release)
return await InvokeIfNeededAsync(() => _decorated.ShowSaveFileDialog(previousLocation, suggestedFileName));
}

public async Task<(PlannedRoute? PlannedRoute, string? RouteFilePath)> ShowOpenRouteDialog()
{
return await InvokeIfNeededAsync(() => _decorated.ShowOpenRouteDialog());
}

public async Task<MessageBoxResult> ShowQuestionDialog(string title, string message)
{
return await InvokeIfNeededAsync(() => _decorated.ShowQuestionDialog(title, message));
Expand Down
1 change: 0 additions & 1 deletion src/RoadCaptain.App.RouteBuilder/IWindowService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public interface IWindowService : RoadCaptain.App.Shared.IWindowService
Task<TokenResponse?> ShowLogInDialog(Window owner);
Window? GetCurrentWindow();
Task<string?> ShowSaveFileDialog(string? previousLocation, string? suggestedFileName = null);
Task<(PlannedRoute? PlannedRoute, string? RouteFilePath)> ShowOpenRouteDialog();
Task<MessageBoxResult> ShowQuestionDialog(string title, string message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,4 @@
<Folder Include="Controls\" />
<Folder Include="UseCases\" />
</ItemGroup>
<ItemGroup>
<Compile Update="Views\OpenRouteDialog.axaml.cs">
<DependentUpon>OpenRouteDialog.axaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
</Project>
116 changes: 0 additions & 116 deletions src/RoadCaptain.App.RouteBuilder/Views/OpenRouteDialog.axaml

This file was deleted.

71 changes: 0 additions & 71 deletions src/RoadCaptain.App.RouteBuilder/Views/OpenRouteDialog.axaml.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Linq;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using RoadCaptain.App.RouteBuilder.ViewModels;
Expand Down
18 changes: 0 additions & 18 deletions src/RoadCaptain.App.RouteBuilder/WindowService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,24 +160,6 @@ public async Task ShowSaveRouteDialog(string? lastUsedFolder, RouteViewModel rou
await saveRouteDialog.ShowDialog(CurrentWindow);
}

public async Task<(PlannedRoute? PlannedRoute, string? RouteFilePath)> ShowOpenRouteDialog()
{
var openRouteDialog = Resolve<OpenRouteDialog>();

var viewModel = new OpenRouteDialogViewModel(
this,
Resolve<IUserPreferences>(),
Resolve<IRouteStore>());

openRouteDialog.DataContext = viewModel;

await openRouteDialog.ShowDialog(CurrentWindow);

return openRouteDialog.DialogResult == DialogResult.Ok
? (viewModel.SelectedRoute?.PlannedRoute, viewModel.RouteFilePath)
: (null, null);
}

public async Task<MessageBoxResult> ShowQuestionDialog(string title, string message)
{
return await MessageBox.ShowAsync(
Expand Down

0 comments on commit 498eed1

Please sign in to comment.