-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Based on #91 I ended up doing this somewhat differently. The ServerFilter model (and the DB table) were intended to be a set, so storing the actual count values in them didn't make much sense. Instead I decided to store the actual count values as a regular CVar. This also meant the code for the basic filters handling didn't need massive revamps.
- Loading branch information
Showing
8 changed files
with
169 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
SS14.Launcher/Views/MainWindowTabs/ServerFilterCounterView.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
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:mainWindowTabs="clr-namespace:SS14.Launcher.ViewModels.MainWindowTabs" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
Width="300" | ||
x:Class="SS14.Launcher.Views.MainWindowTabs.ServerFilterCounterView"> | ||
<Design.DataContext> | ||
<mainWindowTabs:ServerFilterCounterViewModel /> | ||
</Design.DataContext> | ||
|
||
<Grid ColumnDefinitions="Auto,*"> | ||
<CheckBox Content="{Binding ShortName}" Classes="ServerFilter" IsChecked="{Binding Selected}"> | ||
<ToolTip.Tip> | ||
<TextBlock Text="{Binding Name}" /> | ||
</ToolTip.Tip> | ||
</CheckBox> | ||
<NumericUpDown Grid.Column="1" MinWidth="50" HorizontalAlignment="Left" | ||
Value="{Binding CounterValue}" IsEnabled="{Binding Selected}" | ||
Maximum="999" Minimum="0" /> | ||
</Grid> | ||
</UserControl> |
11 changes: 11 additions & 0 deletions
11
SS14.Launcher/Views/MainWindowTabs/ServerFilterCounterView.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Avalonia.Controls; | ||
|
||
namespace SS14.Launcher.Views.MainWindowTabs; | ||
|
||
public sealed partial class ServerFilterCounterView : UserControl | ||
{ | ||
public ServerFilterCounterView() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters