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,163 @@
<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:controls1="clr-namespace:ClassicAssist.UI.Controls"
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels"
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
xmlns:valueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
xmlns:misc="clr-namespace:ClassicAssist.Misc"
xmlns:dress="clr-namespace:ClassicAssist.Data.Dress;assembly=ClassicAssist.Shared"
xmlns:misc1="clr-namespace:ClassicAssist.UI.Misc"
xmlns:agents="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Agents;assembly=ClassicAssist.Shared"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
x:Class="ClassicAssist.UI.Views.Agents.DressTabControl"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="500" Margin="0">
<d:DesignerProperties.DesignStyle>
<Style TargetType="UserControl">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
</Style>
</d:DesignerProperties.DesignStyle>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../../Resources/ResourceDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
<misc:BindingProxy Data="{Binding}" x:Key="Proxy" />
</ResourceDictionary>
</UserControl.Resources>
<UserControl.DataContext>
<agents:DressTabViewModel />
</UserControl.DataContext>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="120" />
</Grid.ColumnDefinitions>
<Grid Margin="5" Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.Resources>
<valueConverters:CellWidthValueConverter x:Key="CellWidthValueConverter" />
</Grid.Resources>
<CheckBox IsChecked="{Binding MoveConflictingItems}" Grid.Row="0">
<TextBlock Text="{x:Static resources:Strings.Move_conflicting_items}" TextWrapping="Wrap" />
</CheckBox>
<CheckBox Content="{x:Static resources:Strings.Use_UO3D_Packets}"
IsChecked="{Binding UseUO3DPackets}" Grid.Row="1"
ToolTip="{x:Static resources:Strings.Requires_Server_Support}" />
<ListBox x:Name="listBox1" Grid.Row="2" Margin="0,5" ItemsSource="{Binding Items}"
SelectedItem="{Binding SelectedItem}" SelectedIndex="0">
<ListBox.InputBindings>
<KeyBinding Key="Delete"
Command="{Binding RemoveDressEntryCommand}" CommandParameter="{Binding SelectedItem}" />
</ListBox.InputBindings>
<i:Interaction.Behaviors>
<misc1:ItemsControlSelectNewEntryBehaviour SelectedItem="{Binding SelectedItem}"
Type="{x:Type dress:DressAgentEntry}" />
</i:Interaction.Behaviors>
<ListBox.ItemTemplate>
<DataTemplate>
<controls1:EditTextBlock Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
Width="{Binding ActualWidth, Converter={StaticResource CellWidthValueConverter}, ElementName=listBox1, Mode=OneWay}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="10" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Content="{x:Static resources:Strings.Remove}" Grid.Column="0"
Command="{Binding RemoveDressEntryCommand, Mode=OneWay}"
CommandParameter="{Binding SelectedItem}" />
<Button Content="{x:Static resources:Strings.New}" Grid.Column="2"
Command="{Binding NewDressEntryCommand, Mode=OneWay}" />
</Grid>
</Grid>
<Grid Margin="5" Grid.Column="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ListBox x:Name="listBox" Grid.Row="0" Margin="0,0,0,5" ItemsSource="{Binding SelectedItem.Items}"
SelectedItem="{Binding SelectedDressItem}" DisplayMemberPath="Name">
<ListBox.ContextMenu>
<ContextMenu>
<ContextMenu.Resources>
<Style TargetType="MenuItem">
<Style.Triggers>
<DataTrigger Binding="{Binding SelectedDressItem.Type}"
Value="{x:Static dress:DressAgentItemType.ID}">
<Setter Property="IsChecked" Value="True" />
</DataTrigger>
<DataTrigger Binding="{Binding SelectedDressItem.Type}"
Value="{x:Static dress:DressAgentItemType.Serial}">
<Setter Property="IsChecked" Value="False" />
</DataTrigger>
</Style.Triggers>
</Style>
</ContextMenu.Resources>
<MenuItem Header="{x:Static resources:Strings.Dress_Type}" IsCheckable="True"
Command="{Binding Data.ChangeDressTypeCommand, Source={StaticResource Proxy}}"
CommandParameter="{Binding SelectedDressItem}" />
</ContextMenu>
</ListBox.ContextMenu>
</ListBox>
<Button Content="{x:Static resources:Strings.Set_Undress_Container}" Grid.Row="1"
Command="{Binding SetUndressContainerCommand, Mode=OneWay}"
CommandParameter="{Binding SelectedItem}" />
</Grid>
</Grid>
<Grid Margin="5" Grid.Column="2">
<Grid.Resources>
<!--<BooleanToVisibilityConverter x:Key="BoolToVisibilityValueConverter"/>-->
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Margin" Value="0,0,5,5" />
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Button Content="{x:Static resources:Strings.Dress}" Grid.Row="0"
Command="{Binding DressAllItemsCommand, Mode=OneWay}" CommandParameter="{Binding SelectedItem}" />
<Button Content="{x:Static resources:Strings.Undress}" Grid.Row="1"
Command="{Binding UndressItemsCommand}" CommandParameter="{Binding SelectedItem}" />
<Button Content="{x:Static resources:Strings.Undress_All}" Grid.Row="2"
Command="{Binding UndressAllItemsCommand}" />
<Button Content="{x:Static resources:Strings.Import}" Grid.Row="3"
Command="{Binding ImportItemsCommand, Mode=OneWay}" CommandParameter="{Binding SelectedItem}" />
<Button Content="{x:Static resources:Strings.New_Item}" Grid.Row="4"
Command="{Binding AddDressItemCommand, Mode=OneWay}" CommandParameter="{Binding SelectedItem}" />
<Button Content="{x:Static resources:Strings.Remove}" Grid.Row="5"
Command="{Binding RemoveDressItemCommand, Mode=OneWay}"
CommandParameter="{Binding SelectedItem, ElementName=listBox}" />
<Button Content="{x:Static resources:Strings.Clear_All}" Grid.Row="6" Margin="0,10,5,0" Height="25"
Command="{Binding ClearDressItemsCommand}" CommandParameter="{Binding SelectedItem}" />
<Grid Grid.Row="7" Margin="0,40,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
</Grid>
</Grid>
<!--<dress:TextBoxKeys ShortcutChanged="{Binding ShortcutChangedCommand}"/>-->
</Grid>
</UserControl>