Skip to content

Commit

Permalink
Cleaned legacy league overview
Browse files Browse the repository at this point in the history
  • Loading branch information
leMicin committed Feb 16, 2020
1 parent de5ffac commit cc39354
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 2,591 deletions.
7 changes: 3 additions & 4 deletions src/Sidekick.Localization/Sidekick.Localization.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
<AutoGen>True</AutoGen>
</Compile>
<Compile Update="Leagues\Incursion\IncursionResources.Designer.cs">
<DependentUpon>IncursionResources.resx</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>IncursionResources.resx</DependentUpon>
</Compile>
<Compile Update="Leagues\LeagueResources.Designer.cs">
<DependentUpon>LeagueResources.resx</DependentUpon>
Expand Down Expand Up @@ -96,13 +96,12 @@
</EmbeddedResource>
<EmbeddedResource Update="Leagues\Incursion\IncursionResources.zh-tw.resx">
<SubType>Designer</SubType>
<LastGenOutput>IncursionResources.Designer.cs</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator>
<Generator></Generator>
</EmbeddedResource>
<EmbeddedResource Update="Leagues\Incursion\IncursionResources.resx">
<SubType>Designer</SubType>
<LastGenOutput>IncursionResources.Designer.cs</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>IncursionResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Leagues\LeagueResources.zh-tw.resx">
<LastGenOutput>LeagueResources.Designer.cs</LastGenOutput>
Expand Down
1 change: 0 additions & 1 deletion src/Sidekick/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
x:Class="Sidekick.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI"
xmlns:converters="clr-namespace:Sidekick.Windows.PriceCheck.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down
6 changes: 0 additions & 6 deletions src/Sidekick/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Sidekick.Core.Update;
using Sidekick.Helpers.Input;
using Sidekick.UI.Views;
using Sidekick.Windows.LeagueOverlay;
using Sidekick.Windows.Prediction;
using Sidekick.Windows.PriceCheck;

Expand All @@ -27,7 +26,6 @@ public partial class App : Application
private ServiceProvider serviceProvider;
private OverlayController overlayController;
private PredictionController predictionController;
private LeagueOverlayController leagueOverlayController;
private EventsHandler eventsHandler;
private INativeProcess nativeProcess;
private INativeBrowser nativeBrowser;
Expand Down Expand Up @@ -67,9 +65,6 @@ protected override async void OnStartup(StartupEventArgs e)
// Overlay.
overlayController = serviceProvider.GetRequiredService<OverlayController>();

// League Overlay
leagueOverlayController = serviceProvider.GetRequiredService<LeagueOverlayController>();

// Price Prediction
predictionController = serviceProvider.GetRequiredService<PredictionController>();
}
Expand Down Expand Up @@ -116,7 +111,6 @@ protected override void OnExit(ExitEventArgs e)
serviceProvider.Dispose();
eventsHandler.Dispose();
overlayController.Dispose();
leagueOverlayController.Dispose();
predictionController.Dispose();
base.OnExit(e);
}
Expand Down
18 changes: 15 additions & 3 deletions src/Sidekick/Helpers/Input/EventsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
using Sidekick.Business.Whispers;
using Sidekick.Core.Loggers;
using Sidekick.Core.Natives;
using Sidekick.UI.Views;
using Sidekick.Windows.Leagues;

namespace Sidekick.Helpers.Input
{
public class EventsHandler: IDisposable
public class EventsHandler : IDisposable
{
private readonly IKeybindEvents events;
private readonly IWhisperService whisperService;
Expand All @@ -19,6 +21,7 @@ public class EventsHandler: IDisposable
private readonly ILogger logger;
private readonly ITradeClient tradeClient;
private readonly IWikiProvider wikiProvider;
private readonly IViewLocator viewLocator;

public EventsHandler(
IKeybindEvents events,
Expand All @@ -28,7 +31,8 @@ public EventsHandler(
IItemParser itemParser,
ILogger logger,
ITradeClient tradeClient,
IWikiProvider wikiProvider)
IWikiProvider wikiProvider,
IViewLocator viewLocator)
{
this.events = events;
this.whisperService = whisperService;
Expand All @@ -38,6 +42,7 @@ public EventsHandler(
this.logger = logger;
this.tradeClient = tradeClient;
this.wikiProvider = wikiProvider;
this.viewLocator = viewLocator;
Initialize();
}

Expand All @@ -59,6 +64,13 @@ private void Initialize()
events.OnLeaveParty += TriggerLeaveParty;
events.OnOpenSearch += TriggerOpenSearch;
events.OnWhisperReply += TriggerReplyToLatestWhisper;
events.OnOpenLeagueOverview += Events_OnOpenLeagueOverview; ;
}

private Task<bool> Events_OnOpenLeagueOverview()
{
viewLocator.Open<LeagueView>();
return Task.FromResult(true);
}

private Task<bool> TriggerReplyToLatestWhisper()
Expand Down Expand Up @@ -118,7 +130,7 @@ private async Task<bool> TriggerItemWiki()
/// </summary>
private Task<bool> TriggerHideout()
{
keyboard.SendCommand(KeyboardCommandEnum.GoToHideout);
keyboard.SendCommand(KeyboardCommandEnum.GoToHideout);
return Task.FromResult(true);
}

Expand Down
2 changes: 0 additions & 2 deletions src/Sidekick/StartupExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Sidekick.Natives;
using Sidekick.Windows;
using Sidekick.Windows.ApplicationLogs;
using Sidekick.Windows.LeagueOverlay;
using Sidekick.Windows.Leagues;
using Sidekick.Windows.Prediction;
using Sidekick.Windows.PriceCheck;
Expand All @@ -32,7 +31,6 @@ public static IServiceCollection AddSidekickUIWindows(this IServiceCollection se
services.AddSingleton<EventsHandler>();
services.AddSingleton<OverlayController>();
services.AddSingleton<OverlayWindow>();
services.AddSingleton<LeagueOverlayController>();
services.AddSingleton<PredictionController>();
services.AddSingleton<ApplicationLogsController>();

Expand Down
68 changes: 0 additions & 68 deletions src/Sidekick/Windows/LeagueOverlay/LeagueOverlayController.cs

This file was deleted.

Loading

0 comments on commit cc39354

Please sign in to comment.