Removed unnecessary functionality remaining from standalone overlay app.

This commit is contained in:
2025-05-22 11:13:08 -04:00
parent 276f6c08fc
commit f19d186008
3 changed files with 0 additions and 75 deletions

View File

@@ -9,16 +9,11 @@ namespace osrs_toolbox
private int _competitionId = -1; private int _competitionId = -1;
private int _groupId = -1; private int _groupId = -1;
private string _playerName = string.Empty; private string _playerName = string.Empty;
private string _testOutput = string.Empty;
private StackPanel _gridOutput = new StackPanel(); private StackPanel _gridOutput = new StackPanel();
private Visibility _controlsVisible = Visibility.Visible;
private string _toggleButtonText = string.Empty;
private bool _hideOtherPlayers = false; private bool _hideOtherPlayers = false;
private bool _hideZeroKC = false; private bool _hideZeroKC = false;
private ICommand _update; private ICommand _update;
private ICommand _toggleVisibility;
private ICommand _closeApp;
public int CompetitionID public int CompetitionID
{ {
@@ -35,26 +30,11 @@ namespace osrs_toolbox
get { return _playerName; } get { return _playerName; }
set { SetProperty(ref _playerName, value, nameof(PlayerName)); } set { SetProperty(ref _playerName, value, nameof(PlayerName)); }
} }
public string TestOutput
{
get { return _testOutput; }
set { SetProperty(ref _testOutput, value, nameof(TestOutput)); }
}
public StackPanel GridOutput public StackPanel GridOutput
{ {
get { return _gridOutput; } get { return _gridOutput; }
set { SetProperty(ref _gridOutput, value, nameof(GridOutput)); } set { SetProperty(ref _gridOutput, value, nameof(GridOutput)); }
} }
public Visibility ControlsVisible
{
get { return _controlsVisible; }
set { SetProperty(ref _controlsVisible, value, nameof(ControlsVisible)); }
}
public string ToggleButtonText
{
get { return _toggleButtonText; }
set { SetProperty(ref _toggleButtonText, value, nameof(ToggleButtonText)); }
}
public bool HideOtherPlayers public bool HideOtherPlayers
{ {
get { return _hideOtherPlayers; } get { return _hideOtherPlayers; }
@@ -71,15 +51,5 @@ namespace osrs_toolbox
get { return _update; } get { return _update; }
set { SetProperty(ref _update, value, nameof(Update)); } set { SetProperty(ref _update, value, nameof(Update)); }
} }
public ICommand ToggleVisibility
{
get { return _toggleVisibility; }
set { SetProperty(ref _toggleVisibility, value, nameof(ToggleVisibility)); }
}
public ICommand CloseApp
{
get { return _closeApp; }
set { SetProperty(ref _closeApp, value, nameof(CloseApp)); }
}
} }
} }

View File

@@ -26,10 +26,7 @@ namespace osrs_toolbox
CompetitionID = 80030; CompetitionID = 80030;
GroupID = 11197; GroupID = 11197;
PlayerName = "kalakoi"; PlayerName = "kalakoi";
TestOutput = string.Empty;
GridOutput = new StackPanel(); GridOutput = new StackPanel();
ControlsVisible = Visibility.Visible;
ToggleButtonText = "V";
HideOtherPlayers = false; HideOtherPlayers = false;
HideZeroKC = false; HideZeroKC = false;
} }
@@ -39,10 +36,7 @@ namespace osrs_toolbox
this.CompetitionID = CompetitionID; this.CompetitionID = CompetitionID;
this.GroupID = GroupID; this.GroupID = GroupID;
PlayerName = Username; PlayerName = Username;
TestOutput = string.Empty;
GridOutput = new StackPanel(); GridOutput = new StackPanel();
ControlsVisible = Visibility.Visible;
ToggleButtonText = "V";
HideOtherPlayers = false; HideOtherPlayers = false;
HideZeroKC = false; HideZeroKC = false;
} }
@@ -50,8 +44,6 @@ namespace osrs_toolbox
private void InitializeCommands() private void InitializeCommands()
{ {
Update = new RelayCommand(DoUpdate); Update = new RelayCommand(DoUpdate);
CloseApp = new RelayCommand(DoCloseApp);
ToggleVisibility = new RelayCommand(DoToggleControls);
} }
private void InitializeTimer() private void InitializeTimer()
@@ -295,28 +287,5 @@ namespace osrs_toolbox
}); });
OnPropertyChanged(nameof(GridOutput)); OnPropertyChanged(nameof(GridOutput));
} }
private void DoCloseApp(object obj)
{
Application.Current.Shutdown();
}
private void DoToggleControls(object obj)
{
if (ControlsVisible == Visibility.Visible)
{
ControlsVisible = Visibility.Collapsed;
Application.Current.MainWindow.ResizeMode = ResizeMode.NoResize;
Application.Current.MainWindow.Topmost = true;
ToggleButtonText = ">";
}
else
{
ControlsVisible = Visibility.Visible;
Application.Current.MainWindow.ResizeMode = ResizeMode.CanResizeWithGrip;
Application.Current.MainWindow.Topmost = false;
ToggleButtonText = "V";
}
}
} }
} }

