small ui changes
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:ARAMUtility"
|
||||
xmlns:vm="clr-namespace:ARAMUtility.ViewModel"
|
||||
mc:Ignorable="d"
|
||||
Title="{Binding Title}"
|
||||
@@ -57,13 +58,33 @@
|
||||
<MenuItem Header="Actions">
|
||||
<MenuItem Header="Open Mayhem Lobby" Command="{Binding OpenLobbyCommand}" />
|
||||
<MenuItem Header="Start Queueing" Command="{Binding StartQueueingCommand}" />
|
||||
<MenuItem Header="Reconnect" Command="{Binding ConnectCommand}" />
|
||||
<Separator />
|
||||
<MenuItem Header="Topmost" IsCheckable="True" IsChecked="{Binding Topmost, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MainWindow}}}" />
|
||||
<Separator />
|
||||
<MenuItem Header="Reload ARAM Balance" Command="{Binding ReloadARAMBalanceCommand}" />
|
||||
<Separator />
|
||||
<MenuItem Header="Quit" Command="{Binding QuitCommand}" />
|
||||
</MenuItem>
|
||||
<MenuItem Header="{Binding ConnectionStatus}" IsEnabled="False" />
|
||||
<MenuItem Header="{Binding ConnectionStatus}" Command="{Binding ConnectCommand}" />
|
||||
<MenuItem Header="Update ARAM">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<ComboBox ItemsSource="{Binding .}"
|
||||
SelectedIndex="0"
|
||||
SelectedItem="{Binding .}"
|
||||
/>
|
||||
<ItemsControl ItemsSource="{Binding .}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Content="{Binding .}" />
|
||||
<TextBox Text="{Binding .}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Button Content="Save" />
|
||||
</StackPanel>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<Viewbox Stretch="Uniform" StretchDirection="DownOnly">
|
||||
<Grid Margin="10">
|
||||
|
||||
@@ -39,6 +39,8 @@ public partial class MainViewModel : ObservableObject, IDisposable
|
||||
[ObservableProperty]
|
||||
public partial string ConnectionStatus { get; private set; } = "Not connected.";
|
||||
|
||||
|
||||
|
||||
private Dictionary<int, ChampionData> _allChampions = [];
|
||||
private List<int> _needChampionIds = [];
|
||||
private readonly APIClient _client = new();
|
||||
@@ -49,8 +51,8 @@ public partial class MainViewModel : ObservableObject, IDisposable
|
||||
public MainViewModel()
|
||||
{
|
||||
_lcuWebsocket.Connecting += (_, _) => UpdateConnectionStatus(false, "Connecting ...");
|
||||
_lcuWebsocket.Connected += (_, _) => UpdateConnectionStatus(false, "Connected.");
|
||||
_lcuWebsocket.Disconnected += (_, _) => UpdateConnectionStatus(true, "Disconnected.");
|
||||
_lcuWebsocket.Connected += (_, _) => UpdateConnectionStatus(false, "Connected");
|
||||
_lcuWebsocket.Disconnected += (_, _) => UpdateConnectionStatus(true, "Reconnect?");
|
||||
|
||||
_lcuWebsocket.LcuApiEvent += OnLcuApiEvent;
|
||||
#if DEBUG
|
||||
@@ -104,7 +106,6 @@ public partial class MainViewModel : ObservableObject, IDisposable
|
||||
File.AppendAllText("socket.log", $"{apiEvent.Uri}: {apiEvent.EventType} - {apiEvent.Data?.ToJsonString()}\n");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private async Task UpdateNeedChampionIdsAsync()
|
||||
|
||||
Reference in New Issue
Block a user