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>
@@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace ClassicAssist.UI.Views.Agents
{
/// <summary>
/// Interaction logic for AutolootTabControl.xaml
/// </summary>
public partial class AutolootTabControl : UserControl
{
public AutolootTabControl()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,90 @@
<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:controls="clr-namespace:ClassicAssist.UI.Controls"
xmlns:ValueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
xmlns:agents="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Agents;assembly=ClassicAssist.Shared"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
x:Class="ClassicAssist.UI.Views.Agents.CountersTabControl"
mc:Ignorable="d"
d:DesignHeight="250" d:DesignWidth="500">
<d:DesignerProperties.DesignStyle>
<Style TargetType="UserControl">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
</Style>
</d:DesignerProperties.DesignStyle>
<UserControl.DataContext>
<agents:CountersTabViewModel />
</UserControl.DataContext>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../../Resources/ResourceDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.Resources>
<ValueConverters:CellWidthValueConverter x:Key="CellWidthValueConverter" />
</Grid.Resources>
<ListView Grid.Row="0" Margin="10" ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}">
<ListView.View>
<GridView>
<GridViewColumn Header="{x:Static resources:Strings.Name}" Width="150" x:Name="NameColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<controls:EditTextBlock
Width="{Binding ActualWidth, Converter={StaticResource CellWidthValueConverter}, ConverterParameter=15, ElementName=NameColumn, Mode=OneWay}"
Text="{Binding Name}" ShowIcon="True" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Graphic}" Width="100"
DisplayMemberBinding="{Binding Graphic, StringFormat={}0x{0:x}}" />
<GridViewColumn Header="{x:Static resources:Strings.Color}" Width="75" x:Name="ColorColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<controls:EditTextBlock
Width="{Binding ActualWidth, Converter={StaticResource CellWidthValueConverter}, ConverterParameter=15, ElementName=ColorColumn, Mode=OneWay}"
Text="{Binding Color, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" ShowIcon="True" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Count}" Width="75"
DisplayMemberBinding="{Binding Count}" />
</GridView>
</ListView.View>
</ListView>
<DockPanel Grid.Row="1" Margin="10,0,10,10">
<CheckBox IsChecked="{Binding Warn}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{x:Static resources:Strings.Warn_when_counter_amount_below_}" />
<xctk:IntegerUpDown Minimum="0" Value="{Binding WarnAmount}" UpdateValueOnEnterKey="True" />
</StackPanel>
</CheckBox>
</DockPanel>
<DockPanel Grid.Row="2" Margin="10,0,10,10">
<DockPanel.Resources>
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Width" Value="70" />
<Setter Property="Height" Value="25" />
</Style>
</DockPanel.Resources>
<Button Content="{x:Static resources:Strings.Remove}" HorizontalAlignment="Left" Margin="0,0,10,0"
Command="{Binding RemoveEntryCommand}" CommandParameter="{Binding SelectedItem}" />
<Button Content="{x:Static resources:Strings.Insert}" HorizontalAlignment="Left"
Command="{Binding InsertEntryCommand}" />
<Button Content="{x:Static resources:Strings.Recount}" HorizontalAlignment="Right"
Command="{Binding RecountCommand}" />
</DockPanel>
</Grid>
</UserControl>
@@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace ClassicAssist.UI.Views.Agents
{
/// <summary>
/// Interaction logic for CountersTabControl.xaml
/// </summary>
public partial class CountersTabControl : UserControl
{
public CountersTabControl()
{
InitializeComponent();
}
}
}
@@ -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>
@@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace ClassicAssist.UI.Views.Agents
{
/// <summary>
/// Interaction logic for DressTabControl.xaml
/// </summary>
public partial class DressTabControl : UserControl
{
public DressTabControl()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,66 @@
<UserControl x:Class="ClassicAssist.UI.Views.Agents.FriendsTabControl"
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:agents="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Agents;assembly=ClassicAssist.Shared"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="500">
<d:DesignerProperties.DesignStyle>
<Style TargetType="UserControl">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
</Style>
</d:DesignerProperties.DesignStyle>
<UserControl.DataContext>
<agents:FriendsTabViewModel />
</UserControl.DataContext>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../../Resources/ResourceDictionary.xaml" />
<ResourceDictionary Source="../../../Resources/Icons.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ListBox Grid.Row="0" ItemsSource="{Binding Options.Friends}" SelectedItem="{Binding SelectedItem}" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Content="{x:Static resources:Strings.Insert}" Grid.Column="0" Margin="0,5,5,5"
Command="{Binding AddFriendCommand}" />
<Button Content="{x:Static resources:Strings.Remove}" Grid.Column="1" Margin="5,5,0,5"
Command="{Binding RemoveFriendCommand}" CommandParameter="{Binding SelectedItem}" />
</Grid>
</Grid>
<StackPanel Grid.Column="1" Margin="0,10,10,10">
<CheckBox Content="{x:Static resources:Strings.Include_party_members}"
IsChecked="{Binding Options.IncludePartyMembersInFriends}" />
<CheckBox Content="{x:Static resources:Strings.Prevent_attacking_friends_in_war_mode}"
IsChecked="{Binding Options.PreventAttackingFriendsInWarMode}" />
<CheckBox Content="{x:Static resources:Strings.Prevent_targeting_friends_with_Harmful_spells}"
IsChecked="{Binding Options.PreventTargetingFriendsWithHarmful}" />
<StackPanel Orientation="Horizontal">
<CheckBox Content="{x:Static resources:Strings.Rehue_friends}"
IsChecked="{Binding Options.CurrentOptions.RehueFriends}" Command="{Binding ChangeRehueOption}" />
<Button Margin="10,0,0,0" Command="{Binding SelectHueCommand}" CommandParameter="{Binding Options.CurrentOptions.RehueFriendsHue}">
<Image Source="{StaticResource ColorWheelIcon}" Height="12" Width="12" />
</Button>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>
@@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace ClassicAssist.UI.Views.Agents
{
/// <summary>
/// Interaction logic for FriendsTabControl.xaml
/// </summary>
public partial class FriendsTabControl : UserControl
{
public FriendsTabControl()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,146 @@
<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:controls="clr-namespace:ClassicAssist.UI.Controls"
xmlns:agents="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Agents;assembly=ClassicAssist.Shared"
xmlns:valueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
xmlns:organizer="clr-namespace:ClassicAssist.Data.Organizer;assembly=ClassicAssist.Shared"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
x:Name="userControl" x:Class="ClassicAssist.UI.Views.Agents.OrganizerTabControl"
mc:Ignorable="d"
d:DesignHeight="250" d:DesignWidth="500">
<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>
</ResourceDictionary>
</UserControl.Resources>
<UserControl.DataContext>
<agents:OrganizerTabViewModel />
</UserControl.DataContext>
<Grid>
<Grid.Resources>
<valueConverters:CellWidthValueConverter x:Key="CellWidthValueConverter" />
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Margin" Value="5" />
<Setter Property="Height" Value="25" />
<Setter Property="Padding" Value="10,0,10,0" />
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.Resources>
<valueConverters:CellWidthValueConverter x:Key="CellWidthValueConverter" />
</Grid.Resources>
<controls:StretchyWrapPanel Grid.Row="0" Orientation="Horizontal">
<Button Content="{Binding PlayStopButtonText}"
Command="{Binding OrganizeCommand}" CommandParameter="{Binding SelectedItem}" />
<StackPanel Margin="5">
<CheckBox Content="{x:Static resources:Strings.Stack}" IsChecked="{Binding SelectedItem.Stack}" />
</StackPanel>
</controls:StretchyWrapPanel>
<Grid Grid.Row="1">
<ListBox x:Name="listBox" ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}">
<ListBox.InputBindings>
<KeyBinding Key="Delete"
Command="{Binding RemoveItemCommand}" CommandParameter="{Binding SelectedItem}" />
</ListBox.InputBindings>
<i:Interaction.Behaviors>
<misc:ItemsControlSelectNewEntryBehaviour SelectedItem="{Binding SelectedItem}"
Type="{x:Type organizer:OrganizerEntry}" />
</i:Interaction.Behaviors>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<controls:EditTextBlock
Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
Width="{Binding ActualWidth, Converter={StaticResource CellWidthValueConverter}, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBox}}}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<StackPanel Grid.Row="2" Margin="0,10,0,0">
<CheckBox Content="{x:Static resources:Strings.Complete}" IsChecked="{Binding SelectedItem.Complete}" />
</StackPanel>
<DockPanel Grid.Row="3" Margin="0,10,0,0">
<Button Content="{x:Static resources:Strings.Remove}" HorizontalAlignment="Left" Margin="0"
Command="{Binding RemoveOrganizerAgentEntryCommand}" CommandParameter="{Binding SelectedItem}" />
<Button Content="{x:Static resources:Strings.New}" HorizontalAlignment="Right" Margin="0"
Command="{Binding NewOrganizerEntryCommand}" />
</DockPanel>
</Grid>
<Grid Grid.Column="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ListView x:Name="itemsListView" Margin="5" Grid.Row="0" ItemsSource="{Binding SelectedItem.Items}" SelectedItem="{Binding SelectedOrganizerItem}">
<ListView.View>
<GridView>
<GridViewColumn Header="{x:Static resources:Strings.Item}" Width="120"
DisplayMemberBinding="{Binding Item}" />
<GridViewColumn Header="{x:Static resources:Strings.Graphic}" Width="100"
DisplayMemberBinding="{Binding ID, StringFormat={}0x{0:x}}" />
<GridViewColumn Header="{x:Static resources:Strings.Color}" Width="80"
x:Name="HueColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Grid>
<controls:EditTextBlock
Text="{Binding Hue, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
Width="{Binding ActualWidth, Converter={StaticResource CellWidthValueConverter}, ConverterParameter=15, ElementName=HueColumn, Mode=OneWay}"
ShowIcon="True" />
</Grid>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Amount}" Width="80"
x:Name="AmountColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Grid>
<controls:EditTextBlock
Text="{Binding Amount, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
Width="{Binding ActualWidth, Converter={StaticResource CellWidthValueConverter}, ConverterParameter=15, ElementName=AmountColumn, Mode=OneWay}"
ShowIcon="True" />
</Grid>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<Button Content="{x:Static resources:Strings.Set_Containers}"
Command="{Binding SetContainersCommand}" CommandParameter="{Binding SelectedItem}" />
<Button Content="{x:Static resources:Strings.Remove}" Command="{Binding RemoveItemCommand}"
CommandParameter="{Binding SelectedItem, ElementName=itemsListView}" />
<Button Content="{x:Static resources:Strings.Insert}" Command="{Binding InsertItemCommand}"
CommandParameter="{Binding SelectedItem}" />
</StackPanel>
</Grid>
</Grid>
</Grid>
</UserControl>
@@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace ClassicAssist.UI.Views.Agents
{
/// <summary>
/// Interaction logic for OrganizerTabControl.xaml
/// </summary>
public partial class OrganizerTabControl : UserControl
{
public OrganizerTabControl()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,81 @@
<UserControl x:Class="ClassicAssist.UI.Views.Agents.ScavengerTabControl"
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:agents="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Agents;assembly=ClassicAssist.Shared"
xmlns:valueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
mc:Ignorable="d"
d:DesignWidth="493" d:DesignHeight="400">
<d:DesignerProperties.DesignStyle>
<Style TargetType="UserControl">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
</Style>
</d:DesignerProperties.DesignStyle>
<UserControl.DataContext>
<agents:ScavengerTabViewModel />
</UserControl.DataContext>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../../Resources/DarkTheme.xaml" />
<ResourceDictionary Source="../../../Resources/ResourceDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.Resources>
<valueConverters:CellWidthValueConverter x:Key="CellWidthValueConverter" />
</Grid.Resources>
<StackPanel Grid.Column="0" Margin="10,10,0,10">
<StackPanel.Resources>
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Margin" Value="0,5,0,0" />
<Setter Property="Padding" Value="20,0,20,0" />
</Style>
</StackPanel.Resources>
<CheckBox Content="{x:Static resources:Strings.Enabled}" IsChecked="{Binding Enabled}" />
<Button Content="{x:Static resources:Strings.Insert}" Command="{Binding InsertCommand}" />
<Button Content="{x:Static resources:Strings.Remove}" Command="{Binding RemoveCommand}"
CommandParameter="{Binding SelectedItem, ElementName=ListView}" />
<Button Content="{x:Static resources:Strings.Clear_All}" Command="{Binding ClearAllCommand}" />
<Button Content="{x:Static resources:Strings.Set_Container}" Command="{Binding SetContainerCommand}" />
</StackPanel>
<ListView x:Name="ListView" Grid.Column="1" Margin="10"
ItemsSource="{Binding Items, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Foreground="Black">
<ListView.View>
<GridView>
<GridViewColumn Header="✓">
<GridViewColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Enabled}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Name}" DisplayMemberBinding="{Binding Name}"
Width="150" />
<GridViewColumn Header="{x:Static resources:Strings.Graphic}"
DisplayMemberBinding="{Binding Graphic, StringFormat=0x\{0:x\}}" Width="75" />
<GridViewColumn Header="{x:Static resources:Strings.Color}" Width="75" x:Name="HueColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<controls:EditTextBlock Text="{Binding Hue}" TabIndex="0"
Width="{Binding Width, ConverterParameter=15, Converter={StaticResource CellWidthValueConverter}, ElementName=HueColumn}"
ShowIcon="True" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</Grid>
</UserControl>
@@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace ClassicAssist.UI.Views.Agents
{
/// <summary>
/// Interaction logic for ScavengerTabControl.xaml
/// </summary>
public partial class ScavengerTabControl : UserControl
{
public ScavengerTabControl()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,111 @@
<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:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
xmlns:agents="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Agents;assembly=ClassicAssist.Shared"
xmlns:ValueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
x:Class="ClassicAssist.UI.Views.Agents.VendorBuyTabControl"
mc:Ignorable="d"
d:DesignWidth="493" d:DesignHeight="400">
<d:DesignerProperties.DesignStyle>
<Style TargetType="UserControl">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
</Style>
</d:DesignerProperties.DesignStyle>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../../Resources/DarkTheme.xaml" />
<ResourceDictionary Source="../../../Resources/ResourceDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
<ValueConverters:HexToIntValueConverter x:Key="HexToIntValueConverter" />
<ValueConverters:CellWidthValueConverter x:Key="CellWidthValueConverter" />
</ResourceDictionary>
</UserControl.Resources>
<UserControl.DataContext>
<agents:VendorBuyTabViewModel />
</UserControl.DataContext>
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" Margin="0,0,0,10">
<DockPanel.Resources>
<Style TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {x:Type CheckBox}}">
<Setter Property="Margin" Value="0,0,20,0" />
</Style>
</DockPanel.Resources>
<CheckBox Content="{x:Static resources:Strings.Enabled}" IsChecked="{Binding Enabled}" />
<CheckBox IsChecked="{Binding IncludeBackpackAmount}"
Content="{x:Static resources:Strings.Include_Backpack_Amount}" />
</DockPanel>
<ListView x:Name="ListView" Grid.Row="1"
ItemsSource="{Binding Items, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Foreground="Black">
<ListView.View>
<GridView>
<GridViewColumn Header="✓">
<GridViewColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Enabled}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Graphic}" Width="70" x:Name="ItemIDColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<controls:EditTextBlock
Text="{Binding Graphic, Converter={StaticResource HexToIntValueConverter}, StringFormat=0x\{0:x\}}"
TabIndex="1"
Width="{Binding Width, ConverterParameter=15, Converter={StaticResource CellWidthValueConverter}, ElementName=ItemIDColumn}"
ShowIcon="True" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Name}" DisplayMemberBinding="{Binding Name}"
Width="100" />
<GridViewColumn Header="{x:Static resources:Strings.Color}" Width="70" x:Name="HueColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<controls:EditTextBlock Text="{Binding Hue}" TabIndex="0"
Width="{Binding Width, ConverterParameter=15, Converter={StaticResource CellWidthValueConverter}, ElementName=HueColumn}"
ShowIcon="True" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Amount}" x:Name="AmountColumn" Width="70">
<GridViewColumn.CellTemplate>
<DataTemplate>
<controls:EditTextBlock Text="{Binding Amount}" TabIndex="1"
Width="{Binding Width, ConverterParameter=15, Converter={StaticResource CellWidthValueConverter}, ElementName=AmountColumn}"
ShowIcon="True" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Max_Price}" Width="70" x:Name="MaxPriceColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<controls:EditTextBlock Text="{Binding MaxPrice}" TabIndex="2"
Width="{Binding Width, ConverterParameter=15, Converter={StaticResource CellWidthValueConverter}, ElementName=MaxPriceColumn}"
ShowIcon="True" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<StackPanel Orientation="Horizontal" Grid.Row="2">
<Button Content="{x:Static resources:Strings.Insert}" MinWidth="80"
Command="{Binding InsertCommand, Mode=OneWay}" Margin="0,10,10,10" />
<Button Content="{x:Static resources:Strings.Remove}" MinWidth="80"
Command="{Binding RemoveCommand, Mode=OneWay}" Margin="0,10"
CommandParameter="{Binding SelectedItem, ElementName=ListView}" />
</StackPanel>
</Grid>
</UserControl>
@@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace ClassicAssist.UI.Views.Agents
{
/// <summary>
/// Interaction logic for VendorBuyTabControl.xaml
/// </summary>
public partial class VendorBuyTabControl : UserControl
{
public VendorBuyTabControl()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,96 @@
<UserControl x:Class="ClassicAssist.UI.Views.Agents.VendorSellTabControl"
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:agents="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Agents;assembly=ClassicAssist.Shared"
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
xmlns:valueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
mc:Ignorable="d"
d:DesignWidth="493" d:DesignHeight="400">
<d:DesignerProperties.DesignStyle>
<Style TargetType="UserControl">
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
</Style>
</d:DesignerProperties.DesignStyle>
<UserControl.DataContext>
<agents:VendorSellTabViewModel />
</UserControl.DataContext>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../../Resources/DarkTheme.xaml" />
<ResourceDictionary Source="../../../Resources/ResourceDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
<valueConverters:CellWidthValueConverter x:Key="CellWidthValueConverter" />
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ListView x:Name="ListView" Margin="5" Grid.Row="0"
ItemsSource="{Binding Items, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Foreground="Black" Grid.IsSharedSizeScope="True">
<ListView.View>
<GridView>
<GridViewColumn Header="✓">
<GridViewColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Enabled}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Graphic}"
DisplayMemberBinding="{Binding Graphic, StringFormat={}0x{0:x}}" Width="50" />
<GridViewColumn Header="{x:Static resources:Strings.Name}" DisplayMemberBinding="{Binding Name}"
Width="150" />
<GridViewColumn Header="{x:Static resources:Strings.Color}" Width="70" x:Name="HueColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<controls:EditTextBlock Text="{Binding Hue}" TabIndex="0"
Width="{Binding Path=Width, ElementName=HueColumn, Converter={StaticResource CellWidthValueConverter}, ConverterParameter=15}"
ShowIcon="True" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Amount}" Width="70" x:Name="AmountColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<controls:EditTextBlock Text="{Binding Amount}" TabIndex="0"
Width="{Binding Path=Width, ElementName=AmountColumn, Converter={StaticResource CellWidthValueConverter}, ConverterParameter=15}"
ShowIcon="True" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{x:Static resources:Strings.Min_Price}" Width="100" x:Name="MinPriceColumn">
<GridViewColumn.CellTemplate>
<DataTemplate>
<controls:EditTextBlock Text="{Binding MinPrice}" TabIndex="2"
Width="{Binding Path=Width, ElementName=MinPriceColumn, Converter={StaticResource CellWidthValueConverter}, ConverterParameter=15}"
ShowIcon="True" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<StackPanel.Resources>
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Margin" Value="5,5,5,5" />
<Setter Property="Padding" Value="10,0,10,0" />
<Setter Property="MinWidth" Value="80" />
</Style>
</StackPanel.Resources>
<Button Content="{x:Static resources:Strings.Insert}" Command="{Binding InsertCommand}"
CommandParameter="{Binding SelectedItem, ElementName=ListView}" />
<Button Content="{x:Static resources:Strings.Remove}" Command="{Binding RemoveCommand}"
CommandParameter="{Binding SelectedItem, ElementName=ListView}" />
</StackPanel>
</Grid>
</UserControl>
@@ -0,0 +1,15 @@
using System.Windows.Controls;
namespace ClassicAssist.UI.Views.Agents
{
/// <summary>
/// Interaction logic for VendorSellTabControl.xaml
/// </summary>
public partial class VendorSellTabControl : UserControl
{
public VendorSellTabControl()
{
InitializeComponent();
}
}
}