View File

@@ -31,23 +31,9 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<local:OutlinedTextBlock Grid.Column="0" Text="Competition Tracker" Margin="3" FontWeight="ExtraBold" FontSize="16" Stroke="Black" Fill="White" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left"/> <local:OutlinedTextBlock Grid.Column="0" Text="Competition Tracker" Margin="3" FontWeight="ExtraBold" FontSize="16" Stroke="Black" Fill="White" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<Button Command="{Binding ToggleVisibility, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="3" Padding="3" Content="{Binding ToggleButtonText, UpdateSourceTrigger=PropertyChanged}"/>
<Button Command="{Binding CloseApp, UpdateSourceTrigger=PropertyChanged}" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="3" Padding="3" Content="X"/>
</Grid> </Grid>
<local:OutlinedTextBlock Text="Player:" Margin="3" Grid.Row="1" Grid.Column="0" FontWeight="ExtraBold" FontSize="16" Stroke="Black" Fill="White" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding ControlsVisible, UpdateSourceTrigger=PropertyChanged}"/>
<TextBox Text="{Binding PlayerName, UpdateSourceTrigger=PropertyChanged}" Margin="3" Padding="3" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Visibility="{Binding ControlsVisible, UpdateSourceTrigger=PropertyChanged}"/>
<local:OutlinedTextBlock Text="Group:" Margin="3" Grid.Row="2" Grid.Column="0" FontWeight="ExtraBold" FontSize="16" Stroke="Black" Fill="White" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding ControlsVisible, UpdateSourceTrigger=PropertyChanged}"/>
<TextBox Text="{Binding GroupID, UpdateSourceTrigger=PropertyChanged}" Margin="3" Padding="3" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Visibility="{Binding ControlsVisible, UpdateSourceTrigger=PropertyChanged}"/>
<local:OutlinedTextBlock Text="Competition:" Margin="3" Grid.Row="3" Grid.Column="0" FontWeight="ExtraBold" FontSize="16" Stroke="Black" Fill="White" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding ControlsVisible, UpdateSourceTrigger=PropertyChanged}"/>
<TextBox Text="{Binding CompetitionID, UpdateSourceTrigger=PropertyChanged}" Margin="3" Padding="3" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Visibility="{Binding ControlsVisible, UpdateSourceTrigger=PropertyChanged}"/>
<!--TextBlock Text="Debug Output:" Margin="3" Padding="3" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Left"/-->
<local:OutlinedTextBlock Text="Hide Other Players:" Margin="3" Grid.Row="4" Grid.Column="0" FontWeight="ExtraBold" FontSize="16" Stroke="Black" Fill="White" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding ControlsVisible, UpdateSourceTrigger=PropertyChanged}"/>
<CheckBox IsChecked="{Binding HideOtherPlayers, UpdateSourceTrigger=PropertyChanged}" Margin="3" Grid.Row="4" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding ControlsVisible, UpdateSourceTrigger=PropertyChanged}"/>
<local:OutlinedTextBlock Text="Hide 0 KC:" Margin="3" Grid.Row="5" Grid.Column="0" FontWeight="ExtraBold" FontSize="16" Stroke="Black" Fill="White" StrokeThickness="1" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding ControlsVisible, UpdateSourceTrigger=PropertyChanged}"/>
<CheckBox IsChecked="{Binding HideZeroKC, UpdateSourceTrigger=PropertyChanged}" Margin="3" Grid.Row="5" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Visibility="{Binding ControlsVisible, UpdateSourceTrigger=PropertyChanged}"/>
<Border Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="Black" BorderThickness="0" Margin="3" Padding="3" CornerRadius="4"> <Border Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="Black" BorderThickness="0" Margin="3" Padding="3" CornerRadius="4">
<ContentControl Content="{Binding GridOutput, UpdateSourceTrigger=PropertyChanged}"/> <ContentControl Content="{Binding GridOutput, UpdateSourceTrigger=PropertyChanged}"/>
</Border> </Border>
<Button Content="Debug" Margin="3" Padding="3" Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center" Command="{Binding Update, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding ControlsVisible, UpdateSourceTrigger=PropertyChanged}"/>
</Grid> </Grid>
</Window> </Window>