first commit

This commit is contained in:
Beyhan Oğur
2026-09-03 04:45:36 +03:00
commit d5f52cc3d3
1038 changed files with 169579 additions and 0 deletions
@@ -0,0 +1,188 @@
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ClassicAssist.UI.Views.Agents"
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
xmlns:autoloot="clr-namespace:ClassicAssist.Data.Autoloot;assembly=ClassicAssist.Shared"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:ValueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
xmlns:misc1="clr-namespace:ClassicAssist.Misc"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:agents="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Agents;assembly=ClassicAssist.Shared"
x:Class="ClassicAssist.UI.Views.Agents.AutolootTabControl"
mc:Ignorable="d"
d:DesignHeight="250" d:DesignWidth="600" x:Name="userControl">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../../Resources/ResourceDictionary.xaml" />
<ResourceDictionary Source="../../../Resources/Icons.xaml" />
</ResourceDictionary.MergedDictionaries>
<ValueConverters:CellWidthValueConverter x:Key="CellWidthValueConverter" />
<misc1:BindingProxy x:Key="Proxy" Data="{Binding}" />
<SolidColorBrush x:Key="ListBorder" Color="#828790" />
</ResourceDictionary>
</UserControl.Resources>
<UserControl.DataContext>
<agents:AutolootViewModel />
</UserControl.DataContext>
<Grid>
<i:Interaction.Behaviors>
<misc:ClipboardBehaviour CopyCommand="{Binding ClipboardCopyCommand}"
PasteCommand="{Binding ClipboardPasteCommand}"
CommandParameter="{Binding SelectedProperties}" />
</i:Interaction.Behaviors>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Margin="10" Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<CheckBox Content="{x:Static resources:Strings.Enabled}" IsChecked="{Binding Enabled}" />
<CheckBox Content="{x:Static resources:Strings.Disable_inside_guardzone}"
IsChecked="{Binding DisableInGuardzone}" />
</StackPanel>
<ListBox x:Name="listView" Grid.Row="1" Margin="0,10,0,10" ItemsSource="{Binding Items}"
SelectedItem="{Binding SelectedItem}" HorizontalContentAlignment="Stretch">
<ListBox.Resources>
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
<Style.Triggers>
<DataTrigger Binding="{Binding Enabled}" Value="False">
<Setter Property="TextDecorations" Value="Strikethrough"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ListBox.Resources>
<ListBox.InputBindings>
<KeyBinding Key="Delete"
Command="{Binding RemoveCommand}" CommandParameter="{Binding SelectedItem}" />
</ListBox.InputBindings>
<i:Interaction.Behaviors>
<misc:ItemsControlSelectNewEntryBehaviour SelectedItem="{Binding SelectedItem}"
Type="{x:Type autoloot:AutolootEntry}" />
</i:Interaction.Behaviors>
<ListBox.ItemTemplate>
<DataTemplate>
<controls:EditTextBlock Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
Label="{Binding}" MinWidth="160" ShowIcon="True" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Grid.Row="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Content="{x:Static resources:Strings.Remove}" Grid.Column="0" Margin="0,0,5,0"
Command="{Binding RemoveCommand}"
CommandParameter="{Binding SelectedItem, ElementName=listView}" />
<Button Content="{x:Static resources:Strings.Insert}" Grid.Column="1" Margin="5,0,0,0"
Command="{Binding InsertCommand}">
<Button.ContextMenu>
<ContextMenu IsOpen="False">
<MenuItem Header="{x:Static resources:Strings.Match_Any_ID}"
Command="{Binding Source={StaticResource Proxy}, Path=Data.InsertMatchAnyCommand}" />
</ContextMenu>
</Button.ContextMenu>
</Button>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button Content="{x:Static resources:Strings.Set_Container}" Margin="0,10,5,0"
Command="{Binding SetContainerCommand}" Grid.Column="0" />
<Image Source="{StaticResource configureIcon}" Height="16" Margin="5,10,0,0" Grid.Column="1"
misc:ClickOpensContextMenuBehaviour.Enabled="True">
<Image.ContextMenu>
<ContextMenu IsOpen="False">
<MenuItem Header="{x:Static resources:Strings.Reset_Container}"
Command="{Binding Source={StaticResource Proxy}, Path=Data.ResetContainerCommand}" />
<MenuItem Header="{x:Static resources:Strings.Define_Custom_Properties}"
Command="{Binding Source={StaticResource Proxy}, Path=Data.DefineCustomPropertiesCommand}" />
</ContextMenu>
</Image.ContextMenu>
</Image>
</Grid>
</StackPanel>
</Grid>
<Grid Grid.Column="1" Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ComboBox x:Name="comboBox" Grid.Row="0" ItemsSource="{Binding Constraints}" DisplayMemberPath="Name"
SelectedIndex="0" />
<CheckBox Content="{x:Static resources:Strings.Enabled}" Grid.Row="1" Margin="0,10,0,0"
IsChecked="{Binding SelectedItem.Enabled}" />
<ListView x:Name="listView1" Grid.Row="2" Margin="0,10,0,10"
ItemsSource="{Binding SelectedItem.Constraints}" SelectedItem="{Binding SelectedProperty}">
<i:Interaction.Behaviors>
<misc:ListViewMultiSelectionBehaviour SelectedItems="{Binding SelectedProperties}" />
</i:Interaction.Behaviors>
<ListView.View>
<GridView>
<GridViewColumn Header="{x:Static resources:Strings.Property}" Width="150"
DisplayMemberBinding="{Binding Property.Name}" />
<GridViewColumn Header="{x:Static resources:Strings.Operator}" Width="75">
<GridViewColumn.CellTemplate>
<DataTemplate>
<ComboBox Width="50" SelectedItem="{Binding Operator}"
ItemsSource="{Binding Source={misc:EnumBindingSource {x:Type autoloot:AutolootOperator}}}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Value}" Width="75" x:Name="ValueColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<controls:EditTextBlock
Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
MinWidth="40" ShowIcon="True"
Width="{Binding Converter={StaticResource CellWidthValueConverter}, ConverterParameter=15, Path=Width, ElementName=ValueColumn, Mode=OneWay}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<StackPanel Grid.Row="3">
<Grid Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Content="{x:Static resources:Strings.Remove}" Grid.Column="0" Margin="0,0,5,0"
Command="{Binding RemoveConstraintCommand}"
CommandParameter="{Binding SelectedProperties}" />
<Button Content="{x:Static resources:Strings.Insert}" Grid.Column="1" Margin="5,0,0,0"
Command="{Binding InsertConstraintCommand}"
CommandParameter="{Binding SelectedValue, ElementName=comboBox}" />
</Grid>
<StackPanel Orientation="Horizontal">
<CheckBox Content="{x:Static resources:Strings.Rehue_matching_items}"
IsChecked="{Binding SelectedItem.Rehue}" />
<Button Margin="10,0,0,0" Command="{Binding SelectHueCommand}"
CommandParameter="{Binding SelectedItem, ElementName=listView}">
<Image Source="{StaticResource ColorWheelIcon}" Height="12" Width="12" />
</Button>
</StackPanel>
<CheckBox Content="{x:Static resources:Strings.Autoloot_matching_items}"
IsChecked="{Binding SelectedItem.Autoloot}" />
</StackPanel>
</Grid>
</Grid>
</UserControl>