first commit
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.AboutControl"
|
||||
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"
|
||||
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
|
||||
xmlns:valueConverters1="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
|
||||
xmlns:r="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="350" d:DesignWidth="600"
|
||||
d:DataContext="{d:DesignInstance {x:Type viewModels:AboutControlViewModel}, IsDesignTimeCreatable=True}">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="../../Resources/ResourceDictionary.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<UserControl.DataContext>
|
||||
<viewModels:AboutControlViewModel />
|
||||
</UserControl.DataContext>
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
<Grid>
|
||||
<Grid.Resources>
|
||||
<valueConverters1:IntToHexStringValueConverter x:Key="IntToHexStringValueConverter" />
|
||||
<valueConverters1:DateTimeToTimeSpanValueConverter x:Key="DateTimeToTimeSpanValueConverter" />
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<Style TargetType="{x:Type GroupBox}" BasedOn="{StaticResource {x:Type GroupBox}}">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
<Setter Property="Padding" Value="5" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<GroupBox Header="{x:Static r:Strings.Software}" Grid.Row="0" Grid.Column="0">
|
||||
<StackPanel>
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Left">
|
||||
<Label Content="{x:Static r:Strings.Product_}" />
|
||||
<Label Content="{x:Static r:Strings.Version_}" />
|
||||
<Label Content="{x:Static r:Strings.Build_Date_}" />
|
||||
</StackPanel>
|
||||
<StackPanel DockPanel.Dock="Right">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource {x:Type Label}}">
|
||||
<Setter Property="Margin" Value="10,0,0,0" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Label Content="{Binding Product}" />
|
||||
<Label Content="{Binding Version}" />
|
||||
<Label Content="{Binding BuildDate}" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<Grid Margin="5">
|
||||
<TextBlock Text="{x:Static r:Strings.Made_For_Malo}" HorizontalAlignment="Center" FontWeight="Bold"
|
||||
MouseEnter="TextBlock_MouseEnter" MouseLeave="TextBlock_MouseLeave"
|
||||
TextDecorations="Underline" />
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="{x:Static r:Strings.Project_Homepage}" Command="{Binding LaunchHomepageCommand}"
|
||||
Grid.Column="0" Margin="0,0,5,0" />
|
||||
<Button Content="{x:Static r:Strings.Check_For_Updates}" Command="{Binding CheckForUpdatesCommand}"
|
||||
Grid.Column="1" Margin="5,0,0,0" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="{x:Static r:Strings.World_Status}" Grid.Row="0" Grid.Column="1">
|
||||
<StackPanel>
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
<Setter Property="Width" Value="150" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Left">
|
||||
<Label Content="{x:Static r:Strings.Connected_}" />
|
||||
<Label Content="{x:Static r:Strings.Items_}" />
|
||||
<Label Content="{x:Static r:Strings.Mobiles_}" />
|
||||
<Label Content="{x:Static r:Strings.Latency_}" />
|
||||
</StackPanel>
|
||||
<StackPanel DockPanel.Dock="Right">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource {x:Type Label}}">
|
||||
<Setter Property="Margin" Value="10,0,0,0" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Label
|
||||
Content="{Binding ConnectedTime, Converter={StaticResource DateTimeToTimeSpanValueConverter}}"
|
||||
Visibility="{Binding Connected, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||
<Label Content="{Binding ItemCount}" />
|
||||
<Label Content="{Binding MobileCount}" />
|
||||
<Label Content="{Binding Latency}" ContentStringFormat="{}{0}ms" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<Button Content="{x:Static r:Strings.Show_World_Items}" IsEnabled="{Binding Connected}"
|
||||
Command="{Binding ShowItemsCommand}" />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="{x:Static r:Strings.Misc}" Grid.Row="1" Grid.Column="0">
|
||||
<StackPanel Margin="10">
|
||||
<Button Width="50" Background="Transparent" BorderThickness="0" Command="{Binding OpenPayPalCommand}">
|
||||
<Image Source="{StaticResource PayPalIcon}" />
|
||||
</Button>
|
||||
<TextBlock
|
||||
Text="{x:Static r:Strings.Donating_helps_support_continued_development__your_support_is_appreciated_}"
|
||||
TextWrapping="Wrap" TextAlignment="Center" />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="{x:Static r:Strings.Player}" Grid.Row="1" Grid.Column="1">
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Left">
|
||||
<Label Content="{x:Static r:Strings.Shard_}" />
|
||||
<Label Content="{x:Static r:Strings.Features_}" />
|
||||
<Label Content="{x:Static r:Strings.Name_}" />
|
||||
<Label Content="{x:Static r:Strings.Serial_}" />
|
||||
<Label Content="{x:Static r:Strings.Last_Target_}" />
|
||||
<Label Content="{x:Static r:Strings.Status_}" />
|
||||
</StackPanel>
|
||||
<StackPanel DockPanel.Dock="Right">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource {x:Type Label}}">
|
||||
<Setter Property="Margin" Value="10,0,0,0" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Label Content="{Binding ShardName}" />
|
||||
<Label Content="{Binding ShardFeatures}" />
|
||||
<Label Content="{Binding PlayerName}" />
|
||||
<Label Content="{Binding PlayerSerial, Converter={StaticResource IntToHexStringValueConverter}}" />
|
||||
<Label
|
||||
Content="{Binding LastTargetSerial, Converter={StaticResource IntToHexStringValueConverter}}" />
|
||||
<Label Content="{Binding PlayerStatus}" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,52 @@
|
||||
using System.Media;
|
||||
using System.Timers;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using ClassicAssist.Shared;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for AboutControl.xaml
|
||||
/// </summary>
|
||||
public partial class AboutControl : UserControl
|
||||
{
|
||||
private Timer _timer;
|
||||
|
||||
public AboutControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void TextBlock_MouseEnter( object sender, MouseEventArgs e )
|
||||
{
|
||||
if ( !( sender is TextBlock textBlock ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_timer = new Timer( 1000 );
|
||||
_timer.Elapsed += ( o, args ) =>
|
||||
{
|
||||
_timer.Stop();
|
||||
|
||||
if ( !textBlock.IsMouseOver )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
using ( SoundPlayer sound = new SoundPlayer( Engine.GetResourceStream( "kiss.wav" ) ) )
|
||||
{
|
||||
sound.Play();
|
||||
}
|
||||
};
|
||||
|
||||
_timer.Start();
|
||||
}
|
||||
|
||||
private void TextBlock_MouseLeave( object sender, MouseEventArgs e )
|
||||
{
|
||||
_timer?.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
<Window
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:misc1="clr-namespace:ClassicAssist.Misc"
|
||||
xmlns:valueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
|
||||
x:Class="ClassicAssist.UI.Views.ActiveObjectsWindow"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static resources:Strings.Active_Objects}" Height="350" Width="400">
|
||||
<Window.Resources>
|
||||
<valueConverters:IntToHexStringValueConverter x:Key="IntToHexStringValueConverter" />
|
||||
<misc1:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||
</Window.Resources>
|
||||
<Window.DataContext>
|
||||
<viewModels:ActiveObjectsViewModel />
|
||||
</Window.DataContext>
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TabControl>
|
||||
<TabItem Header="{x:Static resources:Strings.Aliases}">
|
||||
<TabControl>
|
||||
<TabItem Header="{x:Static resources:Strings.Global}">
|
||||
<Grid Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ListView ItemsSource="{Binding Aliases}" SelectedItem="{Binding SelectedAlias}">
|
||||
<ListView.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static resources:Strings.Remove}"
|
||||
Command="{Binding Data.RemoveAliasCommand, Source={StaticResource Proxy}}"
|
||||
CommandParameter="{Binding SelectedAlias}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Set}" Command="{Binding Data.SetAliasCommand, Source={StaticResource Proxy}}"
|
||||
CommandParameter="{Binding SelectedAlias}" />
|
||||
</ContextMenu>
|
||||
</ListView.ContextMenu>
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Name}" Width="170"
|
||||
DisplayMemberBinding="{Binding Name}" />
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Serial}" Width="170"
|
||||
DisplayMemberBinding="{Binding Serial, Converter={StaticResource IntToHexStringValueConverter}}" />
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0, 10,0,0">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="Height" Value="25" />
|
||||
<Setter Property="Padding" Value="10,0,10,0" />
|
||||
<Setter Property="Margin" Value="0,0,10,0" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Button Content="{x:Static resources:Strings.Close}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.Refresh}"
|
||||
Command="{Binding RefreshAliasesCommand}" />
|
||||
<Button Content="{x:Static resources:Strings.Clear_All_Objects}"
|
||||
Command="{Binding ClearAllAliasesCommand}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Instance}">
|
||||
<TabItem.Resources>
|
||||
<CollectionViewSource x:Key='src' Source="{Binding InstanceAliases}">
|
||||
<CollectionViewSource.GroupDescriptions>
|
||||
<PropertyGroupDescription PropertyName="Macro" />
|
||||
</CollectionViewSource.GroupDescriptions>
|
||||
</CollectionViewSource>
|
||||
</TabItem.Resources>
|
||||
<ListView ItemsSource="{Binding Source={StaticResource src}}"
|
||||
SelectedItem="{Binding SelectedInstanceAlias}" Margin="5">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Name}" Width="170"
|
||||
DisplayMemberBinding="{Binding Name}" />
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Serial}" Width="150"
|
||||
DisplayMemberBinding="{Binding Serial, Converter={StaticResource IntToHexStringValueConverter}}" />
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
<ListView.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static resources:Strings.Remove}"
|
||||
Command="{Binding Data.RemoveInstanceAliasCommand, Source={StaticResource Proxy}}"
|
||||
CommandParameter="{Binding SelectedInstanceAlias}" />
|
||||
</ContextMenu>
|
||||
</ListView.ContextMenu>
|
||||
<ListView.GroupStyle>
|
||||
<GroupStyle>
|
||||
<GroupStyle.ContainerStyle>
|
||||
<Style TargetType="{x:Type GroupItem}">
|
||||
<Setter Property="Margin" Value="0,0,0,5" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="{Binding Items/IsExpanded}"
|
||||
BorderThickness="0,0,0,0">
|
||||
<Expander.Header>
|
||||
<DockPanel>
|
||||
<TextBlock FontSize="12" Text="{Binding Path=Name}"
|
||||
Margin="5,0,0,0" Width="100" />
|
||||
</DockPanel>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
<ItemsPresenter />
|
||||
</Expander.Content>
|
||||
</Expander>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</GroupStyle.ContainerStyle>
|
||||
</GroupStyle>
|
||||
</ListView.GroupStyle>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Lists}">
|
||||
<Grid Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ListView ItemsSource="{Binding Lists}" SelectedItem="{Binding SelectedList}">
|
||||
<ListView.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static resources:Strings.Remove}"
|
||||
Command="{Binding Data.RemoveListCommand, Source={StaticResource Proxy}}"
|
||||
CommandParameter="{Binding Data.SelectedList, Source={StaticResource Proxy}}" />
|
||||
</ContextMenu>
|
||||
</ListView.ContextMenu>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Expander IsExpanded="False" Header="{Binding Name}">
|
||||
<ItemsControl ItemsSource="{Binding Serials}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Mode=OneWay}" Margin="25,0,0,0" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Expander>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0, 10,0,0">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="Height" Value="25" />
|
||||
<Setter Property="Padding" Value="10,0,10,0" />
|
||||
<Setter Property="Margin" Value="0,0,10,0" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Button Content="{x:Static resources:Strings.Close}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.Refresh}" Command="{Binding RefreshListsCommand}" />
|
||||
<Button Content="{x:Static resources:Strings.Clear_All_Objects}"
|
||||
Command="{Binding ClearAllListsCommand}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Timers}">
|
||||
<Grid Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ListView ItemsSource="{Binding Timers}" SelectedItem="{Binding SelectedTimer}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Name}" Width="170"
|
||||
DisplayMemberBinding="{Binding Name}" />
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Value}" Width="170"
|
||||
DisplayMemberBinding="{Binding Value, Converter={StaticResource IntToHexStringValueConverter}}" />
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0, 10,0,0">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="Height" Value="25" />
|
||||
<Setter Property="Padding" Value="10,0,10,0" />
|
||||
<Setter Property="Margin" Value="0,0,10,0" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Button Content="{x:Static resources:Strings.Close}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.Refresh}"
|
||||
Command="{Binding RefreshTimersCommand}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Ignore_List}">
|
||||
<Grid Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox x:Name="listBox" ItemsSource="{Binding IgnoreEntries}"
|
||||
SelectedItem="{Binding SelectedIgnoreEntry}">
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static resources:Strings.Remove}"
|
||||
Command="{Binding Data.RemoveIgnoreEntryCommand, Source={StaticResource Proxy}}"
|
||||
CommandParameter="{Binding SelectedIgnoreEntry}" />
|
||||
</ContextMenu>
|
||||
</ListBox.ContextMenu>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding StringFormat={}0x{0:x}}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0, 10,0,0">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="Height" Value="25" />
|
||||
<Setter Property="Padding" Value="10,0,10,0" />
|
||||
<Setter Property="Margin" Value="0,0,10,0" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Button Content="{x:Static resources:Strings.Close}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.Refresh}"
|
||||
Command="{Binding RefreshIgnoreListCommand}" />
|
||||
<Button Content="{x:Static resources:Strings.Clear_All}"
|
||||
Command="{Binding ClearIgnoreListCommand}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ActiveObjectsWindow.xaml
|
||||
/// </summary>
|
||||
public partial class ActiveObjectsWindow : Window
|
||||
{
|
||||
public ActiveObjectsWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.AgentsTabControl"
|
||||
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"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:agents="clr-namespace:ClassicAssist.UI.Views.Agents"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<TabControl Margin="5">
|
||||
<TabItem Header="{x:Static resources:Strings.Organizer}">
|
||||
<agents:OrganizerTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Dress}">
|
||||
<agents:DressTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Counters}">
|
||||
<agents:CountersTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Friends}">
|
||||
<agents:FriendsTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Vendor_Buy}">
|
||||
<agents:VendorBuyTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Vendor_Sell}">
|
||||
<agents:VendorSellTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Scavenger}">
|
||||
<agents:ScavengerTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Autoloot}">
|
||||
<agents:AutolootTabControl />
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for AgentsTabControl.xaml
|
||||
/// </summary>
|
||||
public partial class AgentsTabControl : UserControl
|
||||
{
|
||||
public AgentsTabControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<Window x:Class="ClassicAssist.UI.Views.Autoloot.ClilocSelectionWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:local="clr-namespace:ClassicAssist.UI.Views.Autoloot"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:autoloot="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Autoloot;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static resources:Strings.Choose_by_Cliloc}" Height="350" Width="600"
|
||||
Background="{DynamicResource ThemeWindowBackgroundBrush}" Topmost="True">
|
||||
<Window.DataContext>
|
||||
<autoloot:ClilocSelectionViewModel />
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="../../../Resources/ResourceDictionary.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox Grid.Row="0" Text="{Binding FilterText, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<ListView Grid.Row="1" Margin="0,10,0,0" ItemsSource="{Binding FilteredClilocs}"
|
||||
SelectedItem="{Binding SelectedCliloc}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Property}" Width="300"
|
||||
DisplayMemberBinding="{Binding Value}" />
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Cliloc}" Width="80"
|
||||
DisplayMemberBinding="{Binding Key}" />
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</Grid>
|
||||
<StackPanel Grid.Column="1">
|
||||
<Button Content="{x:Static resources:Strings.OK}" Margin="10,0,0,10" Command="{Binding OKCommand}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.Cancel}" Margin="10,0,0,10">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Autoloot
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ClilocSelectedWindow.xaml
|
||||
/// </summary>
|
||||
public partial class ClilocSelectionWindow : Window
|
||||
{
|
||||
public ClilocSelectionWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<Window x:Class="ClassicAssist.UI.Views.Autoloot.CustomPropertiesWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:local="clr-namespace:ClassicAssist.UI.Views.Autoloot"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:autoloot="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Autoloot;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static resources:Strings.Define_Custom_Properties}" Height="350" Width="650"
|
||||
Background="{DynamicResource ThemeWindowBackgroundBrush}" Topmost="True">
|
||||
<Window.DataContext>
|
||||
<autoloot:CustomPropertiesViewModel />
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="../../../Resources/ResourceDictionary.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListView x:Name="listView1" Grid.Column="0" Margin="10"
|
||||
ItemsSource="{Binding Properties}" SelectedItem="{Binding SelectedProperty}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Property}" Width="200"
|
||||
DisplayMemberBinding="{Binding Name}" />
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Cliloc}" Width="100"
|
||||
DisplayMemberBinding="{Binding Cliloc}" />
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Arguments}" Width="75" x:Name="ValueColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding Arguments}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.Resources>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Margin" Value="0,10, 10, 0" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<StackPanel Grid.Row="0">
|
||||
<Button Content="{x:Static resources:Strings.Choose_from_Item}"
|
||||
Command="{Binding ChooseFromItemCommand}" />
|
||||
<Button Content="{x:Static resources:Strings.Choose_by_Cliloc}"
|
||||
Command="{Binding ChooseFromClilocCommand}" />
|
||||
<Button Content="{x:Static resources:Strings.Remove}" Command="{Binding RemoveCommand}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Margin="0,0,0,10">
|
||||
<Button Content="{x:Static resources:Strings.Save}" Command="{Binding SaveCommand}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.Cancel}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Autoloot
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for CustomPropertiesWindow.xaml
|
||||
/// </summary>
|
||||
public partial class CustomPropertiesWindow : Window
|
||||
{
|
||||
public CustomPropertiesWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<Window x:Class="ClassicAssist.UI.Views.Autoloot.PropertySelectionWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:local="clr-namespace:ClassicAssist.UI.Views.Autoloot"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:autoloot="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Autoloot;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static resources:Strings.Choose_from_Item}" Height="250" Width="400"
|
||||
Background="{DynamicResource ThemeWindowBackgroundBrush}" Topmost="True">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="../../../Resources/ResourceDictionary.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<Window.DataContext>
|
||||
<autoloot:PropertySelectionViewModel />
|
||||
</Window.DataContext>
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListBox Grid.Column="0" ItemsSource="{Binding Properties}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox IsChecked="{Binding Selected}" />
|
||||
<Label Content="{Binding Name}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<StackPanel Grid.Column="1">
|
||||
<Button Content="{x:Static resources:Strings.OK}" Margin="10,0,0,10" Command="{Binding OKCommand}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.Cancel}" Margin="10,0,0,10">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Autoloot
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for PropertySelectionWindow.xaml
|
||||
/// </summary>
|
||||
public partial class PropertySelectionWindow : Window
|
||||
{
|
||||
public PropertySelectionWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
<Window x:Name="window" x:Class="ClassicAssist.UI.Views.ChatWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:viewModels="clr-namespace:ClassicAssist.UI.ViewModels"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
|
||||
xmlns:misc1="clr-namespace:ClassicAssist.Misc"
|
||||
mc:Ignorable="d"
|
||||
Title="{Binding Title}" Height="350" Width="650" Background="{DynamicResource ThemeWindowBackgroundBrush}"
|
||||
Topmost="{Binding Topmost}" WindowStyle="None" ResizeMode="CanResizeWithGrip" AllowsTransparency="True">
|
||||
<Window.DataContext>
|
||||
<viewModels:ChatViewModel />
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="../../Resources/ResourceDictionary.xaml" />
|
||||
<ResourceDictionary>
|
||||
<DrawingImage x:Key="PersonIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M-42,0 V512 H470 V-42 H0 Z">
|
||||
<DrawingGroup.Transform>
|
||||
<TranslateTransform X="42" Y="0" />
|
||||
</DrawingGroup.Transform>
|
||||
<GeometryDrawing Brush="#FFFFBB85"
|
||||
Geometry="F1 M512,512z M0,0z M333.671875,123.308594C333.671875,157.195312 321.519531,186.527344 297.546875,210.503906 273.574219,234.476562 244.238281,246.628906 210.351562,246.628906L210.292969,246.628906C176.449219,246.617188 147.132812,234.464844 123.160156,210.503906 99.183594,186.527344 87.035156,157.195312 87.035156,123.308594 87.035156,89.433594 99.183594,60.097656 123.160156,36.125 147.121094,12.160156 176.4375,0.011718799999997 210.292969,0L210.351562,0C244.226562,0 273.5625,12.152344 297.546875,36.125 321.519531,60.097656 333.671875,89.433594 333.671875,123.308594z M333.671875,123.308594" />
|
||||
<GeometryDrawing Brush="#FF6AA9FF"
|
||||
Geometry="F1 M512,512z M0,0z M427.167969,423.945312C427.167969,450.679688 418.664062,472.324219 401.914062,488.265625 385.359375,504.019531 363.464844,512 336.84375,512L90.3125,512C63.691406,512 41.796875,504.019531 25.253906,488.265625 8.492188,472.3125 0,450.671875 0,423.945312 0,413.664062 0.339844,403.492188 1.019531,393.710938 1.710938,383.710938 3.109375,372.828125 5.171875,361.347656 7.25,349.773438 9.921875,338.832031 13.121094,328.832031 16.441406,318.480469 20.933594,308.269531 26.492188,298.488281 32.265625,288.335938 39.046875,279.492188 46.648438,272.210938 54.617188,264.589844 64.359375,258.46875 75.621094,254.007812 86.84375,249.570312 99.285156,247.320312 112.597656,247.320312 117.820312,247.320312 122.878906,249.457031 132.628906,255.808594 138.730469,259.789062 145.761719,264.320312 153.523438,269.28125 160.226562,273.554688 169.304688,277.5625 180.527344,281.183594 190.390625,284.375 200.402344,286.15625 210.292969,286.464844 211.382812,286.503906 212.472656,286.523438 213.5625,286.523438 224.546875,286.523438 235.65625,284.722656 246.609375,281.183594 257.832031,277.5625 266.921875,273.554688 273.621094,269.28125 281.464844,264.269531 288.496094,259.742188 294.507812,255.820312 304.265625,249.457031 309.316406,247.320312 314.550781,247.320312 327.851562,247.320312 340.292969,249.570312 351.523438,254.007812 362.785156,258.46875 372.527344,264.601562 380.488281,272.210938 388.101562,279.492188 394.882812,288.335938 400.652344,298.488281 406.214844,308.277344 410.714844,318.480469 414.023438,328.820312 417.226562,338.832031 419.90625,349.773438 421.984375,361.355469 424.035156,372.847656 425.4375,383.730469 426.125,393.703125 426.816406,403.453125 427.15625,413.625 427.167969,423.945312z M427.167969,423.945312" />
|
||||
<GeometryDrawing Brush="#FFF5A86C"
|
||||
Geometry="F1 M512,512z M0,0z M210.351562,246.628906L210.292969,246.628906 210.292969,0 210.351562,0C244.226562,0 273.5625,12.152344 297.546875,36.125 321.519531,60.097656 333.671875,89.433594 333.671875,123.308594 333.671875,157.195312 321.519531,186.527344 297.546875,210.503906 273.574219,234.476562 244.238281,246.628906 210.351562,246.628906z M210.351562,246.628906" />
|
||||
<GeometryDrawing Brush="#FF2682FF"
|
||||
Geometry="F1 M512,512z M0,0z M427.167969,423.945312C427.167969,450.679688 418.664062,472.324219 401.914062,488.265625 385.359375,504.019531 363.464844,512 336.84375,512L210.292969,512 210.292969,286.464844C211.382812,286.503906 212.472656,286.523438 213.5625,286.523438 224.546875,286.523438 235.65625,284.722656 246.609375,281.183594 257.832031,277.5625 266.921875,273.554688 273.621094,269.28125 281.464844,264.269531 288.496094,259.742188 294.507812,255.820312 304.265625,249.457031 309.316406,247.320312 314.550781,247.320312 327.851562,247.320312 340.292969,249.570312 351.523438,254.007812 362.785156,258.46875 372.527344,264.601562 380.488281,272.210938 388.101562,279.492188 394.882812,288.335938 400.652344,298.488281 406.214844,308.277344 410.714844,318.480469 414.023438,328.820312 417.226562,338.832031 419.90625,349.773438 421.984375,361.355469 424.035156,372.847656 425.4375,383.730469 426.125,393.703125 426.816406,403.453125 427.15625,413.625 427.167969,423.945312z M427.167969,423.945312" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<misc1:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<DockPanel>
|
||||
<controls:CustomWindowTitleControl DockPanel.Dock="Top" CustomTitle="{Binding Title, ElementName=window}"
|
||||
CanClose="True">
|
||||
<controls:CustomWindowTitleControl.AdditionalContent>
|
||||
<Image Source="{DynamicResource configureIcon}" misc:ClickOpensContextMenuBehaviour.Enabled="True"
|
||||
Width="16" HorizontalAlignment="Right" Margin="0,0,80,0">
|
||||
<Image.ContextMenu>
|
||||
<ContextMenu IsOpen="False">
|
||||
<MenuItem Header="{x:Static resources:Strings.Topmost}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.(viewModels:ChatViewModel.ToggleOptionCommand)}"
|
||||
IsCheckable="True" />
|
||||
</ContextMenu>
|
||||
</Image.ContextMenu>
|
||||
</Image>
|
||||
</controls:CustomWindowTitleControl.AdditionalContent>
|
||||
|
||||
</controls:CustomWindowTitleControl>
|
||||
|
||||
<Grid Margin="10" Background="{DynamicResource ThemeBackgroundBrush}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="3" />
|
||||
<ColumnDefinition Width="220" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollViewer x:Name="ScrollViewer" Grid.Row="0">
|
||||
<ItemsControl Background="{DynamicResource ThemeBackgroundBrush}"
|
||||
ItemsSource="{Binding Messages}" ScrollViewer.VerticalScrollBarVisibility="Visible">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Margin="5" Foreground="{Binding Colour}"
|
||||
VerticalAlignment="Center" TextWrapping="WrapWithOverflow" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:ItemsControlAutoScrollBehaviour ScrollViewer="{Binding ElementName=ScrollViewer}" />
|
||||
</i:Interaction.Behaviors>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
<TextBox Grid.Row="1" KeyDown="TextBox_KeyDown" />
|
||||
</Grid>
|
||||
<GridSplitter Grid.Column="1" ResizeDirection="Columns"
|
||||
ResizeBehavior="PreviousAndNext"
|
||||
HorizontalAlignment="Stretch" />
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox Background="{DynamicResource ThemeBackgroundBrush}" ItemsSource="{Binding Users}" Grid.Row="0">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Foreground="{Binding Colour}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Orientation="Horizontal" Margin="3">
|
||||
<Image Source="{DynamicResource PersonIcon}" Height="16" />
|
||||
<TextBlock Text="{Binding Users.Count, Mode=OneWay}" Margin="3,0,0,0" />
|
||||
</StackPanel>
|
||||
<ComboBox x:Name="comboBox" Grid.Column="1" ItemsSource="{Binding Channels}"
|
||||
SelectedItem="{Binding SelectedChannel}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:ComboBoxBehavior CommandBinding="{Binding ChangeChannelCommand}"
|
||||
OnlyUserTriggered="True"
|
||||
CommandParameter="{Binding SelectedItem, ElementName=comboBox}" />
|
||||
</i:Interaction.Behaviors>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</Window>
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using ClassicAssist.Shared.UO;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ChatWindow.xaml
|
||||
/// </summary>
|
||||
public partial class ChatWindow : Window
|
||||
{
|
||||
public ChatWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
//TODO Change to command
|
||||
private void TextBox_KeyDown( object sender, KeyEventArgs e )
|
||||
{
|
||||
if ( e.Key != Key.Return && e.Key != Key.Return )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !( sender is TextBox textBox ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Commands.ChatMsg( textBox.Text );
|
||||
e.Handled = true;
|
||||
textBox.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.Debug.DebugAssembliesControl"
|
||||
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.Debug"
|
||||
xmlns:debug="clr-namespace:ClassicAssist.UI.ViewModels.Debug"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d" Background="White"
|
||||
d:DesignHeight="250" d:DesignWidth="300">
|
||||
<UserControl.DataContext>
|
||||
<debug:DebugAssembliesViewModel />
|
||||
</UserControl.DataContext>
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<DockPanel Grid.Row="0">
|
||||
<TextBlock Text="{x:Static resources:Strings.Additional_assemblies_to_load_}" DockPanel.Dock="Top" />
|
||||
<ListView x:Name="listView" Margin="0,10,0,10" ItemsSource="{Binding Items}"
|
||||
SelectedItem="{Binding SelectedItem}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Name}"
|
||||
Width="{Binding ActualWidth, ElementName=listView, Mode=OneWay}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" ToolTip="{Binding Location, Mode=OneWay}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</DockPanel>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="1">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Padding" Value="20,2,20,2" />
|
||||
<Setter Property="Margin" Value="0,0,10,0" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Button Content="{x:Static resources:Strings.Load}" Command="{Binding LoadCommand}" />
|
||||
<Button Content="{x:Static resources:Strings.Remove}" Command="{Binding RemoveCommand}"
|
||||
CommandParameter="{Binding SelectedItem, ElementName=listView}" />
|
||||
<Button Content="{x:Static resources:Strings.Save}" Command="{Binding SaveCommand}" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Debug
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DebugAssembliesControl.xaml
|
||||
/// </summary>
|
||||
public partial class DebugAssembliesControl : UserControl
|
||||
{
|
||||
public DebugAssembliesControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.Debug.DebugAutolootControl"
|
||||
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.Debug"
|
||||
xmlns:debug="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Debug;assembly=ClassicAssist.Shared"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="400" d:DesignWidth="550">
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<Setter Property="Background" Value="White" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="../Debug/DebugToolBarStyle.xaml" />
|
||||
<ResourceDictionary>
|
||||
<DrawingImage x:Key="RefreshIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V50 H50 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M50,50z M0,0z M25,5C14.351563,5 5.632813,13.378906 5.054688,23.890625 5.007813,24.609375 5.347656,25.296875 5.949219,25.695313 6.550781,26.089844 7.320313,26.132813 7.960938,25.804688 8.601563,25.476563 9.019531,24.828125 9.046875,24.109375 9.511719,15.675781 16.441406,9 25,9 29.585938,9 33.699219,10.925781 36.609375,14L34,14C33.277344,13.988281 32.609375,14.367188 32.246094,14.992188 31.878906,15.613281 31.878906,16.386719 32.246094,17.007813 32.609375,17.632813 33.277344,18.011719 34,18L40.261719,18C40.488281,18.039063,40.71875,18.039063,40.949219,18L44,18 44,8C44.007813,7.460938 43.796875,6.941406 43.414063,6.558594 43.03125,6.175781 42.511719,5.964844 41.96875,5.972656 40.867188,5.988281 39.984375,6.894531 40,8L40,11.777344C36.332031,7.621094,30.964844,5,25,5z M43.03125,23.972656C41.925781,23.925781 40.996094,24.785156 40.953125,25.890625 40.488281,34.324219 33.558594,41 25,41 20.414063,41 16.304688,39.074219 13.390625,36L16,36C16.722656,36.011719 17.390625,35.632813 17.753906,35.007813 18.121094,34.386719 18.121094,33.613281 17.753906,32.992188 17.390625,32.367188 16.722656,31.988281 16,32L9.71875,32C9.507813,31.96875,9.296875,31.96875,9.085938,32L6,32 6,42C5.988281,42.722656 6.367188,43.390625 6.992188,43.753906 7.613281,44.121094 8.386719,44.121094 9.007813,43.753906 9.632813,43.390625 10.011719,42.722656 10,42L10,38.222656C13.667969,42.378906 19.035156,45 25,45 35.648438,45 44.367188,36.621094 44.945313,26.109375 44.984375,25.570313 44.800781,25.039063 44.441406,24.636719 44.078125,24.234375 43.570313,23.996094 43.03125,23.972656z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="ContainerIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
|
||||
<DrawingGroup.Transform>
|
||||
<TranslateTransform X="0" Y="0.00013560117804445326" />
|
||||
</DrawingGroup.Transform>
|
||||
<GeometryDrawing Brush="#FFC6C5CB"
|
||||
Geometry="F1 M512,512z M0,0z M234.536,85.605L22.362,208.103 22.362,363.766 49.45,379.507 261.624,257.008 261.624,101.346 234.536,85.605z M216.743,230.876L67.682,316.936 67.682,234.236 216.508,148.311 216.743,230.876z" />
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFE0E0E2"
|
||||
Geometry="F1 M512,512z M0,0z M243.508,246.617L243.508,246.617 216.743,230.876 216.421,116.982 243.508,132.723z" />
|
||||
<GeometryDrawing Brush="#FFE0E0E2"
|
||||
Geometry="F1 M512,512z M0,0z M67.682,348.13L67.682,348.13 40.918,332.389 216.743,230.876 243.508,246.617z" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFD8D8DA"
|
||||
Geometry="F1 M512,512z M0,0z M49.449,379.508L49.449,379.508 22.362,363.765 22.362,208.103 49.449,223.845z" />
|
||||
<GeometryDrawing Brush="#FFE0E0E2"
|
||||
Geometry="F1 M512,512z M0,0z M49.449,223.845L49.449,223.845 22.362,208.103 234.536,85.605 261.623,101.346z" />
|
||||
<GeometryDrawing Brush="#FFC6C5CB"
|
||||
Geometry="F1 M512,512z M0,0z M49.449,223.845L261.623,101.346 261.623,257.008 49.449,379.508 49.449,223.845z M243.508,246.617L243.508,132.723 67.682,234.235 67.682,348.13 243.508,246.617" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFC6C5CB"
|
||||
Geometry="F1 M512,512z M0,0z M261.594,90.904C261.499,57.403 249.59,33.844 230.428,22.815 230.49,22.851 230.553,22.883 230.615,22.918L203.527,7.177C184.226,-4.04 157.511,-2.486 128.074,14.51 69.574,48.284 22.141,130.441 22.331,197.661L22.36,208.104 49.448,223.845 261.622,101.346 261.594,90.904z M215.835,75.483L215.835,75.483 75.351,156.591C89.108,113.677 119.698,71.643 155.22,51.135 172.683,41.053 188.979,37.555 202.704,39.777 209.741,48.512 214.376,60.543 215.835,75.483z" />
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFE0E0E2"
|
||||
Geometry="F1 M512,512z M0,0z M190.656,29.321L217.744,45.062C231.523,53.07,240.744,68.929,242.924,91.224L215.836,75.483C213.657,53.189,204.436,37.329,190.656,29.321z" />
|
||||
<GeometryDrawing Brush="#FFE0E0E2"
|
||||
Geometry="F1 M512,512z M0,0z M68.03,192.199L68.03,192.199 40.943,176.456 215.835,75.483 242.923,91.224z" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFD8D8DA"
|
||||
Geometry="F1 M512,512z M0,0z M49.449,223.845L49.449,223.845 22.362,208.103 22.331,197.661 49.419,213.402z" />
|
||||
<GeometryDrawing Brush="#FFE0E0E2"
|
||||
Geometry="F1 M512,512z M0,0z M203.527,7.177L230.615,22.918C211.314,11.701,184.599,13.255,155.162,30.251L128.074,14.51C157.511,-2.486,184.226,-4.04,203.527,7.177z" />
|
||||
<GeometryDrawing Brush="#FFD8D8DA"
|
||||
Geometry="F1 M512,512z M0,0z M49.419,213.402L22.331,197.661C22.141,130.441,69.574,48.283,128.073,14.51L155.161,30.251C96.662,64.026,49.229,146.183,49.419,213.402z" />
|
||||
<GeometryDrawing Brush="#FFC6C5CB"
|
||||
Geometry="F1 M512,512z M0,0z M155.161,30.251C213.66,-3.524,261.403,23.684,261.594,90.903L261.623,101.346 49.449,223.845 49.42,213.402C49.229,146.183,96.662,64.026,155.161,30.251z M68.03,192.199L242.923,91.224C238.215,43.05 200.624,24.921 155.22,51.135 109.808,77.354 72.45,138.754 68.03,192.199" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFF18700"
|
||||
Geometry="F1 M512,512z M0,0z M253.127,117.946L253.127,117.946 59.128,229.951 59.51,364.73 284.857,495.91 478.856,383.903 478.856,249.125z" />
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFFF9911"
|
||||
Geometry="F1 M512,512z M0,0z M284.857,495.91L284.857,495.91 59.51,364.73 59.128,229.951 284.857,361.131z" />
|
||||
<GeometryDrawing Brush="#FFFF9911"
|
||||
Geometry="F1 M512,512z M0,0z M284.857,361.131L284.857,361.131 59.128,229.951 253.127,117.946 478.856,249.125z" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFF18700"
|
||||
Geometry="F1 M512,512z M0,0z M478.856,249.125L478.856,249.125 478.856,383.903 284.857,495.91 284.857,361.131z" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFD8D8DA"
|
||||
Geometry="F1 M512,512z M0,0z M59.388,347.329L59.388,347.329 48.793,353.447 35.891,345.946 35.891,371.551 277.465,512 277.465,486.395 287.212,480.627z" />
|
||||
<GeometryDrawing Brush="#FFE0E0E2"
|
||||
Geometry="F1 M512,512z M0,0z M277.465,486.395L277.465,486.395 287.212,480.627 59.388,347.329 48.793,353.447z" />
|
||||
<GeometryDrawing Brush="#FFC6C5CB"
|
||||
Geometry="F1 M512,512z M0,0z M462.581,218.097L250.407,340.596 250.407,496.259 277.495,512 489.669,389.501 489.669,233.838 462.581,218.097z M444.789,363.368L295.729,449.428 295.729,366.728 444.555,280.803 444.789,363.368z" />
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFACABB1"
|
||||
Geometry="F1 M512,512z M0,0z M471.554,379.111L471.554,379.111 444.789,363.368 444.466,249.474 471.554,265.216z" />
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFD8D8DA"
|
||||
Geometry="F1 M512,512z M0,0z M295.729,480.623L295.729,480.623 268.965,464.881 444.789,363.368 471.554,379.111z" />
|
||||
<GeometryDrawing Brush="#FFD8D8DA"
|
||||
Geometry="F1 M512,512z M0,0z M277.495,512L277.495,512 250.407,496.259 250.407,340.596 277.495,356.337z" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFE0E0E2"
|
||||
Geometry="F1 M512,512z M0,0z M277.495,356.337L277.495,356.337 250.407,340.596 462.581,218.097 489.669,233.838z" />
|
||||
<GeometryDrawing Brush="#FFC6C5CB"
|
||||
Geometry="F1 M512,512z M0,0z M277.495,356.337L489.669,233.838 489.669,389.5 277.495,512 277.495,356.337z M471.554,379.111L471.554,265.216 295.729,366.729 295.729,480.623 471.554,379.111" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFF18700"
|
||||
Geometry="F1 M512,512z M0,0z M450.462,167.464C450.518,167.496,450.576,167.526,450.632,167.558L224.903,36.378C207.266,26.129 182.841,27.575 155.881,43.139 102.306,74.071 59.022,149.04 59.197,210.602L284.926,341.782 478.925,229.777C478.839,199.096,467.973,177.541,450.462,167.464z" />
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFFFA834"
|
||||
Geometry="F1 M512,512z M0,0z M224.903,36.378L450.632,167.558C432.995,157.309,408.57,158.755,381.61,174.319L155.881,43.14C182.841,27.575,207.266,26.129,224.903,36.378z" />
|
||||
<GeometryDrawing Brush="#FFFF9911"
|
||||
Geometry="F1 M512,512z M0,0z M284.927,341.783L59.197,210.603C59.023,149.041,102.306,74.071,155.881,43.14L381.61,174.32C328.035,205.251,284.752,280.221,284.927,341.783z" />
|
||||
<GeometryDrawing Brush="#FFF18700"
|
||||
Geometry="F1 M512,512z M0,0z M381.61,174.32C435.185,143.388,478.752,168.215,478.926,229.777L284.927,341.783C284.752,280.221,328.035,205.251,381.61,174.32z" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFD8D8DA"
|
||||
Geometry="F1 M512,512z M0,0z M287.863,328.139L287.863,328.139 60.039,194.841 49.951,200.666 35.891,192.492 35.891,243.702 277.465,384.151 277.465,332.943 278.639,333.605z" />
|
||||
<GeometryDrawing Brush="#FFE0E0E2"
|
||||
Geometry="F1 M512,512z M0,0z M278.639,333.605L278.639,333.605 287.863,328.139 60.039,194.841 49.968,200.657z" />
|
||||
<GeometryDrawing Brush="#FFC6C5CB"
|
||||
Geometry="F1 M512,512z M0,0z M489.64,223.397C489.545,189.896 477.636,166.336 458.474,155.308 458.536,155.344 458.599,155.376 458.66,155.411L431.572,139.67C412.271,128.453 385.556,130.007 356.119,147.003 297.62,180.777 250.187,262.934 250.378,330.153L250.407,340.596 277.495,356.337 489.669,233.838 489.64,223.397z M443.881,207.975L303.398,289.083C317.155,246.169 347.745,204.135 383.267,183.627 400.73,173.545 417.026,170.047 430.751,172.269 437.786,181.004 442.421,193.037 443.881,207.975z" />
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFACABB1"
|
||||
Geometry="F1 M512,512z M0,0z M418.702,161.814L445.79,177.555C459.569,185.563,468.79,201.422,470.97,223.717L443.882,207.976C441.703,185.681,432.481,169.821,418.702,161.814z" />
|
||||
<GeometryDrawing Brush="#FFD8D8DA"
|
||||
Geometry="F1 M512,512z M0,0z M296.076,324.691L296.076,324.691 268.989,308.95 443.881,207.975 470.969,223.717z" />
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFE0E0E2"
|
||||
Geometry="F1 M512,512z M0,0z M277.495,356.337L277.495,356.337 250.407,340.596 250.378,330.154 277.466,345.896z" />
|
||||
<GeometryDrawing Brush="#FFE0E0E2"
|
||||
Geometry="F1 M512,512z M0,0z M431.572,139.669L458.66,155.41C439.359,144.193,412.644,145.747,383.207,162.743L356.119,147.002C385.557,130.006,412.271,128.452,431.572,139.669z" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFD8D8DA"
|
||||
Geometry="F1 M512,512z M0,0z M277.466,345.896L250.378,330.155C250.188,262.936,297.62,180.777,356.119,147.004L383.207,162.745C324.708,196.518,277.275,278.675,277.466,345.896z" />
|
||||
<GeometryDrawing Brush="#FFC6C5CB"
|
||||
Geometry="F1 M512,512z M0,0z M383.207,162.743C441.706,128.968,489.449,156.176,489.64,223.395L489.669,233.838 277.495,356.337 277.466,345.894C277.275,278.675,324.708,196.518,383.207,162.743z M296.076,324.691L470.969,223.717C466.261,175.543 428.67,157.414 383.266,183.628 337.854,209.847 300.497,271.246 296.076,324.691" />
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFD8D8DA"
|
||||
Geometry="F1 M512,512z M0,0z M277.465,384.151L277.465,384.151 35.891,243.702 35.891,192.492 277.465,332.942z" />
|
||||
<GeometryDrawing Brush="#FFD8D8DA"
|
||||
Geometry="F1 M512,512z M0,0z M277.465,512L277.465,512 35.891,371.551 35.891,345.946 277.465,486.395z" />
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF898890"
|
||||
Geometry="F1 M512,512z M0,0z M126.232,246.05L126.232,246.05 113.766,253.294 113.766,302.734 156.651,327.574 169.258,320.33 169.258,270.89z" />
|
||||
<GeometryDrawing Brush="#FF898890"
|
||||
Geometry="F1 M512,512z M0,0z M156.791,278.135L156.791,278.135 169.258,270.89 169.258,320.33 156.651,327.574z" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFC6C5CB"
|
||||
Geometry="F1 M512,512z M0,0z M113.766,253.294L113.766,253.294 126.232,246.05 169.258,270.89 156.791,278.135z" />
|
||||
<GeometryDrawing Brush="#FFACABB1"
|
||||
Geometry="F1 M512,512z M0,0z M156.791,278.135L156.791,278.135 156.651,327.574 113.766,302.734 113.766,253.294z" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FF77767E"
|
||||
Geometry="F1 M512,512z M0,0z M134.399,277.238C130.349,274.9 127.05,276.773 127.037,281.426 127.028,284.73 128.674,288.545 131.079,291.315L131.05,301.748 137.601,305.53 137.63,295.097C140.035,295.103 141.698,293.199 141.707,289.896 141.721,285.242 138.449,279.575 134.399,277.238z" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="RemoveIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V512.001 H512.001 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M512.001,512.001z M0,0z M294.111,256.001L504.109,46.003C514.632,35.479 514.632,18.417 504.109,7.894 493.585,-2.63 476.522,-2.63 465.999,7.894L256,217.892 46.002,7.894C35.478,-2.63 18.416,-2.63 7.893,7.894 -2.63,18.418 -2.631,35.48 7.893,46.003L217.891,256.001 7.893,465.999C-2.631,476.523 -2.631,493.585 7.893,504.108 18.417,514.632 35.479,514.631 46.002,504.108L256,294.11 465.997,504.108C476.521,514.632 493.584,514.631 504.107,504.108 514.63,493.584 514.63,476.522 504.107,465.999L294.111,256.001z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<UserControl.DataContext>
|
||||
<debug:DebugAutolootViewModel />
|
||||
</UserControl.DataContext>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ToolBar Style="{DynamicResource ToolBarStyle1}" Grid.Row="0">
|
||||
<Button ToolTip="Test Autoloot" Command="{Binding TestContainerCommand}">
|
||||
<Image Source="{StaticResource ContainerIcon}" Height="16" />
|
||||
</Button>
|
||||
<Button ToolTip="Retest Container" Command="{Binding RetestContainerCommand}">
|
||||
<Image Source="{StaticResource RefreshIcon}" Height="16" />
|
||||
</Button>
|
||||
<Button ToolTip="{x:Static resources:Strings.Clear}" Command="{Binding ClearResultsCommand}">
|
||||
<Image Source="{StaticResource RemoveIcon}" Height="11" />
|
||||
</Button>
|
||||
</ToolBar>
|
||||
<TextBox Grid.Row="1" VerticalScrollBarVisibility="Visible" Text="{Binding TestResults}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:AutoScrollTextBoxBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</TextBox>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Debug
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DebugAutolootControl.xaml
|
||||
/// </summary>
|
||||
public partial class DebugAutolootControl : UserControl
|
||||
{
|
||||
public DebugAutolootControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.Debug.DebugBuffIconsControl"
|
||||
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.Debug"
|
||||
xmlns:debug="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Debug;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="400" d:DesignWidth="550">
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<Setter Property="Background" Value="White" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
<UserControl.DataContext>
|
||||
<debug:DebugBuffIconsViewModel />
|
||||
</UserControl.DataContext>
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="5" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListBox Grid.Column="0" MinWidth="120" Margin="0,0,5,0" ItemsSource="{Binding Items}"
|
||||
SelectedItem="{Binding SelectedItem}" />
|
||||
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" />
|
||||
<ListBox Grid.Column="2" ItemsSource="{Binding Messages}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Debug
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DebugBuffIconsControl.xaml
|
||||
/// </summary>
|
||||
public partial class DebugBuffIconsControl : UserControl
|
||||
{
|
||||
public DebugBuffIconsControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.Debug.DebugGumpControl"
|
||||
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.Debug"
|
||||
xmlns:debug="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Debug;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="400" d:DesignWidth="550">
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<Setter Property="Background" Value="White" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
<UserControl.DataContext>
|
||||
<debug:DebugGumpViewModel />
|
||||
</UserControl.DataContext>
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="5" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListBox Grid.Column="0" MinWidth="120" Margin="0,0,5,0" ItemsSource="{Binding Items}"
|
||||
SelectedItem="{Binding SelectedItem}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding ID, StringFormat={}0x{0:x8}}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" />
|
||||
<TextBox Grid.Column="2" Text="{Binding Text}" VerticalScrollBarVisibility="Auto" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Debug
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DebugGumpControl.xaml
|
||||
/// </summary>
|
||||
public partial class DebugGumpControl : UserControl
|
||||
{
|
||||
public DebugGumpControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.Debug.DebugJournalControl"
|
||||
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:debug="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Debug;assembly=ClassicAssist.Shared"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="400" d:DesignWidth="550">
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<Setter Property="Background" Value="White" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
<UserControl.DataContext>
|
||||
<debug:DebugJournalViewModel />
|
||||
</UserControl.DataContext>
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="DebugToolBarStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<DockPanel>
|
||||
<ToolBar Margin="10,0,10,0" Style="{DynamicResource ToolBarStyle1}" DockPanel.Dock="Top">
|
||||
<Button Command="{Binding ClearCommand}" Margin="0,0,5,0">
|
||||
<Image Source="{StaticResource RemoveIcon}" Height="16"
|
||||
ToolTip="{x:Static resources:Strings.Clear_All}" />
|
||||
</Button>
|
||||
</ToolBar>
|
||||
<ListBox ItemsSource="{Binding Items}" Margin="10" misc:ListBoxBehavior.ScrollOnNewItem="True" />
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Debug
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DebugJournalControl.xaml
|
||||
/// </summary>
|
||||
public partial class DebugJournalControl : UserControl
|
||||
{
|
||||
public DebugJournalControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.Debug.DebugMenusControl"
|
||||
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.Debug"
|
||||
xmlns:debug="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Debug;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="400" d:DesignWidth="550">
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<Setter Property="Background" Value="White" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
<UserControl.DataContext>
|
||||
<debug:DebugMenusViewModel />
|
||||
</UserControl.DataContext>
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="5" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListBox Grid.Column="0" MinWidth="120" Margin="0,0,5,0" ItemsSource="{Binding Items}"
|
||||
SelectedItem="{Binding SelectedItem}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding ID, StringFormat={}0x{0:x4}}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" />
|
||||
<TextBox Grid.Column="2" Text="{Binding Text}" VerticalScrollBarVisibility="Auto" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Debug
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DebugMenusControl.xaml
|
||||
/// </summary>
|
||||
public partial class DebugMenusControl : UserControl
|
||||
{
|
||||
public DebugMenusControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.Debug.DebugPropertiesControl"
|
||||
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.Debug"
|
||||
xmlns:debug="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Debug;assembly=ClassicAssist.Shared"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:valueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="DebugToolBarStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<valueConverters:JoinArrayValueConverter x:Key="JoinArrayValueConverter" />
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<UserControl.DataContext>
|
||||
<debug:DebugPropertiesViewModel />
|
||||
</UserControl.DataContext>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ToolBar Grid.Row="0" Style="{DynamicResource ToolBarStyle1}">
|
||||
<Button ToolTip="{x:Static resources:Strings.Target_object___}" Command="{Binding TargetCommand}">
|
||||
<Image Source="{StaticResource CrosshairIcon}" Height="16" />
|
||||
</Button>
|
||||
</ToolBar>
|
||||
<ListView Grid.Row="1" ItemsSource="{Binding Items}" Margin="5">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Cliloc}" Width="75"
|
||||
DisplayMemberBinding="{Binding Cliloc}" />
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Name}" Width="250"
|
||||
DisplayMemberBinding="{Binding Text}" />
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Arguments}" Width="175"
|
||||
DisplayMemberBinding="{Binding Arguments, Converter={StaticResource JoinArrayValueConverter}}" />
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace ClassicAssist.UI.Views.Debug
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DebugPropertiesControl.xaml
|
||||
/// </summary>
|
||||
public partial class DebugPropertiesControl
|
||||
{
|
||||
public DebugPropertiesControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.Debug.DebugSpecialMovesControl"
|
||||
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.Debug"
|
||||
xmlns:debug="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Debug;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="400" d:DesignWidth="550">
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<Setter Property="Background" Value="White" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
<UserControl.DataContext>
|
||||
<debug:DebugSpecialMovesViewModel />
|
||||
</UserControl.DataContext>
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="5" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListBox Grid.Column="0" MinWidth="120" Margin="0,0,5,0" ItemsSource="{Binding Items}"
|
||||
SelectedItem="{Binding SelectedItem}" />
|
||||
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" />
|
||||
<ListBox Grid.Column="2" ItemsSource="{Binding Messages}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Debug
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DebugSpecialMovesControl.xaml
|
||||
/// </summary>
|
||||
public partial class DebugSpecialMovesControl : UserControl
|
||||
{
|
||||
public DebugSpecialMovesControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,274 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary>
|
||||
<DrawingImage x:Key="RemoveIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V512.001 H512.001 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M512.001,512.001z M0,0z M294.111,256.001L504.109,46.003C514.632,35.479 514.632,18.417 504.109,7.894 493.585,-2.63 476.522,-2.63 465.999,7.894L256,217.892 46.002,7.894C35.478,-2.63 18.416,-2.63 7.893,7.894 -2.63,18.418 -2.631,35.48 7.893,46.003L217.891,256.001 7.893,465.999C-2.631,476.523 -2.631,493.585 7.893,504.108 18.417,514.632 35.479,514.631 46.002,504.108L256,294.11 465.997,504.108C476.521,514.632 493.584,514.631 504.107,504.108 514.63,493.584 514.63,476.522 504.107,465.999L294.111,256.001z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="PersonIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M-42,0 V512.001 H470 V-42 H0 Z">
|
||||
<DrawingGroup.Transform>
|
||||
<TranslateTransform X="42" Y="0" />
|
||||
</DrawingGroup.Transform>
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M512,512.001z M0,0z M210.351562,246.632812C244.234375,246.632812 273.570312,234.480469 297.546875,210.503906 321.515625,186.53125 333.671875,157.199219 333.671875,123.3125 333.671875,89.4375 321.519531,60.101562 297.542969,36.121094 273.566406,12.152344 244.230469,0 210.351562,0 176.464844,0 147.132812,12.152344 123.160156,36.125 99.1875,60.097656 87.03125,89.433594 87.03125,123.3125 87.03125,157.199219 99.1875,186.535156 123.160156,210.507812 147.140625,234.476562 176.476562,246.632812 210.351562,246.632812z M144.378906,57.339844C162.773438,38.945312 184.351562,30.003906 210.351562,30.003906 236.347656,30.003906 257.929688,38.945312 276.328125,57.339844 294.722656,75.738281 303.667969,97.320312 303.667969,123.3125 303.667969,149.3125 294.722656,170.890625 276.328125,189.289062 257.929688,207.6875 236.347656,216.628906 210.351562,216.628906 184.359375,216.628906 162.78125,207.683594 144.378906,189.289062 125.980469,170.894531 117.035156,149.3125 117.035156,123.3125 117.035156,97.320312 125.980469,75.738281 144.378906,57.339844z M144.378906,57.339844" />
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M512,512.001z M0,0z M426.128906,393.703125C425.4375,383.726562 424.039062,372.84375 421.980469,361.351562 419.902344,349.773438 417.226562,338.828125 414.023438,328.824219 410.710938,318.484375 406.214844,308.273438 400.648438,298.488281 394.878906,288.332031 388.097656,279.488281 380.488281,272.210938 372.53125,264.597656 362.789062,258.476562 351.523438,254.011719 340.296875,249.570312 327.855469,247.320312 314.546875,247.320312 309.320312,247.320312 304.265625,249.464844 294.503906,255.820312 288.496094,259.738281 281.46875,264.269531 273.625,269.28125 266.917969,273.554688 257.832031,277.558594 246.609375,281.183594 235.660156,284.726562 224.542969,286.523438 213.566406,286.523438 202.597656,286.523438 191.480469,284.726562 180.523438,281.183594 169.3125,277.5625 160.222656,273.558594 153.527344,269.285156 145.757812,264.320312 138.726562,259.789062 132.628906,255.816406 122.875,249.460938 117.820312,247.316406 112.59375,247.316406 99.28125,247.316406 86.84375,249.570312 75.621094,254.015625 64.363281,258.472656 54.617188,264.59375 46.652344,272.214844 39.042969,279.496094 32.261719,288.335938 26.496094,298.488281 20.9375,308.273438 16.4375,318.480469 13.125,328.828125 9.925781,338.832031 7.25,349.773438 5.171875,361.351562 3.109375,372.828125 1.714844,383.714844 1.023438,393.714844 0.34375,403.492188 -4.44089209850063E-16,413.667969 -4.44089209850063E-16,423.949219 -4.44089209850063E-16,450.675781 8.496094,472.3125 25.25,488.269531 41.796875,504.015625 63.6875,512 90.316406,512L336.847656,512C363.46875,512 385.359375,504.015625 401.910156,488.269531 418.667969,472.324219 427.164062,450.679688 427.164062,423.945312 427.160156,413.628906 426.8125,403.453125 426.128906,393.703125z M381.222656,466.53125C370.289062,476.9375,355.773438,481.996094,336.84375,481.996094L90.316406,481.996094C71.382812,481.996094 56.867188,476.9375 45.9375,466.535156 35.214844,456.328125 30.003906,442.394531 30.003906,423.949219 30.003906,414.355469 30.320312,404.882812 30.953125,395.789062 31.570312,386.867188 32.832031,377.066406 34.703125,366.652344 36.550781,356.367188 38.902344,346.714844 41.699219,337.976562 44.382812,329.597656 48.042969,321.300781 52.582031,313.308594 56.914062,305.691406 61.898438,299.15625 67.398438,293.890625 72.542969,288.964844 79.027344,284.933594 86.667969,281.910156 93.734375,279.113281 101.675781,277.582031 110.296875,277.351562 111.347656,277.910156 113.21875,278.976562 116.25,280.953125 122.417969,284.972656 129.527344,289.558594 137.386719,294.578125 146.246094,300.226562 157.660156,305.328125 171.296875,309.730469 185.238281,314.238281 199.457031,316.527344 213.570312,316.527344 227.683594,316.527344 241.90625,314.238281 255.839844,309.734375 269.488281,305.324219 280.898438,300.226562 289.769531,294.570312 297.8125,289.429688 304.722656,284.976562 310.890625,280.953125 313.921875,278.980469 315.792969,277.910156 316.84375,277.351562 325.46875,277.582031 333.410156,279.113281 340.480469,281.910156 348.117188,284.933594 354.601562,288.96875 359.746094,293.890625 365.246094,299.152344 370.230469,305.6875 374.5625,313.3125 379.105469,321.300781 382.769531,329.601562 385.449219,337.972656 388.25,346.722656 390.605469,356.371094 392.449219,366.648438 394.316406,377.082031 395.582031,386.886719 396.199219,395.792969L396.199219,395.800781C396.835938,404.859375 397.15625,414.328125 397.160156,423.949219 397.15625,442.398438 391.945312,456.328125 381.222656,466.53125z M381.222656,466.53125" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="exportIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V502 H502 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M502,502z M0,0z M491.951,414.346L425.581,347.976C418.61,341.006 408.221,338.94 399.113,342.712 390.005,346.484 384.12,355.292 384.12,365.15L384.12,375.13C384.12,377.494,382.197,379.417,379.833,379.417L373.12,379.417 373.12,103C373.12,100.348,372.066,97.804,370.191,95.929L277.191,2.929C275.316,1.054,272.772,0,270.12,0L17.12,0C11.597,0,7.12,4.477,7.12,10L7.12,492C7.12,497.523,11.597,502,17.12,502L363.12,502C368.643,502,373.12,497.523,373.12,492L373.12,463.417 379.833,463.417C382.197,463.417,384.12,465.34,384.12,467.704L384.12,477.684C384.12,487.542 390.005,496.35 399.113,500.122 402.136,501.374 405.299,501.983 408.432,501.983 414.74,501.983 420.924,499.514 425.581,494.858L491.951,428.488C493.826,426.613 494.88,424.069 494.88,421.417 494.88,418.765 493.826,416.221 491.951,414.346z M280.12,34.142L338.978,93 280.12,93 280.12,34.142z M353.12,482L27.12,482 27.12,20 260.12,20 260.12,103C260.12,108.523,264.597,113,270.12,113L353.12,113 353.12,379.417 332.12,379.417C326.597,379.417,322.12,383.894,322.12,389.417L322.12,453.417C322.12,458.94,326.597,463.417,332.12,463.417L353.12,463.417 353.12,482z M411.438,480.716C409.676,482.479 407.755,482.054 406.766,481.645 405.778,481.235 404.12,480.177 404.12,477.684L404.12,467.704C404.12,454.312,393.225,443.417,379.833,443.417L342.12,443.417 342.12,399.417 379.833,399.417C393.225,399.417,404.12,388.522,404.12,375.13L404.12,365.15C404.12,362.658 405.778,361.599 406.766,361.19 407.754,360.78 409.676,360.356 411.438,362.119L470.737,421.417 411.438,480.716z" />
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M502,502z M0,0z M77.62,174L243.12,174C248.643,174 253.12,169.523 253.12,164 253.12,158.477 248.643,154 243.12,154L77.62,154C72.097,154 67.62,158.477 67.62,164 67.62,169.523 72.097,174 77.62,174z" />
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M502,502z M0,0z M302.62,220L77.62,220C72.097,220 67.62,224.477 67.62,230 67.62,235.523 72.097,240 77.62,240L302.62,240C308.143,240 312.62,235.523 312.62,230 312.62,224.477 308.143,220 302.62,220z" />
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M502,502z M0,0z M302.62,286L77.62,286C72.097,286 67.62,290.477 67.62,296 67.62,301.523 72.097,306 77.62,306L302.62,306C308.143,306 312.62,301.523 312.62,296 312.62,290.477 308.143,286 302.62,286z" />
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M502,502z M0,0z M302.62,352L77.62,352C72.097,352 67.62,356.477 67.62,362 67.62,367.523 72.097,372 77.62,372L302.62,372C308.143,372 312.62,367.523 312.62,362 312.62,356.477 308.143,352 302.62,352z" />
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M502,502z M0,0z M302.62,154L280.62,154C275.097,154 270.62,158.477 270.62,164 270.62,169.523 275.097,174 280.62,174L302.62,174C308.143,174 312.62,169.523 312.62,164 312.62,158.477 308.143,154 302.62,154z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary>
|
||||
<SolidColorBrush x:Key="ToolBarHorizontalBackground" Color="#FFEEF5FD" />
|
||||
<SolidColorBrush x:Key="ToolBarToggleButtonVerticalBackground" Color="#FFEEF5FD" />
|
||||
<SolidColorBrush x:Key="ToolBarButtonHover" Color="#210080FF" />
|
||||
<SolidColorBrush x:Key="ToolBarGripper" Color="#FF6D6D6D" />
|
||||
<Style x:Key="ToolBarVerticalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
<Setter Property="MinWidth" Value="0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,0,3,3"
|
||||
Background="{TemplateBinding Background}">
|
||||
<Canvas Width="7" VerticalAlignment="Bottom" SnapsToDevicePixels="true"
|
||||
Margin="2,7,2,2" Height="6" HorizontalAlignment="Right">
|
||||
<Path Data="M 1.5 1 L 1.5 6" Stroke="White" />
|
||||
<Path Data="M 0.5 0 L 0.5 5" Stroke="{TemplateBinding Foreground}" />
|
||||
<Path Data="M 3.5 0.5 L 7 3.5 L 4 6.5 Z" Fill="White" />
|
||||
<Path Data="M 3 -0.5 L 6 2.5 L 3 5.5 Z" Fill="{TemplateBinding Foreground}" />
|
||||
</Canvas>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd"
|
||||
Value="{StaticResource ToolBarButtonHover}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd"
|
||||
Value="{StaticResource ToolBarButtonHover}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{StaticResource ToolBarGripper}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ToolBarVerticalBackground" Color="#FFEEF5FD" />
|
||||
<SolidColorBrush x:Key="ToolBarToggleButtonHorizontalBackground" Color="#FFEEF5FD" />
|
||||
<Style x:Key="ToolBarHorizontalOverflowButtonStyle" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
<Setter Property="MinWidth" Value="0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Border x:Name="Bd" SnapsToDevicePixels="true" CornerRadius="0,3,3,0"
|
||||
Background="{TemplateBinding Background}">
|
||||
<Canvas Width="6" VerticalAlignment="Bottom" SnapsToDevicePixels="true"
|
||||
Margin="7,2,2,2" Height="7" HorizontalAlignment="Right">
|
||||
<Path Data="M 1 1.5 L 6 1.5" Stroke="White" />
|
||||
<Path Data="M 0 0.5 L 5 0.5" Stroke="{TemplateBinding Foreground}" />
|
||||
<Path Data="M 0.5 4 L 6.5 4 L 3.5 7 Z" Fill="White" />
|
||||
<Path Data="M -0.5 3 L 5.5 3 L 2.5 6 Z" Fill="{TemplateBinding Foreground}" />
|
||||
</Canvas>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd"
|
||||
Value="{StaticResource ToolBarButtonHover}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd"
|
||||
Value="{StaticResource ToolBarButtonHover}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{StaticResource ToolBarGripper}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ToolBarMenuBorder" Color="#FFB6BDC5" />
|
||||
<SolidColorBrush x:Key="ToolBarSubMenuBackground" Color="#FFEEF5FD" />
|
||||
<Style x:Key="ToolBarThumbStyle" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border SnapsToDevicePixels="True" Padding="{TemplateBinding Padding}"
|
||||
Background="Transparent">
|
||||
<Rectangle>
|
||||
<Rectangle.Fill>
|
||||
<DrawingBrush ViewboxUnits="Absolute" ViewportUnits="Absolute"
|
||||
Viewport="0,0,4,4" Viewbox="0,0,4,4" TileMode="Tile">
|
||||
<DrawingBrush.Drawing>
|
||||
<DrawingGroup>
|
||||
<GeometryDrawing Brush="White" Geometry="M 1 1 L 1 3 L 3 3 L 3 1 z" />
|
||||
<GeometryDrawing Brush="{StaticResource ToolBarGripper}"
|
||||
Geometry="M 0 0 L 0 2 L 2 2 L 2 0 z" />
|
||||
</DrawingGroup>
|
||||
</DrawingBrush.Drawing>
|
||||
</DrawingBrush>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Cursor" Value="SizeAll" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ToolBarMainPanelBorderStyle" TargetType="{x:Type Border}">
|
||||
<Setter Property="Margin" Value="0,0,11,0" />
|
||||
<Setter Property="CornerRadius" Value="3,3,3,3" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true">
|
||||
<Setter Property="CornerRadius" Value="0,0,0,0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="ToolBarStyle1" TargetType="{x:Type ToolBar}">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToolBar}">
|
||||
<Grid x:Name="Grid" Margin="3,1,1,1" SnapsToDevicePixels="true">
|
||||
<Grid x:Name="OverflowGrid" HorizontalAlignment="Right">
|
||||
<ToggleButton x:Name="OverflowButton" ClickMode="Press" FocusVisualStyle="{x:Null}"
|
||||
IsChecked="{Binding IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
IsEnabled="{TemplateBinding HasOverflowItems}"
|
||||
Style="{StaticResource ToolBarHorizontalOverflowButtonStyle}" />
|
||||
<Popup x:Name="OverflowPopup" AllowsTransparency="true" Focusable="false"
|
||||
IsOpen="{Binding IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
|
||||
Placement="Bottom" StaysOpen="false">
|
||||
<Border x:Name="ToolBarSubMenuBorder"
|
||||
BorderBrush="{StaticResource ToolBarMenuBorder}"
|
||||
BorderThickness="1"
|
||||
Background="{StaticResource ToolBarSubMenuBackground}"
|
||||
RenderOptions.ClearTypeHint="Enabled">
|
||||
<ToolBarOverflowPanel x:Name="PART_ToolBarOverflowPanel"
|
||||
KeyboardNavigation.DirectionalNavigation="Cycle"
|
||||
FocusVisualStyle="{x:Null}" Focusable="true"
|
||||
Margin="2"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
KeyboardNavigation.TabNavigation="Cycle"
|
||||
WrapWidth="200" />
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
<Border x:Name="MainPanelBorder" BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}"
|
||||
Style="{StaticResource ToolBarMainPanelBorderStyle}" HorizontalAlignment="Left"
|
||||
Margin="0" Width="532.6">
|
||||
<DockPanel KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local">
|
||||
<Thumb x:Name="ToolBarThumb" Margin="-3,-1,0,0" Padding="6,5,1,6"
|
||||
Style="{StaticResource ToolBarThumbStyle}" Width="10"
|
||||
Visibility="Collapsed" />
|
||||
<ContentPresenter x:Name="ToolBarHeader" ContentSource="Header"
|
||||
HorizontalAlignment="Center" Margin="4,0,4,0"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="Center" />
|
||||
<ToolBarPanel x:Name="PART_ToolBarPanel" IsItemsHost="true" Margin="0,1,2,2"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsOverflowOpen" Value="true">
|
||||
<Setter Property="IsEnabled" TargetName="ToolBarThumb" Value="false" />
|
||||
</Trigger>
|
||||
<Trigger Property="Header" Value="{x:Null}">
|
||||
<Setter Property="Visibility" TargetName="ToolBarHeader" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="ToolBarTray.IsLocked" Value="true">
|
||||
<Setter Property="Visibility" TargetName="ToolBarThumb" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="Orientation" Value="Vertical">
|
||||
<Setter Property="Margin" TargetName="Grid" Value="1,3,1,1" />
|
||||
<Setter Property="Style" TargetName="OverflowButton"
|
||||
Value="{StaticResource ToolBarVerticalOverflowButtonStyle}" />
|
||||
<Setter Property="Height" TargetName="ToolBarThumb" Value="10" />
|
||||
<Setter Property="Width" TargetName="ToolBarThumb" Value="Auto" />
|
||||
<Setter Property="Margin" TargetName="ToolBarThumb" Value="-1,-3,0,0" />
|
||||
<Setter Property="Padding" TargetName="ToolBarThumb" Value="5,6,6,1" />
|
||||
<Setter Property="Margin" TargetName="ToolBarHeader" Value="0,0,0,4" />
|
||||
<Setter Property="Margin" TargetName="PART_ToolBarPanel" Value="1,0,2,2" />
|
||||
<Setter Property="DockPanel.Dock" TargetName="ToolBarThumb" Value="Top" />
|
||||
<Setter Property="DockPanel.Dock" TargetName="ToolBarHeader" Value="Top" />
|
||||
<Setter Property="HorizontalAlignment" TargetName="OverflowGrid" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" TargetName="OverflowGrid" Value="Bottom" />
|
||||
<Setter Property="Placement" TargetName="OverflowPopup" Value="Right" />
|
||||
<Setter Property="Margin" TargetName="MainPanelBorder" Value="0,0,0,11" />
|
||||
<Setter Property="Background" Value="{StaticResource ToolBarVerticalBackground}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground"
|
||||
Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="true">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,20 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.Debug.DebugVendorBuyControl"
|
||||
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.Debug"
|
||||
xmlns:debug="clr-namespace:ClassicAssist.Shared.UI.ViewModels.Debug;assembly=ClassicAssist.Shared"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.DataContext>
|
||||
<debug:DebugVendorBuyViewModel />
|
||||
</UserControl.DataContext>
|
||||
<DockPanel Margin="10">
|
||||
<CheckBox IsChecked="{Binding IsEnabled}" Content="{x:Static resources:Strings.Enabled}" DockPanel.Dock="Top"
|
||||
Margin="0,0,0,10" />
|
||||
<ListBox ItemsSource="{Binding Messages}" misc:ListBoxBehavior.ScrollOnNewItem="True" />
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Debug
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DebugVendorBuyControl.xaml
|
||||
/// </summary>
|
||||
public partial class DebugVendorBuyControl : UserControl
|
||||
{
|
||||
public DebugVendorBuyControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
<Window
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:local="clr-namespace:ClassicAssist.UI.Views"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.Shared.UI.ViewModels;assembly=ClassicAssist.Shared"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:debug="clr-namespace:ClassicAssist.UI.Views.Debug"
|
||||
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls" x:Name="window"
|
||||
x:Class="ClassicAssist.UI.Views.DebugWindow"
|
||||
mc:Ignorable="d"
|
||||
Title="Debug Window" Height="450" Width="600" Topmost="{Binding Topmost}">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Debug/DebugToolBarStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<Window.DataContext>
|
||||
<viewModels:DebugViewModel />
|
||||
</Window.DataContext>
|
||||
<TabControl Margin="10">
|
||||
<TabItem Header="{x:Static resources:Strings.Main}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ToolBar Grid.Row="0" Margin="10,0,10,0" Style="{DynamicResource ToolBarStyle1}">
|
||||
<Button Command="{Binding ClearCommand}" Margin="0,0,5,0">
|
||||
<Image Source="{StaticResource RemoveIcon}" Height="16"
|
||||
ToolTip="{x:Static resources:Strings.Clear_All}" />
|
||||
</Button>
|
||||
<Button Command="{Binding ViewPlayerEquipmentCommand}" Margin="0,0,5,0">
|
||||
<Image Source="{StaticResource PersonIcon}" Height="16" ToolTip="View Player Equipment" />
|
||||
</Button>
|
||||
<Button Command="{Binding ExportLogCommand}" CommandParameter="{Binding Items}" Margin="0,0,5,0">
|
||||
<Image Source="{StaticResource exportIcon}" Height="16"
|
||||
ToolTip="{x:Static resources:Strings.Save}" />
|
||||
</Button>
|
||||
<TextBlock Text="{x:Static resources:Strings.Enabled_Packets_}" Margin="0,0,10,0"
|
||||
VerticalAlignment="Center" />
|
||||
<ComboBox ItemsSource="{Binding PacketEntries}" Width="100" BorderThickness="1">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox Content="{Binding Name}" IsChecked="{Binding Enabled}"
|
||||
Command="{Binding DataContext.ChangePacketEnabledCommand, ElementName=window}"
|
||||
CommandParameter="{Binding}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</ToolBar>
|
||||
<ListBox ItemsSource="{Binding Items}" Margin="10" Grid.Row="1"
|
||||
misc:ListBoxBehavior.ScrollOnNewItem="true">
|
||||
<ListBox.ItemTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<controls:HexDumpControl Packet="{Binding}" />
|
||||
</ItemContainerTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="2" Margin="10,0,10,10">
|
||||
<CheckBox Content="{x:Static resources:Strings.Capture_Packets}" VerticalAlignment="Center"
|
||||
Margin="0,0,10,0" IsChecked="{Binding Running}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Topmost}" VerticalAlignment="Center"
|
||||
Margin="0,0,10,0"
|
||||
IsChecked="{Binding Topmost}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Gumps}">
|
||||
<debug:DebugGumpControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Menus}">
|
||||
<debug:DebugMenusControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.BuffIcon}">
|
||||
<debug:DebugBuffIconsControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Special_Moves}">
|
||||
<debug:DebugSpecialMovesControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Vendor_Buy}">
|
||||
<debug:DebugVendorBuyControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Autoloot}">
|
||||
<debug:DebugAutolootControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Property}">
|
||||
<debug:DebugPropertiesControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Journal}">
|
||||
<debug:DebugJournalControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static resources:Strings.Additional_Assemblies}">
|
||||
<debug:DebugAssembliesControl />
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for PacketLogWindow.xaml
|
||||
/// </summary>
|
||||
public partial class DebugWindow : Window
|
||||
{
|
||||
public DebugWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
<UserControl x:Name="userControl" x:Class="ClassicAssist.UI.Views.EntityCollectionFilterControl"
|
||||
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:controls="clr-namespace:ClassicAssist.UI.Controls"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:autoloot="clr-namespace:ClassicAssist.Data.Autoloot"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="200" d:DesignWidth="400"
|
||||
DataContext="{Binding Mode=OneWay, RelativeSource={RelativeSource Self}}" Background="White">
|
||||
<UserControl.Resources>
|
||||
<DrawingImage x:Key="PlusIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M512,512z M0,0z M492,236L276,236 276,20C276,8.954 267.046,0 256,0 244.954,0 236,8.954 236,20L236,236 20,236C8.954,236 0,244.954 0,256 0,267.046 8.954,276 20,276L236,276 236,492C236,503.046 244.954,512 256,512 267.046,512 276,503.046 276,492L276,276 492,276C503.046,276 512,267.046 512,256 512,244.954 503.046,236 492,236z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="MinusIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M512,512z M0,0z M492,236L20,236C8.954,236 0,244.954 0,256 0,267.046 8.954,276 20,276L492,276C503.046,276 512,267.046 512,256 512,244.954 503.046,236 492,236z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="OpenIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,-24 V391 H415.32856 V0 H-24 Z">
|
||||
<DrawingGroup.Transform>
|
||||
<TranslateTransform X="0" Y="24" />
|
||||
</DrawingGroup.Transform>
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M415.32856,415z M0,0z M368.328125,130.164062L341.9375,130.164062 341.9375,88.519531C341.902344,61.21875,319.78125,39.09375,292.476562,39.0625L223.089844,39.0625C215.125,39.066406,207.429688,36.183594,201.425781,30.957031L179.316406,11.710938C170.757812,4.265625,159.800781,0.164062000000003,148.457031,0.164062000000003L49.457031,0.164062000000003C22.15625,0.195312000000003,0.03125,22.320312,0,49.621094L0,310.375C0.0351562,340.632812,23.714844,365.589844,53.929688,367.214844L53.929688,367.292969 334.132812,367.292969C356.507812,367.25,375.769531,351.472656,380.210938,329.539062L414.378906,186.539062 414.4375,186.269531C417.164062,172.476562 413.566406,158.1875 404.640625,147.324219 395.710938,136.460938 382.390625,130.164062 368.328125,130.164062z M14.003906,310.375L14.003906,49.621094C14.027344,30.046875,29.886719,14.1875,49.460938,14.164062L148.460938,14.164062C156.425781,14.164062,164.121094,17.042969,170.128906,22.273438L192.238281,41.515625C200.792969,48.960938,211.75,53.0625,223.089844,53.0625L292.476562,53.0625C312.050781,53.085938,327.914062,68.949219,327.9375,88.523438L327.9375,130.164062 321.285156,130.164062C317.890625,112.023438,302.066406,98.863281,283.609375,98.835938L281.296875,98.835938C277.894531,80.320312,261.765625,66.863281,242.9375,66.835938L81.9374999999999,66.835938C55.9921879999999,66.867188,34.9648439999999,87.890625,34.9374999999999,113.835938L34.9374999999999,347.214844C21.9609379999999,339.472656,14.0117189999999,325.480469,14.0039059999999,310.375z M283.609375,112.835938C294.34375,112.847656,303.808594,119.882812,306.910156,130.164062L188.015625,130.164062C166.269531,130.097656,147.34375,145.011719,142.316406,166.167969L98.757812,319.980469 98.679688,320.273438C97.042969,327.230469,93.695312,333.667969,88.9375,339L88.9375,145.835938C88.957031,127.617188,103.722656,112.855469,121.9375,112.835938z M48.9375,352.535156L48.9375,113.835938C48.957031,95.617188,63.722656,80.855469,81.9375,80.835938L242.9375,80.835938C254.042969,80.847656,263.816406,88.175781,266.9375,98.835938L121.9375,98.835938C95.992188,98.863281,74.96875,119.890625,74.9375,145.835938L74.9375,349.355469C66.8125,353.09375,57.722656,354.203125,48.9375,352.535156z M400.730469,183.425781L366.566406,326.414062 366.507812,326.6875C363.425781,342.132812,349.878906,353.261719,334.132812,353.292969L94.390625,353.292969C103.289062,345.511719,109.539062,335.152344,112.269531,323.652344L155.828125,169.84375 155.90625,169.550781C159.394531,154.648438,172.707031,144.121094,188.015625,144.164062L368.328125,144.164062C378.179688,144.164062 387.511719,148.5625 393.78125,156.160156 400.050781,163.757812 402.597656,173.757812 400.730469,183.429688z M400.730469,183.425781" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="SaveIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V64 H64 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M64,64z M0,0z M61.707,10.293L53.707,2.293A1,1,0,0,0,53,2L7,2A5.006,5.006,0,0,0,2,7L2,57A5.006,5.006,0,0,0,7,62L57,62A5.006,5.006,0,0,0,62,57L62,11A1,1,0,0,0,61.707,10.293z M48,4L48,20A1,1,0,0,1,47,21L17,21A1,1,0,0,1,16,20L16,4z M10,60L10,35A3,3,0,0,1,13,32L51,32A3,3,0,0,1,54,35L54,60z M60,57A3,3,0,0,1,57,60L56,60 56,35A5.006,5.006,0,0,0,51,30L13,30A5.006,5.006,0,0,0,8,35L8,60 7,60A3,3,0,0,1,4,57L4,7A3,3,0,0,1,7,4L14,4 14,20A3,3,0,0,0,17,23L47,23A3,3,0,0,0,50,20L50,4 52.586,4 60,11.414z" />
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M64,64z M0,0z M39,19L45,19A1,1,0,0,0,46,18L46,7A1,1,0,0,0,45,6L39,6A1,1,0,0,0,38,7L38,18A1,1,0,0,0,39,19z M40,8L44,8 44,17 40,17z" />
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M64,64z M0,0z M47,45L17,45A1,1,0,0,0,17,47L47,47A1,1,0,0,0,47,45z" />
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M64,64z M0,0z M47,39L17,39A1,1,0,0,0,17,41L47,41A1,1,0,0,0,47,39z" />
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M64,64z M0,0z M47,51L17,51A1,1,0,0,0,17,53L47,53A1,1,0,0,0,47,51z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
</UserControl.Resources>
|
||||
<UserControl.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static resources:Strings.Save}" Command="{Binding SaveFilterCommand}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Load}" Command="{Binding LoadFilterCommand}" />
|
||||
</ContextMenu>
|
||||
</UserControl.ContextMenu>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ListView x:Name="listView" Margin="10" Grid.Row="0" ItemsSource="{Binding Items}"
|
||||
SelectedItem="{Binding SelectedItem}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Property}" Width="220" x:Name="NameColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ComboBox SelectedItem="{Binding Constraint}"
|
||||
ItemsSource="{Binding Constraints, ElementName=userControl}" Width="200" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<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="GridViewColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBox
|
||||
Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
MinWidth="40" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="+/-">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Command="{Binding AddCommand, ElementName=userControl}">
|
||||
<Image Source="{StaticResource PlusIcon}" Height="8" />
|
||||
</Button>
|
||||
<Button Command="{Binding RemoveCommand, ElementName=userControl}"
|
||||
CommandParameter="{Binding Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}}"
|
||||
Margin="5,0,0,0">
|
||||
<Image Source="{StaticResource MinusIcon}" Height="8" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" Margin="10,0,10,10">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Padding" Value="20,0,20,0" />
|
||||
<Setter Property="Margin" Value="10,0,0,0" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Button Content="{x:Static resources:Strings.Apply}" Command="{Binding ApplyCommand}" />
|
||||
<Button Content="{x:Static resources:Strings.Reset}" Command="{Binding ResetCommand}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,259 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using ClassicAssist.Shared;
|
||||
using ClassicAssist.Annotations;
|
||||
using ClassicAssist.Data.Autoloot;
|
||||
using ClassicAssist.Misc;
|
||||
using ClassicAssist.Shared.Resources;
|
||||
using ClassicAssist.UI.Models;
|
||||
using ClassicAssist.UI.ViewModels;
|
||||
using Microsoft.Win32;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for EntityCollectionFilterControl.xaml
|
||||
/// </summary>
|
||||
public partial class EntityCollectionFilterControl : INotifyPropertyChanged
|
||||
{
|
||||
public static readonly DependencyProperty CommandProperty = DependencyProperty.Register( nameof( Command ),
|
||||
typeof( ICommand ), typeof( EntityCollectionFilterControl ),
|
||||
new FrameworkPropertyMetadata( default( ICommand ) ) );
|
||||
|
||||
private readonly string _propertiesFileCustom =
|
||||
Path.Combine( Engine.StartupPath ?? Environment.CurrentDirectory, "Data", "Properties.Custom.json" );
|
||||
|
||||
private ICommand _addCommand;
|
||||
|
||||
private ICommand _applyCommand;
|
||||
|
||||
private ObservableCollection<PropertyEntry> _constraints = new ObservableCollection<PropertyEntry>();
|
||||
|
||||
private ObservableCollection<EntityCollectionFilter>
|
||||
_items = new ObservableCollection<EntityCollectionFilter>();
|
||||
|
||||
private ICommand _loadFilterCommand;
|
||||
private ICommand _removeCommand;
|
||||
private ICommand _resetCommand;
|
||||
private ICommand _saveFilterCommand;
|
||||
|
||||
public EntityCollectionFilterControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
string constraintsFile = Path.Combine( Engine.StartupPath ?? Environment.CurrentDirectory, "Data",
|
||||
"Properties.json" );
|
||||
|
||||
if ( !File.Exists( constraintsFile ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
|
||||
using ( StreamReader sr = new StreamReader( constraintsFile ) )
|
||||
{
|
||||
using ( JsonTextReader reader = new JsonTextReader( sr ) )
|
||||
{
|
||||
PropertyEntry[] constraints = serializer.Deserialize<PropertyEntry[]>( reader );
|
||||
|
||||
foreach ( PropertyEntry constraint in constraints )
|
||||
{
|
||||
Constraints.AddSorted( constraint );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( File.Exists( _propertiesFileCustom ) )
|
||||
{
|
||||
LoadCustomProperties();
|
||||
}
|
||||
|
||||
Items.Add( new EntityCollectionFilter { Constraint = Constraints.FirstOrDefault() } );
|
||||
}
|
||||
|
||||
public ICommand AddCommand => _addCommand ?? ( _addCommand = new RelayCommand( AddItem, o => true ) );
|
||||
public ICommand ApplyCommand => _applyCommand ?? ( _applyCommand = new RelayCommand( Apply, o => true ) );
|
||||
|
||||
public ICommand Command
|
||||
{
|
||||
get => (ICommand) GetValue( CommandProperty );
|
||||
set => SetValue( CommandProperty, value );
|
||||
}
|
||||
|
||||
public ObservableCollection<PropertyEntry> Constraints
|
||||
{
|
||||
get => _constraints;
|
||||
set => SetProperty( ref _constraints, value );
|
||||
}
|
||||
|
||||
public ObservableCollection<EntityCollectionFilter> Items
|
||||
{
|
||||
get => _items;
|
||||
set => SetProperty( ref _items, value );
|
||||
}
|
||||
|
||||
public ICommand LoadFilterCommand =>
|
||||
_loadFilterCommand ?? ( _loadFilterCommand = new RelayCommand( LoadFilter, o => true ) );
|
||||
|
||||
public ICommand RemoveCommand =>
|
||||
_removeCommand ?? ( _removeCommand = new RelayCommand( Remove, o => Items.Count > 1 ) );
|
||||
|
||||
public ICommand ResetCommand => _resetCommand ?? ( _resetCommand = new RelayCommand( Reset, o => true ) );
|
||||
|
||||
public ICommand SaveFilterCommand =>
|
||||
_saveFilterCommand ?? ( _saveFilterCommand = new RelayCommand( SaveFilter, o => Items.Count > 0 ) );
|
||||
|
||||
public EntityCollectionFilter SelectedItem { get; set; }
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private void LoadCustomProperties()
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
|
||||
using ( StreamReader sr = new StreamReader( _propertiesFileCustom ) )
|
||||
{
|
||||
using ( JsonTextReader reader = new JsonTextReader( sr ) )
|
||||
{
|
||||
PropertyEntry[] constraints = serializer.Deserialize<PropertyEntry[]>( reader );
|
||||
|
||||
foreach ( PropertyEntry constraint in constraints )
|
||||
{
|
||||
Constraints.AddSorted( constraint );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadFilter( object obj )
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog
|
||||
{
|
||||
InitialDirectory = Engine.StartupPath ?? Environment.CurrentDirectory,
|
||||
Filter = "JSON Filter Files|*.filter.json"
|
||||
};
|
||||
|
||||
bool? result = ofd.ShowDialog();
|
||||
|
||||
if ( !result.HasValue || !result.Value )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string file = ofd.FileName;
|
||||
|
||||
try
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
|
||||
using ( JsonTextReader jtr = new JsonTextReader( new StreamReader( file ) ) )
|
||||
{
|
||||
EntityCollectionFilter[] entries = serializer.Deserialize<EntityCollectionFilter[]>( jtr );
|
||||
|
||||
if ( entries != null && entries.Length > 0 )
|
||||
{
|
||||
ResetCommand?.Execute( null );
|
||||
Items.Clear();
|
||||
|
||||
foreach ( EntityCollectionFilter entry in entries )
|
||||
{
|
||||
PropertyEntry constraint =
|
||||
Constraints.FirstOrDefault( c => c.Name == entry.Constraint.Name );
|
||||
|
||||
if ( constraint != null )
|
||||
{
|
||||
Items.Add( new EntityCollectionFilter
|
||||
{
|
||||
Constraint = constraint, Operator = entry.Operator, Value = entry.Value
|
||||
} );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
MessageBox.Show( e.Message, Strings.Error );
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveFilter( object obj )
|
||||
{
|
||||
SaveFileDialog sfd = new SaveFileDialog
|
||||
{
|
||||
InitialDirectory = Engine.StartupPath ?? Environment.CurrentDirectory,
|
||||
Filter = "JSON Filter Files|*.filter.json"
|
||||
};
|
||||
|
||||
bool? result = sfd.ShowDialog();
|
||||
|
||||
if ( !result.HasValue || !result.Value )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string file = sfd.FileName;
|
||||
|
||||
JsonSerializer serializer = new JsonSerializer { Formatting = Formatting.Indented };
|
||||
|
||||
using ( JsonTextWriter jtw = new JsonTextWriter( new StreamWriter( file ) ) )
|
||||
{
|
||||
serializer.Serialize( jtw, Items );
|
||||
}
|
||||
}
|
||||
|
||||
private void Apply( object obj )
|
||||
{
|
||||
Command?.Execute( Items.ToList() );
|
||||
}
|
||||
|
||||
private void Reset( object obj )
|
||||
{
|
||||
Command?.Execute( new List<EntityCollectionFilter>() );
|
||||
}
|
||||
|
||||
private void Remove( object obj )
|
||||
{
|
||||
if ( !( obj is ListViewItem lvi ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !( lvi.DataContext is EntityCollectionFilter filter ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Items.Remove( filter );
|
||||
}
|
||||
|
||||
private void AddItem( object obj )
|
||||
{
|
||||
Items.Add( new EntityCollectionFilter { Constraint = Constraints.FirstOrDefault() } );
|
||||
}
|
||||
|
||||
// ReSharper disable once RedundantAssignment
|
||||
public virtual void SetProperty<T>( ref T obj, T value, [CallerMemberName] string propertyName = "" )
|
||||
{
|
||||
obj = value;
|
||||
OnPropertyChanged( propertyName );
|
||||
CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
|
||||
[NotifyPropertyChangedInvocator]
|
||||
protected virtual void OnPropertyChanged( [CallerMemberName] string propertyName = null )
|
||||
{
|
||||
PropertyChanged?.Invoke( this, new PropertyChangedEventArgs( propertyName ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
<Window x:Name="window" x:Class="ClassicAssist.UI.Views.EntityCollectionViewer"
|
||||
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:viewModels="clr-namespace:ClassicAssist.UI.ViewModels"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:uimisc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:views="clr-namespace:ClassicAssist.UI.Views"
|
||||
xmlns:models="clr-namespace:ClassicAssist.UI.Models"
|
||||
mc:Ignorable="d"
|
||||
Width="600" Height="400" Title="{x:Static resources:Strings.Entity_Collection_Viewer}">
|
||||
<Window.DataContext>
|
||||
<viewModels:EntityCollectionViewerViewModel />
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="EntityCollectionViewerResourceDictionary.xaml" />
|
||||
<ResourceDictionary Source="Debug/DebugToolBarStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ToolBar Style="{DynamicResource ToolBarStyle1}" Grid.Row="0">
|
||||
<Button Height="24" Padding="0" Command="{Binding RefreshCommand}"
|
||||
ToolTip="{x:Static resources:Strings.Refresh}"
|
||||
Style="{StaticResource ToolbarButtonStyle}">
|
||||
<Image Source="{StaticResource RefreshIcon}" />
|
||||
</Button>
|
||||
<ToggleButton Height="24" ToolTip="{x:Static resources:Strings.Toggle_item_properties}"
|
||||
Command="{Binding TogglePropertiesCommand}"
|
||||
CommandParameter="{Binding IsChecked, RelativeSource={RelativeSource Self}}">
|
||||
<Image Source="{StaticResource ListIcon}" />
|
||||
</ToggleButton>
|
||||
<ToggleButton x:Name="toggleButton" Height="24">
|
||||
<Image Source="{StaticResource FilterIcon}" />
|
||||
</ToggleButton>
|
||||
<Menu Background="Transparent" Height="24">
|
||||
<MenuItem Height="24">
|
||||
<MenuItem.Header>
|
||||
<Image Source="{StaticResource SortIcon}" />
|
||||
</MenuItem.Header>
|
||||
<MenuItem Header="{x:Static resources:Strings.Name}" Command="{Binding ChangeSortStyleCommand}"
|
||||
CommandParameter="{x:Static models:EntityCollectionSortStyle.Name}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Serial}"
|
||||
Command="{Binding ChangeSortStyleCommand}"
|
||||
CommandParameter="{x:Static models:EntityCollectionSortStyle.Serial}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Color}"
|
||||
Command="{Binding ChangeSortStyleCommand}"
|
||||
CommandParameter="{x:Static models:EntityCollectionSortStyle.Hue}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Graphic}"
|
||||
Command="{Binding ChangeSortStyleCommand}"
|
||||
CommandParameter="{x:Static models:EntityCollectionSortStyle.ID}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Amount}"
|
||||
Command="{Binding ChangeSortStyleCommand}"
|
||||
CommandParameter="{x:Static models:EntityCollectionSortStyle.Quantity}" />
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<Button Height="24" Padding="0" Command="{Binding CancelActionCommand}"
|
||||
ToolTip="{x:Static resources:Strings.Cancel_action}" IsEnabled="{Binding IsPerformingAction}"
|
||||
Style="{StaticResource ToolbarButtonStyle}">
|
||||
<Image Source="{StaticResource CancelIcon}" />
|
||||
</Button>
|
||||
</ToolBar>
|
||||
<ScrollViewer Grid.Row="1" MaxHeight="200"
|
||||
Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=toggleButton}"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<views:EntityCollectionFilterControl
|
||||
Command="{Binding DataContext.ApplyFiltersCommand, ElementName=window}"
|
||||
PresentationTraceSources.TraceLevel="High" />
|
||||
</ScrollViewer>
|
||||
<ListView x:Name="listView" ItemsSource="{Binding Entities}"
|
||||
ItemContainerStyle="{StaticResource FileItemStyle}"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled" Grid.Row="2"
|
||||
Style="{StaticResource EntityListViewStyle}">
|
||||
<i:Interaction.Behaviors>
|
||||
<uimisc:MultiSelectionBehaviour SelectedItems="{Binding SelectedItems}" />
|
||||
</i:Interaction.Behaviors>
|
||||
</ListView>
|
||||
<StatusBar Grid.Row="3">
|
||||
<TextBlock Text="{Binding StatusLabel}" />
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for EntityCollectionViewer.xaml
|
||||
/// </summary>
|
||||
public partial class EntityCollectionViewer : Window
|
||||
{
|
||||
public EntityCollectionViewer()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.Misc">
|
||||
<misc:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||
<Style x:Key="FileItemStyle" TargetType="{x:Type ListViewItem}">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListViewItem}">
|
||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Top">
|
||||
<Border x:Name="border" BorderBrush="{x:Null}" BorderThickness="1"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="2.5"
|
||||
Visibility="Hidden" />
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<ContentPresenter />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<DrawingImage x:Key="RefreshIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V50 H50 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M50,50z M0,0z M25,5C14.351563,5 5.632813,13.378906 5.054688,23.890625 5.007813,24.609375 5.347656,25.296875 5.949219,25.695313 6.550781,26.089844 7.320313,26.132813 7.960938,25.804688 8.601563,25.476563 9.019531,24.828125 9.046875,24.109375 9.511719,15.675781 16.441406,9 25,9 29.585938,9 33.699219,10.925781 36.609375,14L34,14C33.277344,13.988281 32.609375,14.367188 32.246094,14.992188 31.878906,15.613281 31.878906,16.386719 32.246094,17.007813 32.609375,17.632813 33.277344,18.011719 34,18L40.261719,18C40.488281,18.039063,40.71875,18.039063,40.949219,18L44,18 44,8C44.007813,7.460938 43.796875,6.941406 43.414063,6.558594 43.03125,6.175781 42.511719,5.964844 41.96875,5.972656 40.867188,5.988281 39.984375,6.894531 40,8L40,11.777344C36.332031,7.621094,30.964844,5,25,5z M43.03125,23.972656C41.925781,23.925781 40.996094,24.785156 40.953125,25.890625 40.488281,34.324219 33.558594,41 25,41 20.414063,41 16.304688,39.074219 13.390625,36L16,36C16.722656,36.011719 17.390625,35.632813 17.753906,35.007813 18.121094,34.386719 18.121094,33.613281 17.753906,32.992188 17.390625,32.367188 16.722656,31.988281 16,32L9.71875,32C9.507813,31.96875,9.296875,31.96875,9.085938,32L6,32 6,42C5.988281,42.722656 6.367188,43.390625 6.992188,43.753906 7.613281,44.121094 8.386719,44.121094 9.007813,43.753906 9.632813,43.390625 10.011719,42.722656 10,42L10,38.222656C13.667969,42.378906 19.035156,45 25,45 35.648438,45 44.367188,36.621094 44.945313,26.109375 44.984375,25.570313 44.800781,25.039063 44.441406,24.636719 44.078125,24.234375 43.570313,23.996094 43.03125,23.972656z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="ListIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V60 H60 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M60,60z M0,0z M59,0L1,0C0.448,0,0,0.447,0,1L0,59C0,59.553,0.448,60,1,60L59,60C59.552,60,60,59.553,60,59L60,1C60,0.447,59.552,0,59,0z M18.686,50.828L14.93,48.853 11.174,50.828 11.891,46.645 8.852,43.682 13.052,43.072 14.93,39.266 16.808,43.072 21.008,43.682 17.969,46.645 18.686,50.828z M17.968,31.202L18.685,35.385 14.929,33.41 11.173,35.385 11.89,31.202 8.851,28.239 13.051,27.629 14.929,23.823 16.807,27.629 21.007,28.239 17.968,31.202z M17.968,16.119L18.685,20.302 14.929,18.327 11.173,20.302 11.89,16.119 8.851,13.156 13.051,12.546 14.929,8.74 16.807,12.546 21.007,13.156 17.968,16.119z M47,48L23,48 23,44 47,44 47,48z M47,33L23,33 23,29 47,29 47,33z M47,18L23,18 23,14 47,14 47,18z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="CancelIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V50 H50 V0 H0 Z">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M50,50z M0,0z M25,3C12.87,3 3,12.87 3,25 3,37.13 12.87,47 25,47 37.13,47 47,37.13 47,25 47,12.87 37.13,3 25,3z M33.71,32.29C34.1,32.68 34.1,33.32 33.71,33.71 33.51,33.9 33.26,34 33,34 32.74,34 32.49,33.9 32.29,33.71L25,26.42 17.71,33.71C17.51,33.9 17.26,34 17,34 16.74,34 16.49,33.9 16.29,33.71 15.9,33.32 15.9,32.68 16.29,32.29L23.58,25 16.29,17.71C15.9,17.32 15.9,16.68 16.29,16.29 16.68,15.9 17.32,15.9 17.71,16.29L25,23.58 32.29,16.29C32.68,15.9 33.32,15.9 33.71,16.29 34.1,16.68 34.1,17.32 33.71,17.71L26.42,25 33.71,32.29z" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="FilterIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M-5,0 V394.00003 H389 V-5 H0 Z">
|
||||
<DrawingGroup.Transform>
|
||||
<TranslateTransform X="5" Y="2.9666463888133876E-05" />
|
||||
</DrawingGroup.Transform>
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M394,394.00003z M0,0z M367.820312,0L16.558594,0C10.359375,-0.0117188 4.67968800000003,3.449219 1.84765600000003,8.960938 -1.02343799999997,14.546875 -0.519530999999973,21.273438 3.14843800000003,26.375L131.835938,207.660156C131.878906,207.722656 131.925781,207.78125 131.96875,207.84375 136.644531,214.15625 139.175781,221.804688 139.1875,229.660156L139.1875,377.460938C139.160156,381.835938 140.878906,386.042969 143.960938,389.148438 147.046875,392.25 151.242188,394 155.617188,394 157.839844,393.996094 160.042969,393.554688 162.097656,392.699219L234.410156,365.128906C240.886719,363.148438,245.1875,357.035156,245.1875,349.675781L245.1875,229.660156C245.199219,221.804688 247.730469,214.15625 252.402344,207.84375 252.445312,207.78125 252.492188,207.722656 252.535156,207.660156L381.226562,26.371094C384.894531,21.273438 385.398438,14.550781 382.527344,8.96484400000003 379.699219,3.44921900000003 374.015625,-0.0117187999999722 367.820312,2.8421709430404E-14z M367.820312,0" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="SortIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,0,512,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,80,416,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,160,320,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,240,224,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,320,160,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,400,128,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="0,480,64,32" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
<DrawingGroup Opacity="1">
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FF000000"
|
||||
Geometry="F1 M512,512z M0,0z M452.688,388.688L432,409.376 432,160 400,160 400,409.04 379.952,388.752 357.184,411.248 404.624,459.248C407.632,462.288 411.216,464.208 416,464 420.24,464 424.32,462.32 427.312,459.312L475.312,411.312 452.688,388.688z" />
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<ItemsPanelTemplate x:Key="ItemsPanelTemplate">
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
<ContextMenu x:Key="ContextMenu">
|
||||
<MenuItem Header="{x:Static resources:Strings.Use_item}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.(viewModels:EntityCollectionViewerViewModel.ContextUseItemCommand)}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Move_to_backpack}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.(viewModels:EntityCollectionViewerViewModel.ContextMoveToBackpackCommand)}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Move_to_container}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.(viewModels:EntityCollectionViewerViewModel.ContextMoveToContainerCommand)}" />
|
||||
<Separator />
|
||||
<MenuItem Header="{x:Static resources:Strings.Context_menu_request}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.(viewModels:EntityCollectionViewerViewModel.ContextContextMenuRequestCommand)}" />
|
||||
<MenuItem Header="Equip Item"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.(viewModels:EntityCollectionViewerViewModel.EquipItemCommand)}" />
|
||||
</ContextMenu>
|
||||
<Style TargetType="Button" x:Key="ToolbarButtonStyle">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Image.Opacity" Value="0.5" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<DataTemplate x:Key="DataTemplate">
|
||||
<DockPanel x:Name="DockPanel" Background="Transparent">
|
||||
<DockPanel.InputBindings>
|
||||
<MouseBinding Gesture="LeftDoubleClick"
|
||||
Command="{Binding DataContext.ItemDoubleClickCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
|
||||
CommandParameter="{Binding SelectedItem, ElementName=listView}" />
|
||||
</DockPanel.InputBindings>
|
||||
<StackPanel ContextMenu="{StaticResource ContextMenu}">
|
||||
<Image Source="{Binding Bitmap}" Height="32" DockPanel.Dock="Top" Stretch="Uniform"
|
||||
HorizontalAlignment="Center" />
|
||||
<TextBlock x:Name="TextBlock" Text="{Binding Name}" TextAlignment="Center"
|
||||
DockPanel.Dock="Bottom" Padding="1" TextWrapping="WrapWithOverflow"
|
||||
ToolTip="{Binding FullName}" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger
|
||||
Binding="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListViewItem}}}"
|
||||
Value="True">
|
||||
<Setter TargetName="TextBlock" Property="Background" Value="Navy" />
|
||||
<Setter TargetName="TextBlock" Property="Foreground" Value="White" />
|
||||
</DataTrigger>
|
||||
<DataTrigger
|
||||
Binding="{Binding DataContext.ShowProperties, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
|
||||
Value="False">
|
||||
<Setter Property="Width" Value="60" />
|
||||
<Setter TargetName="TextBlock" Property="FontSize" Value="10" />
|
||||
<Setter TargetName="TextBlock" Property="Text" Value="{Binding Name}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger
|
||||
Binding="{Binding DataContext.ShowProperties, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
|
||||
Value="True">
|
||||
<Setter Property="Width" Value="120" />
|
||||
<Setter TargetName="TextBlock" Property="FontSize" Value="10" />
|
||||
<Setter TargetName="TextBlock" Property="Text" Value="{Binding FullName}" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
<Style TargetType="ListView" x:Key="EntityListViewStyle">
|
||||
<Setter Property="ItemsPanel" Value="{StaticResource ItemsPanelTemplate}" />
|
||||
<Setter Property="ItemTemplate" Value="{StaticResource DataTemplate}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,178 @@
|
||||
<Window x:Class="ClassicAssist.UI.Views.Filters.ClilocFilterConfigureWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:filters="clr-namespace:ClassicAssist.UI.ViewModels.Filters"
|
||||
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
|
||||
xmlns:valueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterScreen"
|
||||
Title="{x:Static resources:Strings.Cliloc_Filter}" Height="650" Width="750">
|
||||
<Window.DataContext>
|
||||
<filters:ClilocFilterConfigureViewModel />
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<DrawingImage x:Key="SaveIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V47 H47 V0 H0 Z">
|
||||
<GeometryDrawing Brush="#FF424A60"
|
||||
Geometry="F1 M47,47z M0,0z M46.5,8L46.5,8 46.5,47 0.5,47 0.5,0 38.5,0z" />
|
||||
<GeometryDrawing Brush="#FFE7ECED">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="7.5,26,31,21" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<GeometryDrawing Brush="#FFEBBA16">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="7.5,26,31,12.037" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<GeometryDrawing Brush="#FFC7CAC7">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="9.5,0,26,16" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFFFFFFF"
|
||||
Geometry="F1 M47,47z M0,0z M12.5,31L19.5,31C20.053,31 20.5,30.553 20.5,30 20.5,29.447 20.053,29 19.5,29L12.5,29C11.947,29 11.5,29.447 11.5,30 11.5,30.553 11.947,31 12.5,31z" />
|
||||
<GeometryDrawing Brush="#FFFFFFFF"
|
||||
Geometry="F1 M47,47z M0,0z M22.5,33L12.5,33C11.947,33 11.5,33.447 11.5,34 11.5,34.553 11.947,35 12.5,35L22.5,35C23.053,35 23.5,34.553 23.5,34 23.5,33.447 23.053,33 22.5,33z" />
|
||||
<GeometryDrawing Brush="#FFFFFFFF"
|
||||
Geometry="F1 M47,47z M0,0z M26.21,33.29C25.84,32.92 25.17,32.92 24.8,33.29 24.61,33.479 24.5,33.729 24.5,34 24.5,34.27 24.609,34.52 24.79,34.71 24.979,34.89 25.229,35 25.5,35 25.77,35 26.02,34.89 26.21,34.71 26.39,34.52 26.5,34.26 26.5,34 26.5,33.74 26.39,33.479 26.21,33.29z" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing>
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen Brush="#FF424A60" Thickness="2" StartLineCap="Round" EndLineCap="Round"
|
||||
LineJoin="Miter" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="27.5,4,4,8" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<GeometryDrawing Brush="#FFE7ECED"
|
||||
Geometry="F1 M47,47z M0,0z M24.5,16L24.5,16 9.5,16 9.5,0 16.5,0z" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="DeleteIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M-43,0 V512 H469 V-43 H0 Z">
|
||||
<DrawingGroup.Transform>
|
||||
<TranslateTransform X="43" Y="0" />
|
||||
</DrawingGroup.Transform>
|
||||
<GeometryDrawing Brush="#FFBEC3D2"
|
||||
Geometry="F1 M512,512z M0,0z M269.644531,88.976562L156.582031,88.976562C148.296875,88.976562,141.582031,82.261719,141.582031,73.976562L141.582031,28.042969C141.582031,12.582031,154.152344,0,169.605469,0L256.617188,0C272.070312,0,284.644531,12.582031,284.644531,28.042969L284.644531,73.976562C284.644531,82.261719,277.925781,88.976562,269.644531,88.976562z M171.582031,58.976562L254.644531,58.976562 254.644531,30 171.582031,30z M256.617188,30L256.625,30z M256.617188,30" />
|
||||
<GeometryDrawing Brush="#FFBEC3D2"
|
||||
Geometry="F1 M512,512z M0,0z M381.691406,122.664062C378.851562,119.585938,374.855469,117.835938,370.667969,117.835938L55.558594,117.835938C51.371094,117.835938 47.371094,119.585938 44.53125,122.664062 41.691406,125.742188 40.269531,129.867188 40.605469,134.042969L67.730469,469.4375C69.660156,493.304688,89.914062,512,113.835938,512L312.386719,512C336.3125,512,356.5625,493.304688,358.492188,469.4375L385.617188,134.042969C385.957031,129.867188,384.53125,125.742188,381.691406,122.664062z M381.691406,122.664062" />
|
||||
<GeometryDrawing Brush="#FFDCE1EB"
|
||||
Geometry="F1 M512,512z M0,0z M55.558594,117.835938C51.371094,117.835938 47.371094,119.585938 44.53125,122.664062 41.691406,125.742188 40.269531,129.867188 40.605469,134.042969L67.730469,469.4375C69.660156,493.304688,89.914062,512,113.835938,512L213.113281,512 213.113281,117.835938z M55.558594,117.835938" />
|
||||
<GeometryDrawing Brush="#FFDCE1EB"
|
||||
Geometry="F1 M512,512z M0,0z M425.453125,128.085938L405.816406,69.230469C403.773438,63.105469,398.042969,58.976562,391.589844,58.976562L34.632812,58.976562C28.179688,58.976562,22.445312,63.105469,20.40625,69.230469L0.769531000000001,128.085938C-0.753905999999999,132.660156 0.0117188000000006,137.691406 2.832031,141.601562 5.648438,145.515625 10.179688,147.832031 15,147.832031L411.222656,147.832031C416.046875,147.832031 420.574219,145.515625 423.394531,141.601562 426.210938,137.691406 426.976562,132.660156 425.453125,128.085938z M425.453125,128.085938" />
|
||||
<GeometryDrawing Brush="#FF9196AA"
|
||||
Geometry="F1 M512,512z M0,0z M287.332031,465.976562C287.070312,465.976562 286.808594,465.972656 286.539062,465.957031 278.269531,465.527344 271.910156,458.46875 272.339844,450.195312L286.425781,179.796875C286.855469,171.523438 293.898438,165.15625 302.183594,165.597656 310.457031,166.027344 316.8125,173.085938 316.382812,181.359375L302.300781,451.757812C301.882812,459.765625,295.257812,465.976562,287.332031,465.976562z M287.332031,465.976562" />
|
||||
<GeometryDrawing Brush="#FFBEC3D2"
|
||||
Geometry="F1 M512,512z M0,0z M139.554688,465.976562C131.644531,465.976562,125.027344,459.789062,124.59375,451.792969L109.839844,181.394531C109.390625,173.121094 115.730469,166.050781 124,165.601562 132.265625,165.148438 139.347656,171.488281 139.796875,179.761719L154.546875,450.160156C155,458.433594 148.660156,465.503906 140.386719,465.953125 140.109375,465.96875 139.832031,465.976562 139.554688,465.976562z M139.554688,465.976562" />
|
||||
<GeometryDrawing Brush="#FF9196AA"
|
||||
Geometry="F1 M512,512z M0,0z M213.277344,465.976562C204.996094,465.976562,198.277344,459.261719,198.277344,450.976562L198.277344,180.578125C198.277344,172.292969 204.996094,165.578125 213.277344,165.578125 221.5625,165.578125 228.277344,172.292969 228.277344,180.578125L228.277344,450.976562C228.277344,459.261719,221.5625,465.976562,213.277344,465.976562z M213.277344,465.976562" />
|
||||
<GeometryDrawing Brush="#FFBEC3D2"
|
||||
Geometry="F1 M512,512z M0,0z M198.277344,180.578125L198.277344,450.976562C198.277344,459.203125,204.90625,465.878906,213.113281,465.96875L213.113281,165.585938C204.90625,165.675781,198.277344,172.347656,198.277344,180.578125z M198.277344,180.578125" />
|
||||
<GeometryDrawing Brush="#FFDCE1EB"
|
||||
Geometry="F1 M512,512z M0,0z M171.582031,58.976562L171.582031,30 213.113281,30 213.113281,0 169.605469,0C154.152344,0,141.582031,12.582031,141.582031,28.042969L141.582031,73.976562C141.582031,82.261719,148.296875,88.976562,156.582031,88.976562L213.113281,88.976562 213.113281,58.976562z M171.582031,58.976562" />
|
||||
<GeometryDrawing Brush="#FFF2F6FC"
|
||||
Geometry="F1 M512,512z M0,0z M36.289062,58.976562C29.835938,58.976562,24.101562,63.105469,22.058594,69.230469L2.425781,128.085938C0.902344000000001,132.660156 1.667969,137.691406 4.488281,141.601562 7.304688,145.515625 11.835938,147.832031 16.65625,147.832031L214.765625,147.832031 214.765625,58.976562z M36.289062,58.976562" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<valueConverters:CellWidthValueConverter x:Key="CellWidthValueConverter" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ToolBarTray Grid.Row="0">
|
||||
<ToolBar>
|
||||
<Button ToolTip="{x:Static resources:Strings.Save}" Command="{Binding SaveItemsCommand}">
|
||||
<Button.Content>
|
||||
<Image Source="{StaticResource SaveIcon}" Height="16" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<Button ToolTip="{x:Static resources:Strings.Remove}" Command="{Binding RemoveItemCommand}"
|
||||
CommandParameter="{Binding SelectedItem, ElementName=listView}">
|
||||
<Button.Content>
|
||||
<Image Source="{StaticResource DeleteIcon}" Height="16" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</ToolBar>
|
||||
</ToolBarTray>
|
||||
<Grid Margin="10" Grid.Row="1">
|
||||
<ScrollViewer MaxHeight="400" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
|
||||
<ListView x:Name="listView" ItemsSource="{Binding Items}" Foreground="Black"
|
||||
SelectedItem="{Binding SelectedItem}">
|
||||
<ListView.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static resources:Strings.Remove}"
|
||||
Command="{Binding RemoveItemCommand}"
|
||||
CommandParameter="{Binding SelectedItem}" />
|
||||
</ContextMenu>
|
||||
</ListView.ContextMenu>
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{x:Static resources:Strings.ID}" Width="100"
|
||||
DisplayMemberBinding="{Binding Cliloc}" />
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Original}" Width="300"
|
||||
DisplayMemberBinding="{Binding Original}" />
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Replacement}" Width="300"
|
||||
x:Name="ReplacementColumnHeader">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<controls:EditTextBlock
|
||||
Text="{Binding Replacement, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
MinWidth="100" ShowIcon="True"
|
||||
Width="{Binding Path=Width, ElementName=ReplacementColumnHeader, Converter={StaticResource CellWidthValueConverter}, ConverterParameter=15}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
<GridSplitter Height="10" Grid.Row="2" />
|
||||
<Grid Margin="10,0,10,10" Grid.Row="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0">
|
||||
<Label Content="{x:Static resources:Strings.Filter_}" />
|
||||
<TextBox Text="{Binding FilterText, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
<ListView ItemsSource="{Binding FilteredClilocs}" Foreground="Black" Grid.Row="1" Margin="0,10,0,0"
|
||||
SelectedItem="{Binding SelectedClilocEntry}">
|
||||
<ListView.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static resources:Strings.Add}" Command="{Binding AddItemCommand}"
|
||||
CommandParameter="{Binding SelectedClilocEntry}" />
|
||||
</ContextMenu>
|
||||
</ListView.ContextMenu>
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{x:Static resources:Strings.ID}" Width="100"
|
||||
DisplayMemberBinding="{Binding Key}" />
|
||||
<GridViewColumn Header="{x:Static resources:Strings.Value}" Width="550">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Value}" ToolTip="{Binding Value}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Filters
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ClilocFilterConfigureWindow.xaml
|
||||
/// </summary>
|
||||
public partial class ClilocFilterConfigureWindow : Window
|
||||
{
|
||||
public ClilocFilterConfigureWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<Window x:Class="ClassicAssist.UI.Views.Filters.RepeatedMessagesFilterConfigureWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:local="clr-namespace:ClassicAssist.UI.Views.Filters"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
Topmost="True"
|
||||
mc:Ignorable="d" Background="{DynamicResource ThemeWindowBackgroundBrush}"
|
||||
DataContext="{Binding Mode=OneWay, RelativeSource={RelativeSource Self}}"
|
||||
Title="{x:Static resources:Strings.Repeated_Messages}" Height="350" Width="400">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../../Resources/DarkTheme.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Header="{x:Static resources:Strings.Options}">
|
||||
<GroupBox.Resources>
|
||||
<Style TargetType="{x:Type xctk:IntegerUpDown}" BasedOn="{StaticResource {x:Type xctk:IntegerUpDown}}">
|
||||
<Setter Property="Margin" Value="10,0,10,0" />
|
||||
</Style>
|
||||
</GroupBox.Resources>
|
||||
<StackPanel Margin="10">
|
||||
<CheckBox IsChecked="{Binding Options.SendToJournal}">
|
||||
<TextBlock Text="{x:Static resources:Strings.Journal_receives_filtered_messages}" TextWrapping="Wrap"/>
|
||||
</CheckBox>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{x:Static resources:Strings.Message_Limit_}" />
|
||||
<xctk:IntegerUpDown Minimum="0" Value="{Binding Options.MessageLimit}" UpdateValueOnEnterKey="True" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{x:Static resources:Strings.Time_Limit_}" />
|
||||
<xctk:IntegerUpDown Minimum="0" Value="{Binding Options.TimeLimit}" UpdateValueOnEnterKey="True" />
|
||||
<TextBlock Text="{x:Static resources:Strings.seconds}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{x:Static resources:Strings.Filtered_Time_}" />
|
||||
<xctk:IntegerUpDown Minimum="0" Value="{Binding Options.BlockedTime}" UpdateValueOnEnterKey="True" />
|
||||
<TextBlock Text="{x:Static resources:Strings.seconds}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="0,10,0,0">
|
||||
<Button Content="{x:Static resources:Strings.Close}" Padding="25,0,25,0">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,45 @@
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using ClassicAssist.Annotations;
|
||||
using ClassicAssist.Data.Filters;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Filters
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for RepeatedMessagesFilterConfigureWindow.xaml
|
||||
/// </summary>
|
||||
public partial class RepeatedMessagesFilterConfigureWindow : INotifyPropertyChanged
|
||||
{
|
||||
private RepeatedMessagesFilter.MessageFilterOptions
|
||||
_options = new RepeatedMessagesFilter.MessageFilterOptions();
|
||||
|
||||
public RepeatedMessagesFilterConfigureWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public RepeatedMessagesFilterConfigureWindow( RepeatedMessagesFilter.MessageFilterOptions options )
|
||||
{
|
||||
InitializeComponent();
|
||||
Options = options;
|
||||
}
|
||||
|
||||
public RepeatedMessagesFilter.MessageFilterOptions Options
|
||||
{
|
||||
get => _options;
|
||||
set
|
||||
{
|
||||
_options = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
[NotifyPropertyChangedInvocator]
|
||||
protected virtual void OnPropertyChanged( [CallerMemberName] string propertyName = null )
|
||||
{
|
||||
PropertyChanged?.Invoke( this, new PropertyChangedEventArgs( propertyName ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
<Window x:Name="window" x:Class="ClassicAssist.UI.Views.GIFRecorderWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:local="clr-namespace:ClassicAssist.UI.Views"
|
||||
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.Misc"
|
||||
mc:Ignorable="d" AllowsTransparency="True" WindowStyle="None"
|
||||
Title="GIFRecorderWindow" Height="300" Width="300" Background="Transparent" ResizeMode="CanResizeWithGrip"
|
||||
Topmost="True">
|
||||
<Window.DataContext>
|
||||
<viewModels:GIFRecorderViewModel />
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<DrawingImage x:Key="WaitIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M-63,0 V512 H449 V-63 H0 Z">
|
||||
<DrawingGroup.Transform>
|
||||
<TranslateTransform X="63" Y="0" />
|
||||
</DrawingGroup.Transform>
|
||||
<GeometryDrawing Brush="#FFE9E3D5"
|
||||
Geometry="F1 M512,512z M0,0z M316.554688,162.183594C351.578125,127.164062,370.863281,80.59375,370.863281,31.066406L370.863281,19.058594C362.246094,19.058594,19.6875000000001,19.058594,15.4531250000001,19.058594L15.4531250000001,31.066406C15.4531250000001,80.597656,34.7421880000001,127.164062,69.7656250000001,162.183594L148.28125,240.703125C156.730469,249.152344,156.730469,262.851562,148.28125,271.296875L69.7656250000001,349.816406C34.7421880000001,384.835938,15.4531250000001,431.40625,15.4531250000001,480.9375L15.4531250000001,492.941406 370.863281,492.941406 370.863281,480.9375C370.863281,431.40625,351.578125,384.839844,316.554688,349.816406L238.035156,271.296875C229.585938,262.851562,229.585938,249.152344,238.035156,240.703125z M316.554688,162.183594" />
|
||||
<GeometryDrawing Brush="#FFD3CDBF"
|
||||
Geometry="F1 M512,512z M0,0z M339.960938,31.0625C339.960938,72.339844,323.886719,111.144531,294.699219,140.332031L216.183594,218.847656C195.699219,239.332031,195.699219,272.664062,216.183594,293.152344L294.699219,371.667969C323.886719,400.855469,339.960938,439.660156,339.960938,480.9375L339.960938,492.941406 370.863281,492.941406 370.863281,480.9375C370.863281,431.40625,351.578125,384.839844,316.554688,349.816406L238.035156,271.296875C229.585938,262.851562,229.585938,249.152344,238.035156,240.703125L316.554688,162.183594C351.578125,127.164062,370.863281,80.59375,370.863281,31.066406L370.863281,19.058594 339.960938,19.058594z M339.960938,31.0625" />
|
||||
<GeometryDrawing Brush="#FFFFB545"
|
||||
Geometry="F1 M512,512z M0,0z M280.492188,387.246094L266.777344,387.324219 266.5,387.324219C259.574219,387.113281 252.929688,385.929688 246.625,383.929688 226.558594,377.546875 210.324219,362.429688 201.273438,343.183594L185.820312,343.183594C173.917969,368.40625,148.800781,386.347656,119.8125,387.222656L105.839844,387.226562C86.4335939999999,408.445312,74.3007809999999,434.566406,70.6718749999999,462.992188L70.6718749999999,488.820312 315.640625,488.820312 315.640625,462.992188C312.015625,434.582031,299.890625,408.46875,280.492188,387.246094z M280.492188,387.246094" />
|
||||
<GeometryDrawing Brush="#FFFFB545"
|
||||
Geometry="F1 M512,512z M0,0z M185.820312,256L201.273438,256 201.273438,359.414062 185.820312,359.414062z M185.820312,256" />
|
||||
<GeometryDrawing Brush="#FFFF983B"
|
||||
Geometry="F1 M512,512z M0,0z M280.492188,387.246094L266.777344,387.324219 266.5,387.324219C259.613281,387.117188,252.949219,385.929688,246.625,383.929688L263.121094,402.59375 263.382812,402.882812C263.675781,403.203125 263.96875,403.527344 264.261719,403.855469 264.324219,403.921875 264.382812,403.992188 264.445312,404.0625 272.253906,412.996094 265.660156,427.007812 253.792969,427.007812L80.3124999999999,427.007812C78.1992189999999,432.035156,76.4062499999999,437.195312,74.9023439999999,442.460938L74.8867189999999,442.460938C69.7773439999999,460.414062,70.6757809999999,465.738281,70.6757809999999,488.820312L315.644531,488.820312 315.644531,467.1875C315.644531,451.269531,307.132812,416.390625,280.492188,387.246094z M280.492188,387.246094" />
|
||||
<GeometryDrawing Brush="#FFFFB545"
|
||||
Geometry="F1 M512,512z M0,0z M193.15625,213.035156C191.320312,210.496094,189.269531,208.082031,187.011719,205.820312L125.007812,143.8125C120.140625,138.945312,123.585938,130.625,130.46875,130.625L255.84375,130.621094C262.730469,130.621094,266.175781,138.945312,261.308594,143.8125L199.28125,205.847656C197.03125,208.101562,194.988281,210.503906,193.15625,213.035156z M193.15625,213.035156" />
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFFF983B"
|
||||
Geometry="F1 M512,512z M0,0z M255.84375,130.621094L230.792969,130.621094 171.304688,190.113281 185.820312,204.628906 185.820312,256 201.273438,256 201.273438,203.851562 261.308594,143.8125C266.175781,138.941406,262.726562,130.621094,255.84375,130.621094z M255.84375,130.621094" />
|
||||
<GeometryDrawing Brush="#FFFF983B"
|
||||
Geometry="F1 M512,512z M0,0z M224.671875,400.226562C224.671875,404.492188 221.210938,407.953125 216.945312,407.953125 212.675781,407.953125 209.21875,404.492188 209.21875,400.226562 209.21875,395.957031 212.675781,392.5 216.945312,392.5 221.210938,392.5 224.671875,395.957031 224.671875,400.226562z M224.671875,400.226562" />
|
||||
<GeometryDrawing Brush="#FFFF983B"
|
||||
Geometry="F1 M512,512z M0,0z M255.574219,427.011719C255.574219,431.277344 252.117188,434.738281 247.847656,434.738281 243.582031,434.738281 240.121094,431.277344 240.121094,427.011719 240.121094,422.742188 243.582031,419.285156 247.847656,419.285156 252.117188,419.285156 255.574219,422.742188 255.574219,427.011719z M255.574219,427.011719" />
|
||||
<GeometryDrawing Brush="#FFFF983B"
|
||||
Geometry="F1 M512,512z M0,0z M183.460938,427.011719C183.460938,431.277344 180.003906,434.738281 175.738281,434.738281 171.46875,434.738281 168.011719,431.277344 168.011719,427.011719 168.011719,422.742188 171.46875,419.285156 175.738281,419.285156 180.003906,419.285156 183.460938,422.742188 183.460938,427.011719z M183.460938,427.011719" />
|
||||
<GeometryDrawing Brush="#FFFF983B"
|
||||
Geometry="F1 M512,512z M0,0z M152.558594,410.527344C152.558594,414.792969 149.097656,418.253906 144.832031,418.253906 140.5625,418.253906 137.105469,414.792969 137.105469,410.527344 137.105469,406.261719 140.5625,402.800781 144.832031,402.800781 149.097656,402.800781 152.558594,406.261719 152.558594,410.527344z M152.558594,410.527344" />
|
||||
<GeometryDrawing Brush="#FFFF983B"
|
||||
Geometry="F1 M512,512z M0,0z M179.34375,154.011719C179.34375,158.277344 175.882812,161.738281 171.617188,161.738281 167.347656,161.738281 163.890625,158.277344 163.890625,154.011719 163.890625,149.746094 167.347656,146.285156 171.617188,146.285156 175.882812,146.285156 179.34375,149.746094 179.34375,154.011719z M179.34375,154.011719" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing Brush="#FFA05A4B"
|
||||
Geometry="F1 M512,512z M0,0z M370.863281,0C365.785156,0 20.535156,0 15.453125,0 6.917969,0 0,6.917969 0,15.453125L0,38.632812C0,47.164062,6.917969,54.085938,15.453125,54.085938L370.863281,54.085938C379.398438,54.085938,386.316406,47.164062,386.316406,38.632812L386.316406,15.453125C386.316406,6.917969,379.398438,0,370.863281,0z M370.863281,0" />
|
||||
<GeometryDrawing Brush="#FF81493B"
|
||||
Geometry="F1 M512,512z M0,0z M370.863281,0L355.414062,0C355.414062,12.800781 345.035156,23.179688 332.234375,23.179688 323.21875,23.179688 3.53906199999994,23.179688 -5.6843418860808E-14,23.179688L-5.6843418860808E-14,38.632812C-5.6843418860808E-14,47.164062,6.91796899999994,54.085938,15.4531249999999,54.085938L370.863281,54.085938C379.398438,54.085938,386.316406,47.164062,386.316406,38.632812L386.316406,15.453125C386.316406,6.917969,379.398438,0,370.863281,0z M370.863281,0" />
|
||||
<GeometryDrawing Brush="#FFA05A4B"
|
||||
Geometry="F1 M512,512z M0,0z M370.863281,457.914062C365.785156,457.914062 20.535156,457.914062 15.453125,457.914062 6.917969,457.914062 0,464.835938 0,473.367188L0,496.546875C0,505.082031,6.917969,512,15.453125,512L370.863281,512C379.398438,512,386.316406,505.082031,386.316406,496.546875L386.316406,473.367188C386.316406,464.835938,379.398438,457.914062,370.863281,457.914062z M370.863281,457.914062" />
|
||||
<GeometryDrawing Brush="#FF81493B"
|
||||
Geometry="F1 M512,512z M0,0z M370.863281,457.914062L355.414062,457.914062C355.414062,470.714844 345.035156,481.09375 332.234375,481.09375 323.21875,481.09375 3.53906199999994,481.09375 -5.6843418860808E-14,481.09375L-5.6843418860808E-14,496.546875C-5.6843418860808E-14,505.082031,6.91796899999994,512,15.4531249999999,512L370.863281,512C379.398438,512,386.316406,505.082031,386.316406,496.546875L386.316406,473.367188C386.316406,464.835938,379.398438,457.914062,370.863281,457.914062z M370.863281,457.914062" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="PlayIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
|
||||
<GeometryDrawing Brush="#FFDEECF1"
|
||||
Geometry="F1 M512,512z M0,0z M256,512C115.390625,512 0,396.609375 0,256 0,115.390625 115.390625,0 256,0 396.609375,0 512,115.390625 512,256 512,396.609375 396.609375,512 256,512z M256,512" />
|
||||
<GeometryDrawing Brush="#FFC6E2E7"
|
||||
Geometry="F1 M512,512z M0,0z M512,256C512,115.390625,396.609375,0,256,0L256,512C396.609375,512,512,396.609375,512,256z M512,256" />
|
||||
<GeometryDrawing Brush="#FF384949"
|
||||
Geometry="F1 M512,512z M0,0z M181,107.976562L181,404.023438 403.039062,256z M181,107.976562" />
|
||||
<GeometryDrawing Brush="#FF293939"
|
||||
Geometry="F1 M512,512z M0,0z M256,354.023438L403.039062,256 256,157.976562z M256,354.023438" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="StopIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
|
||||
<GeometryDrawing Brush="#FFDEECF1"
|
||||
Geometry="F1 M512,512z M0,0z M256,512C115.390625,512 0,396.609375 0,256 0,115.390625 115.390625,0 256,0 396.609375,0 512,115.390625 512,256 512,396.609375 396.609375,512 256,512z M256,512" />
|
||||
<GeometryDrawing Brush="#FFC6E2E7"
|
||||
Geometry="F1 M512,512z M0,0z M512,256C512,115.390625,396.609375,0,256,0L256,512C396.609375,512,512,396.609375,512,256z M512,256" />
|
||||
<GeometryDrawing Brush="#FF384949"
|
||||
Geometry="F1 M512,512z M0,0z M151,361L361,361 361,151 151,151z M151,361" />
|
||||
<GeometryDrawing Brush="#FF293939"
|
||||
Geometry="F1 M512,512z M0,0z M256,151L361,151 361,361 256,361z M256,151" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<DrawingImage x:Key="SaveIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V47 H47 V0 H0 Z">
|
||||
<GeometryDrawing Brush="#FF424A60"
|
||||
Geometry="F1 M47,47z M0,0z M46.5,8L46.5,8 46.5,47 0.5,47 0.5,0 38.5,0z" />
|
||||
<GeometryDrawing Brush="#FFE7ECED">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="7.5,26,31,21" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<GeometryDrawing Brush="#FFEBBA16">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="7.5,26,31,12.037" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<GeometryDrawing Brush="#FFC7CAC7">
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="9.5,0,26,16" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<DrawingGroup Opacity="1">
|
||||
<GeometryDrawing Brush="#FFFFFFFF"
|
||||
Geometry="F1 M47,47z M0,0z M12.5,31L19.5,31C20.053,31 20.5,30.553 20.5,30 20.5,29.447 20.053,29 19.5,29L12.5,29C11.947,29 11.5,29.447 11.5,30 11.5,30.553 11.947,31 12.5,31z" />
|
||||
<GeometryDrawing Brush="#FFFFFFFF"
|
||||
Geometry="F1 M47,47z M0,0z M22.5,33L12.5,33C11.947,33 11.5,33.447 11.5,34 11.5,34.553 11.947,35 12.5,35L22.5,35C23.053,35 23.5,34.553 23.5,34 23.5,33.447 23.053,33 22.5,33z" />
|
||||
<GeometryDrawing Brush="#FFFFFFFF"
|
||||
Geometry="F1 M47,47z M0,0z M26.21,33.29C25.84,32.92 25.17,32.92 24.8,33.29 24.61,33.479 24.5,33.729 24.5,34 24.5,34.27 24.609,34.52 24.79,34.71 24.979,34.89 25.229,35 25.5,35 25.77,35 26.02,34.89 26.21,34.71 26.39,34.52 26.5,34.26 26.5,34 26.5,33.74 26.39,33.479 26.21,33.29z" />
|
||||
</DrawingGroup>
|
||||
<GeometryDrawing>
|
||||
<GeometryDrawing.Pen>
|
||||
<Pen Brush="#FF424A60" Thickness="2" StartLineCap="Round" EndLineCap="Round"
|
||||
LineJoin="Miter" />
|
||||
</GeometryDrawing.Pen>
|
||||
<GeometryDrawing.Geometry>
|
||||
<RectangleGeometry RadiusX="0" RadiusY="0" Rect="27.5,4,4,8" />
|
||||
</GeometryDrawing.Geometry>
|
||||
</GeometryDrawing>
|
||||
<GeometryDrawing Brush="#FFE7ECED"
|
||||
Geometry="F1 M47,47z M0,0z M24.5,16L24.5,16 9.5,16 9.5,0 16.5,0z" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
<misc:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<controls:CustomWindowTitleControl DockPanel.Dock="Top">
|
||||
<controls:CustomWindowTitleControl.AdditionalContent>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Width="16" Background="Transparent" BorderThickness="0" Padding="0"
|
||||
Command="{Binding Data.RecordCommand, Source={StaticResource Proxy}}">
|
||||
<Image RenderTransformOrigin="0.5,0.5">
|
||||
<!--<Image.RenderTransform>
|
||||
<RotateTransform />
|
||||
</Image.RenderTransform>
|
||||
<Image.Triggers>
|
||||
<EventTrigger RoutedEvent="UserControl.Loaded">
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="(Image.RenderTransform).(RotateTransform.Angle)"
|
||||
To="-360" Duration="0:0:1" RepeatBehavior="Forever" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger>
|
||||
</Image.Triggers>-->
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger
|
||||
Binding="{Binding Data.IsRecording, Source={StaticResource Proxy}}"
|
||||
Value="false">
|
||||
<Setter Property="Source" Value="{StaticResource PlayIcon}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger
|
||||
Binding="{Binding Data.IsRecording, Source={StaticResource Proxy}}"
|
||||
Value="true">
|
||||
<Setter Property="Source" Value="{StaticResource StopIcon}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
</Button>
|
||||
<Button Width="16" Background="Transparent" BorderThickness="0" Padding="0" Margin="10,0,0,0"
|
||||
Command="{Binding Data.SaveCommand, Source={StaticResource Proxy}}">
|
||||
<Image Source="{StaticResource SaveIcon}" />
|
||||
</Button>
|
||||
<Image Margin="10,0,0,0" Height="16" Source="{StaticResource WaitIcon}"
|
||||
Visibility="{Binding Data.IsRecording, Source={StaticResource Proxy}, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||
</StackPanel>
|
||||
</controls:CustomWindowTitleControl.AdditionalContent>
|
||||
</controls:CustomWindowTitleControl>
|
||||
<Border Grid.Row="1" BorderThickness="4" BorderBrush="Black" />
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Windows;
|
||||
using ClassicAssist.UI.ViewModels;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for GIFRecorderWindow.xaml
|
||||
/// </summary>
|
||||
public partial class GIFRecorderWindow : Window
|
||||
{
|
||||
public GIFRecorderWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new GIFRecorderViewModel( this );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
<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:r="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.Misc"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:misc1="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels;assembly=ClassicAssist.Shared"
|
||||
x:Name="userControl"
|
||||
x:Class="ClassicAssist.UI.Views.GeneralControl"
|
||||
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.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="../../Resources/ResourceDictionary.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<UserControl.DataContext>
|
||||
<viewModels:GeneralControlViewModel />
|
||||
</UserControl.DataContext>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="175" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<GroupBox Grid.Column="0" Margin="5" BorderThickness="1" Header="{x:Static r:Strings.Filters}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox x:Name="listBox" ItemsSource="{Binding Filters}" Grid.Row="0">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox IsChecked="{Binding Enabled}" />
|
||||
<TextBlock Text="{Binding Name}" Margin="5,0,5,0" />
|
||||
<Button Background="Transparent" BorderThickness="0"
|
||||
ToolTip="{x:Static r:Strings.Options}"
|
||||
Visibility="{Binding IsConfigurable, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||
Command="{Binding DataContext.ConfigureFilterCommand, ElementName=userControl}"
|
||||
CommandParameter="{Binding Mode=OneWay}" Margin="0" Padding="0">
|
||||
<Button.Content>
|
||||
<Image Source="{StaticResource configureIcon}" Height="16" Margin="0" />
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Content="{x:Static r:Strings.Light}" Grid.Column="0" />
|
||||
<Slider Grid.Column="1" Maximum="31"
|
||||
Value="{Binding Options.LightLevel, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsDirectionReversed="True" Minimum="0" Height="20" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<Grid Grid.Column="1" Margin="5,15,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0">
|
||||
<CheckBox Content="{x:Static r:Strings.Always_On_Top}" IsChecked="{Binding Options.AlwaysOnTop}" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel.Resources>
|
||||
<misc:BindingProxy x:Key="proxy" Data="{Binding}" />
|
||||
</StackPanel.Resources>
|
||||
<CheckBox IsChecked="{Binding Options.ActionDelay}" DataContext="{Binding}">
|
||||
<CheckBox.ContentTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Content="{x:Static r:Strings.Action_Delay_}" Margin="0" />
|
||||
<TextBox Width="40" Margin="10,0,10,0"
|
||||
Text="{Binding Path=Data.Options.ActionDelayMS, Source={StaticResource proxy}}" />
|
||||
<Label Content="ms" Margin="0" Padding="0" />
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</CheckBox.ContentTemplate>
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<GroupBox Header="{x:Static r:Strings.Saved_Passwords_}" Margin="5" Padding="5">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox Content="{x:Static r:Strings.Enabled}" Grid.Column="0"
|
||||
IsChecked="{Binding SavePasswords}" />
|
||||
<ComboBox x:Name="comboBox" Grid.Column="1" Margin="10,0,10,0" SelectedIndex="0"
|
||||
ItemsSource="{Binding SavedPasswords}" DisplayMemberPath="Key" />
|
||||
<Button Content="{x:Static r:Strings.Remove}" Grid.Column="2"
|
||||
Command="{Binding RemoveSavedPasswordCommand}"
|
||||
CommandParameter="{Binding SelectedItem, ElementName=comboBox}" />
|
||||
</Grid>
|
||||
<CheckBox Content="{x:Static r:Strings.Only_overwrite_blank_password}"
|
||||
IsChecked="{Binding SavePasswordsOnlyBlank}" />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2">
|
||||
<GroupBox Header="{x:Static r:Strings.Profiles}" Margin="5">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0" Margin="5">
|
||||
<ComboBox ItemsSource="{Binding Profiles}" SelectedItem="{Binding SelectedProfile}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc1:ComboBoxBehavior CommandBinding="{Binding ChangeProfileCommand}"
|
||||
OnlyUserTriggered="True" />
|
||||
</i:Interaction.Behaviors>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
<DockPanel Grid.Column="1" Margin="5">
|
||||
<Button Content="{x:Static r:Strings.New}" Margin="0,0,10,0" Padding="10,0,10,0"
|
||||
Command="{Binding NewProfileCommand}" />
|
||||
<Button Content="{x:Static r:Strings.Save}" Margin="0,0,10,0" Padding="10,0,10,0"
|
||||
Command="{Binding SaveProfileCommand}" />
|
||||
<Button Command="{Binding LinkUnlinkProfileCommand}">
|
||||
<Image Width="16" Margin="3,0,3,0">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsLinkedProfile}" Value="False">
|
||||
<Setter Property="Source" Value="{StaticResource unlinkedIcon}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsLinkedProfile}" Value="True">
|
||||
<Setter Property="Source" Value="{StaticResource linkedIcon}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
</Button>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for GeneralControl.xaml
|
||||
/// </summary>
|
||||
public partial class GeneralControl : UserControl
|
||||
{
|
||||
public GeneralControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.HotkeysTabControl"
|
||||
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:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels;assembly=ClassicAssist.Shared"
|
||||
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:valueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
|
||||
xmlns:hotkeys="clr-namespace:ClassicAssist.Data.Hotkeys;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="500">
|
||||
<UserControl.DataContext>
|
||||
<viewModels:HotkeysTabViewModel />
|
||||
</UserControl.DataContext>
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../Resources/DarkTheme.xaml" />
|
||||
<ResourceDictionary Source="../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="../../Resources/ResourceDictionary.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<valueConverters:ValueConverterGroup x:Key="InvertAndVisibilitate">
|
||||
<valueConverters:InverseBooleanConverter />
|
||||
<BooleanToVisibilityConverter />
|
||||
</valueConverters:ValueConverterGroup>
|
||||
<valueConverters:StringToResourceConverter x:Key="StringToResourceConverter" />
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TreeView x:Name="treeView" Grid.Row="0" Margin="10" ItemsSource="{Binding Items}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:BindableSelectedItemBehavior SelectedItem="{Binding SelectedItem, Mode=TwoWay}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<TreeView.ItemTemplate>
|
||||
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
||||
<ContentControl>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding Image, Converter={StaticResource StringToResourceConverter}}"
|
||||
Stretch="Uniform" Margin="0,0,5,0"
|
||||
Visibility="{Binding IsCategory, Converter={StaticResource InvertAndVisibilitate}}" />
|
||||
<TextBlock Text="{Binding}" Foreground="{DynamicResource ThemeForegroundBrush}"
|
||||
ToolTip="{Binding Tooltip}" />
|
||||
</StackPanel>
|
||||
</ContentControl>
|
||||
</HierarchicalDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
</TreeView>
|
||||
<GroupBox Grid.Column="1" Header="{x:Static resources:Strings.Hotkeys}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<controls:TextBoxKey x:Name="textBoxKey"
|
||||
Shortcut="{Binding Hotkey}" Grid.Row="0"
|
||||
Margin="10">
|
||||
<controls:TextBoxKey.Style>
|
||||
<Style TargetType="controls:TextBoxKey">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=SelectedItem.IsCategory}" Value="True">
|
||||
<Setter Property="IsEnabled" Value="False" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=SelectedItem.(hotkeys:HotkeyEntry.Hotkey)}"
|
||||
Value="{x:Null}">
|
||||
<Setter Property="IsEnabled" Value="False" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</controls:TextBoxKey.Style>
|
||||
</controls:TextBoxKey>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="{x:Static resources:Strings.Clear}" Margin="10,0,10,5"
|
||||
Command="{Binding ClearHotkeyCommand}" CommandParameter="{Binding SelectedItem}"
|
||||
Grid.Column="0" IsEnabled="{Binding IsEnabled, ElementName=textBoxKey}" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox Content="{x:Static resources:Strings.Pass_to_UO}" Margin="10,0,10,5"
|
||||
IsChecked="{Binding Path=SelectedItem.(hotkeys:HotkeyEntry.PassToUO), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="0" IsEnabled="{Binding IsEnabled, ElementName=textBoxKey}" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="{x:Static resources:Strings.Execute}" Margin="10,0,10,5"
|
||||
Command="{Binding ExecuteCommand}" CommandParameter="{Binding SelectedItem}"
|
||||
Grid.Column="0" IsEnabled="{Binding IsEnabled, ElementName=textBoxKey}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for HotkeysTab.xaml
|
||||
/// </summary>
|
||||
public partial class HotkeysTabControl : UserControl
|
||||
{
|
||||
public HotkeysTabControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<Window x:Class="ClassicAssist.UI.Views.HuePickerWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:controls="clr-namespace:ClassicAssist.UI.Controls"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static resources:Strings.Hue_Picker}" Height="350" Width="450"
|
||||
DataContext="{Binding Mode=OneWay, RelativeSource={RelativeSource Self}}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0" Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<DockPanel>
|
||||
<TextBlock Text="{x:Static resources:Strings.Filter_}" DockPanel.Dock="Left" Margin="0,0,10,0" />
|
||||
<TextBox Text="{Binding FilterText, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</DockPanel>
|
||||
<ListView x:Name="listView" ItemsSource="{Binding FilteredItems}" SelectedItem="{Binding SelectedItem}"
|
||||
Grid.Row="1" Margin="0,10,0,0">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" ToolTip="{Binding EntryName}">
|
||||
<TextBlock Text="{Binding Index}" Padding="0,0,20,0" Width="50" />
|
||||
<controls:HueEntryControl
|
||||
HueEntry="{Binding Entry, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</Grid>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="1" Margin="10,0,10,10" HorizontalAlignment="Right">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Padding" Value="20,0,20,0" />
|
||||
<Setter Property="Margin" Value="10,0,0,0" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Button Content="{x:Static resources:Strings.OK}" Command="{Binding OKCommand}" IsDefault="True"
|
||||
CommandParameter="{Binding SelectedItem, ElementName=listView}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.Cancel}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,125 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using ClassicAssist.Annotations;
|
||||
using ClassicAssist.UO.Data;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for HuePickerWindow.xaml
|
||||
/// </summary>
|
||||
public partial class HuePickerWindow : Window, INotifyPropertyChanged
|
||||
{
|
||||
private ObservableCollection<HuePickerEntry> _filteredItems = new ObservableCollection<HuePickerEntry>();
|
||||
private string _filterText;
|
||||
private ObservableCollection<HuePickerEntry> _items = new ObservableCollection<HuePickerEntry>();
|
||||
private ICommand _okCommand;
|
||||
private int _selectedHue = -1;
|
||||
private HuePickerEntry _selectedItem;
|
||||
|
||||
public HuePickerWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
for ( int i = 0; i < 3000; i++ )
|
||||
{
|
||||
Items.Add( new HuePickerEntry { Index = i + 1, Entry = Hues._lazyHueEntries.Value[i] } );
|
||||
}
|
||||
|
||||
ApplyFilter( _filterText );
|
||||
}
|
||||
|
||||
public ObservableCollection<HuePickerEntry> FilteredItems
|
||||
{
|
||||
get => _filteredItems;
|
||||
set => SetProperty( ref _filteredItems, value );
|
||||
}
|
||||
|
||||
public string FilterText
|
||||
{
|
||||
get => _filterText;
|
||||
set
|
||||
{
|
||||
SetProperty( ref _filterText, value );
|
||||
ApplyFilter( value );
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<HuePickerEntry> Items
|
||||
{
|
||||
get => _items;
|
||||
set => SetProperty( ref _items, value );
|
||||
}
|
||||
|
||||
public ICommand OKCommand =>
|
||||
_okCommand ?? ( _okCommand = ReactiveCommand.Create<HuePickerEntry>( OK,
|
||||
this.WhenAnyValue( e => e.SelectedItem, selector: e => e != null ) ) );
|
||||
|
||||
public int SelectedHue
|
||||
{
|
||||
get => _selectedHue;
|
||||
set => SetProperty( ref _selectedHue, value );
|
||||
}
|
||||
|
||||
public HuePickerEntry SelectedItem
|
||||
{
|
||||
get => _selectedItem;
|
||||
set => SetProperty( ref _selectedItem, value );
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private void ApplyFilter( string value )
|
||||
{
|
||||
FilteredItems = new ObservableCollection<HuePickerEntry>( Items.Where( i =>
|
||||
string.IsNullOrEmpty( value ) || i.Index.ToString().StartsWith( value ) ) );
|
||||
}
|
||||
|
||||
public static bool GetHue( out int hue )
|
||||
{
|
||||
HuePickerWindow window = new HuePickerWindow();
|
||||
|
||||
window.ShowDialog();
|
||||
|
||||
hue = window.SelectedHue;
|
||||
|
||||
return hue != -1;
|
||||
}
|
||||
|
||||
private void OK( object obj )
|
||||
{
|
||||
if ( !( obj is HuePickerEntry entry ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SelectedHue = entry.Index;
|
||||
}
|
||||
|
||||
[NotifyPropertyChangedInvocator]
|
||||
protected virtual void OnPropertyChanged( [CallerMemberName] string propertyName = null )
|
||||
{
|
||||
PropertyChanged?.Invoke( this, new PropertyChangedEventArgs( propertyName ) );
|
||||
}
|
||||
|
||||
// ReSharper disable once RedundantAssignment
|
||||
public virtual void SetProperty<T>( ref T obj, T value, [CallerMemberName] string propertyName = "" )
|
||||
{
|
||||
obj = value;
|
||||
OnPropertyChanged( propertyName );
|
||||
CommandManager.InvalidateRequerySuggested();
|
||||
}
|
||||
|
||||
public class HuePickerEntry
|
||||
{
|
||||
public HueEntry Entry { get; set; }
|
||||
public string EntryName => Entry.Name ?? "Unknown";
|
||||
public int Index { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
<Window x:Class="ClassicAssist.UI.Views.Macros.MacrosCommandWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:local="clr-namespace:ClassicAssist.UI.Views.Macros"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:macros="clr-namespace:ClassicAssist.UI.ViewModels.Macros"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static resources:Strings.Commands}" Height="350" Width="400">
|
||||
<Window.DataContext>
|
||||
<macros:MacrosCommandViewModel />
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<CollectionViewSource x:Key='src' Source="{Binding Items}">
|
||||
<CollectionViewSource.GroupDescriptions>
|
||||
<PropertyGroupDescription PropertyName="Category" />
|
||||
</CollectionViewSource.GroupDescriptions>
|
||||
</CollectionViewSource>
|
||||
</Window.Resources>
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<ListView ItemsSource="{Binding Source={StaticResource src}}" SelectedItem="{Binding SelectedItem}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" ToolTip="{Binding Tooltip}" />
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.GroupStyle>
|
||||
<GroupStyle>
|
||||
<GroupStyle.ContainerStyle>
|
||||
<Style TargetType="{x:Type GroupItem}">
|
||||
<Setter Property="Margin" Value="0,0,0,5" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="{Binding Items/IsExpanded}" BorderThickness="0,0,0,0">
|
||||
<Expander.Header>
|
||||
<DockPanel>
|
||||
<TextBlock FontSize="12" Text="{Binding Path=Name}"
|
||||
Margin="5,0,0,0" Width="100" />
|
||||
</DockPanel>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
<ItemsPresenter />
|
||||
</Expander.Content>
|
||||
</Expander>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</GroupStyle.ContainerStyle>
|
||||
</GroupStyle>
|
||||
</ListView.GroupStyle>
|
||||
</ListView>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1" Margin="0,10,0,0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Margin" Value="0,0,10,0" />
|
||||
<Setter Property="Height" Value="25" />
|
||||
<Setter Property="Padding" Value="10,0,10,0" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Button Content="{x:Static resources:Strings.Close}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.Insert}" Command="{Binding InsertCommand}"
|
||||
CommandParameter="{Binding SelectedItem}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace ClassicAssist.UI.Views.Macros
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MacrosCommandWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MacrosCommandWindow : Window
|
||||
{
|
||||
public MacrosCommandWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,284 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.MacrosTabControl"
|
||||
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:avalon="http://icsharpcode.net/sharpdevelop/avalonedit"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
|
||||
xmlns:local="clr-namespace:ClassicAssist.Data.Macros"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels;assembly=ClassicAssist.Shared"
|
||||
xmlns:valueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
|
||||
xmlns:macros="clr-namespace:ClassicAssist.Data.Macros;assembly=ClassicAssist.Shared"
|
||||
xmlns:hotkeys1="clr-namespace:ClassicAssist.Data.Hotkeys;assembly=ClassicAssist.Shared"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="500" Padding="5">
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="../../Resources/ResourceDictionary.xaml" />
|
||||
<ResourceDictionary Source="../../Resources/LeftRightIconToggleButton.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<valueConverters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
|
||||
<valueConverters:CellWidthValueConverter x:Key="CellWidthValueConverter" />
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<UserControl.DataContext>
|
||||
<viewModels:MacrosTabViewModel />
|
||||
</UserControl.DataContext>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition>
|
||||
<ColumnDefinition.Style>
|
||||
<Style TargetType="{x:Type ColumnDefinition}">
|
||||
<Setter Property="Width" Value="155" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsChecked, ElementName=ToggleButton}" Value="True">
|
||||
<Setter Property="Width" Value="0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ColumnDefinition.Style>
|
||||
</ColumnDefinition>
|
||||
<ColumnDefinition Width="5" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0" Margin="0,0,5,0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox Grid.Row="0" ItemsSource="{Binding Items}" x:Name="ListBox"
|
||||
SelectedItem="{Binding SelectedItem}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
MinHeight="40" HorizontalContentAlignment="Stretch"
|
||||
IsEnabled="{Binding IsRecording, Converter={StaticResource InverseBooleanConverter}}"
|
||||
misc:ListBoxBehavior.ScrollOnNewItem="True">
|
||||
<ListBox.InputBindings>
|
||||
<KeyBinding Modifiers="Control" Key="Delete"
|
||||
Command="{Binding RemoveMacroCommand}"
|
||||
CommandParameter="{Binding SelectedItem}" />
|
||||
<KeyBinding Key="Delete"
|
||||
Command="{Binding RemoveMacroConfirmCommand}"
|
||||
CommandParameter="{Binding SelectedItem}" />
|
||||
</ListBox.InputBindings>
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:ItemsControlSelectNewEntryBehaviour SelectedItem="{Binding SelectedItem}"
|
||||
Type="{x:Type macros:MacroEntry}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" x:Name="LeftColumn" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<controls:EditTextBlock
|
||||
Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" Grid.Column="0"
|
||||
Width="{Binding ActualWidth, ConverterParameter=20, Converter={StaticResource CellWidthValueConverter}, ElementName=LeftColumn, Mode=OneWay}">
|
||||
<controls:EditTextBlock.Resources>
|
||||
<Style TargetType="{x:Type TextBlock}"
|
||||
BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger
|
||||
Binding="{Binding Global}" Value="True">
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
</DataTrigger>
|
||||
<DataTrigger
|
||||
Binding="{Binding IsRunning}" Value="True">
|
||||
<Setter Property="FontStyle" Value="Italic" />
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</controls:EditTextBlock.Resources>
|
||||
</controls:EditTextBlock>
|
||||
<TextBlock x:Name="Hotkey" Text="{Binding Hotkey}" Margin="2,0,0,0"
|
||||
Grid.Column="1" FontSize="7" Foreground="SpringGreen" TextAlignment="Right"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Right">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Hotkey}"
|
||||
Value="{x:Static hotkeys1:ShortcutKeys.Default}">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<Grid Grid.Row="1" Margin="0,5,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.Resources>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="FontSize" Value="10" />
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Button Content="{x:Static resources:Strings.Remove}" Grid.Column="0" Margin="0,0,2.5,0"
|
||||
Command="{Binding RemoveMacroConfirmCommand, Mode=OneWay}"
|
||||
CommandParameter="{Binding SelectedItem, ElementName=ListBox}">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=SelectedItem, ElementName=ListBox}"
|
||||
Value="{x:Null}">
|
||||
<Setter Property="IsEnabled" Value="False" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.New}" Grid.Column="1" Margin="2.5,0"
|
||||
Command="{Binding NewMacroCommand, Mode=OneWay}" />
|
||||
<Button Content="{x:Static resources:Strings.Save}" Grid.Column="2" Margin="2.5,0,0,0"
|
||||
Command="{Binding SaveMacroCommand, Mode=OneWay}" CommandParameter="{Binding SelectedItem}" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="2" Margin="0,5,0,5">
|
||||
<Button Content="{Binding RecordLabel}" Command="{Binding RecordCommand}" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="3" Margin="0,0,0,0">
|
||||
<Grid.Resources>
|
||||
<valueConverters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="{x:Static resources:Strings.Play}" Grid.Column="0" Margin="0,0,2.5,0"
|
||||
Command="{Binding ExecuteCommand, Mode=OneWay}"
|
||||
CommandParameter="{Binding SelectedItem, ElementName=ListBox}"
|
||||
IsEnabled="{Binding SelectedItem.IsRunning, Converter={StaticResource InverseBooleanConverter}, ElementName=ListBox}" />
|
||||
<Button Content="{x:Static resources:Strings.Stop}" Grid.Column="1" Margin="2.5,0,0,0"
|
||||
IsEnabled="{Binding SelectedItem.IsRunning, ElementName=ListBox}"
|
||||
Command="{Binding StopCommand, Mode=OneWay}" CommandParameter="{Binding SelectedItem}" />
|
||||
</Grid>
|
||||
<GroupBox Header="{x:Static resources:Strings.Hotkeys}" Grid.Row="5" Padding="5" Margin="0,5,0,0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<controls:TextBoxKey Shortcut="{Binding Hotkey}" Grid.Row="0" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Pass_to_UO}" Grid.Row="1" Padding="4,-1,0,0"
|
||||
Margin="0,5,0,0" IsChecked="{Binding SelectedItem.PassToUO}" />
|
||||
<Button Content="{x:Static resources:Strings.Clear}" Grid.Row="2" Padding="1,0,1,1"
|
||||
Margin="0,5,0,0" Command="{Binding ClearHotkeyCommand, Mode=OneWay}"
|
||||
CommandParameter="{Binding SelectedItem, ElementName=ListBox}" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" />
|
||||
<Grid Grid.Column="2" Initialized="Grid_Initialized" Margin="5,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<avalon:TextEditor ShowLineNumbers="True" x:Name="CodeTextEditor" Grid.Row="0"
|
||||
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
|
||||
FontFamily="Consolas">
|
||||
<avalon:TextEditor.InputBindings>
|
||||
<KeyBinding Modifiers="Control" Key="S" Command="{Binding SaveMacroCommand}" />
|
||||
</avalon:TextEditor.InputBindings>
|
||||
<avalon:TextEditor.Style>
|
||||
<Style TargetType="{x:Type avalon:TextEditor}"
|
||||
BasedOn="{StaticResource {x:Type avalon:TextEditor}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding SelectedItem, ElementName=ListBox}" Value="{x:Null}">
|
||||
<Setter Property="IsEnabled" Value="False" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsRecording}" Value="True">
|
||||
<Setter Property="IsEnabled" Value="False" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</avalon:TextEditor.Style>
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:AvalonEditBehaviour
|
||||
TextBinding="{Binding SelectedItem.Macro, ElementName=ListBox, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<misc:AvalonBindingBehaviour DocumentBinding="{Binding Document}"
|
||||
CaretBinding="{Binding CaretPosition}" />
|
||||
</i:Interaction.Behaviors>
|
||||
</avalon:TextEditor>
|
||||
<WrapPanel Orientation="Horizontal" Grid.Row="1" Margin="5">
|
||||
<WrapPanel.Resources>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
||||
<Setter Property="Margin" Value="0,0,10,0" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=SelectedItem, ElementName=ListBox}"
|
||||
Value="{x:Null}">
|
||||
<Setter Property="IsEnabled" Value="False" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</WrapPanel.Resources>
|
||||
<CheckBox Content="{x:Static resources:Strings.Loop}"
|
||||
IsChecked="{Binding SelectedItem.Loop, ElementName=ListBox}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Do_not_auto_interupt}"
|
||||
IsChecked="{Binding SelectedItem.DoNotAutoInterrupt, ElementName=ListBox}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Run_in_background}"
|
||||
IsChecked="{Binding SelectedItem.IsBackground, ElementName=ListBox}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Autostart}"
|
||||
IsChecked="{Binding SelectedItem.IsAutostart, ElementName=ListBox}"
|
||||
ToolTip="{x:Static resources:Strings.When_checked_macro_will_execute_automatically_after_login_}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Undisableable}"
|
||||
ToolTip="{x:Static resources:Strings.Hotkey_will_still_trigger_with_hotkeys_disabled}"
|
||||
IsChecked="{Binding SelectedItem.Disableable, Converter={StaticResource InverseBooleanConverter}}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Global}"
|
||||
ToolTip="{x:Static resources:Strings.Loaded_to_all_profiles}"
|
||||
IsChecked="{Binding SelectedItem.Global}" />
|
||||
</WrapPanel>
|
||||
<Grid Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton x:Name="ToggleButton" Height="15" Grid.Column="0" Margin="0"
|
||||
Style="{DynamicResource LeftRightIconToggleButton}" VerticalAlignment="Bottom" />
|
||||
<controls:StretchyWrapPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Center">
|
||||
<controls:StretchyWrapPanel.Resources>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Margin" Value="0,10,10,0" />
|
||||
<Setter Property="Padding" Value="10,0,10,0" />
|
||||
<Setter Property="Height" Value="25" />
|
||||
</Style>
|
||||
</controls:StretchyWrapPanel.Resources>
|
||||
<Button Content="{x:Static resources:Strings.Object_Inspector}"
|
||||
Command="{Binding InspectObjectCommand, Mode=OneWay}" />
|
||||
<Button Content="{x:Static resources:Strings.Commands}" Command="{Binding ShowCommandsCommand}" />
|
||||
<Button Command="{Binding ShowMacrosWikiCommand}" Padding="5,0,5,0"
|
||||
ToolTip="{x:Static resources:Strings.Macro_Commands_Wiki__Launches_in_Browser_}">
|
||||
<Image Source="{StaticResource WebIcon}" Height="16" />
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.Active_Objects}"
|
||||
Command="{Binding ShowActiveObjectsWindowCommand}" />
|
||||
</controls:StretchyWrapPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,90 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Xml;
|
||||
using ClassicAssist.Data.Macros;
|
||||
using ICSharpCode.AvalonEdit.CodeCompletion;
|
||||
using ICSharpCode.AvalonEdit.Document;
|
||||
using ICSharpCode.AvalonEdit.Highlighting;
|
||||
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
|
||||
using ICSharpCode.AvalonEdit.Search;
|
||||
using Microsoft.Scripting.Utils;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MacrosTabControl.xaml
|
||||
/// </summary>
|
||||
public partial class MacrosTabControl : UserControl
|
||||
{
|
||||
private List<PythonCompletionData> _completionData;
|
||||
private CompletionWindow _completionWindow;
|
||||
|
||||
public MacrosTabControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Grid_Initialized( object sender, EventArgs e )
|
||||
{
|
||||
CodeTextEditor.SyntaxHighlighting = HighlightingLoader.Load(
|
||||
new XmlTextReader( Path.Combine( Path.GetDirectoryName( Assembly.GetExecutingAssembly().Location ),
|
||||
"Python.Dark.xshd" ) ), HighlightingManager.Instance );
|
||||
|
||||
IEnumerable<Type> namespaces = Assembly.GetExecutingAssembly().GetTypes().Where( t =>
|
||||
t.Namespace != null && t.IsPublic && t.IsClass && t.Namespace.EndsWith( "Macros.Commands" ) );
|
||||
|
||||
_completionData = new List<PythonCompletionData>();
|
||||
|
||||
foreach ( Type type in namespaces )
|
||||
{
|
||||
MethodInfo[] methods = type.GetMethods( BindingFlags.Public | BindingFlags.Static );
|
||||
|
||||
foreach ( MethodInfo methodInfo in methods )
|
||||
{
|
||||
CommandsDisplayAttribute attr = methodInfo.GetCustomAttribute<CommandsDisplayAttribute>();
|
||||
|
||||
if ( attr == null )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
_completionData.Add(
|
||||
new PythonCompletionData( methodInfo.Name, attr.Description, attr.InsertText ) );
|
||||
}
|
||||
}
|
||||
|
||||
CodeTextEditor.TextArea.TextEntered += OnTextEntered;
|
||||
SearchPanel.Install( CodeTextEditor );
|
||||
}
|
||||
|
||||
private void OnTextEntered( object sender, TextCompositionEventArgs e )
|
||||
{
|
||||
DocumentLine line = CodeTextEditor.TextArea.Document.Lines[CodeTextEditor.TextArea.Caret.Line - 1];
|
||||
|
||||
string trimmed = CodeTextEditor.TextArea.Document.GetText( line ).TrimStart( ' ', '\t' );
|
||||
|
||||
if ( trimmed.TrimStart( ' ', '\t' ).Length < 3 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
List<PythonCompletionData> data = _completionData.Where( m =>
|
||||
( (string) m.Content ).StartsWith( trimmed, StringComparison.InvariantCultureIgnoreCase ) ).ToList();
|
||||
|
||||
if ( data.Count <= 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_completionWindow = new CompletionWindow( CodeTextEditor.TextArea );
|
||||
_completionWindow.CompletionList.CompletionData.AddRange( data );
|
||||
_completionWindow.Show();
|
||||
_completionWindow.Closed += delegate { _completionWindow = null; };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
<Window x:Class="ClassicAssist.UI.Views.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:local="clr-namespace:ClassicAssist.UI.Views"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels;assembly=ClassicAssist.Shared"
|
||||
xmlns:r="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:controls="clr-namespace:ClassicAssist.UI.Controls"
|
||||
xmlns:browser="clr-namespace:ClassicAssist.Browser"
|
||||
mc:Ignorable="d"
|
||||
Height="500" Width="625" Topmost="{Binding AlwaysOnTop}"
|
||||
MinHeight="400" MinWidth="400"
|
||||
Background="{DynamicResource ThemeWindowBackgroundBrush}"
|
||||
AllowsTransparency="True" WindowStyle="None" WindowState="Normal"
|
||||
Title="{Binding Title}" x:Name="window" ResizeMode="CanResizeWithGrip">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:LoadOptionsOnWindowLoaded />
|
||||
<misc:WindowResizeBehaviour/>
|
||||
</i:Interaction.Behaviors>
|
||||
<Window.DataContext>
|
||||
<viewModels:MainWindowViewModel />
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../Resources/Icons.xaml" />
|
||||
<ResourceDictionary Source="../../Resources/ResourceDictionary.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<DockPanel>
|
||||
<controls:CustomWindowTitleControl DockPanel.Dock="Top" CustomTitle="{Binding Path=Title, ElementName=window}"
|
||||
CanClose="False" />
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0" Margin="10">
|
||||
<TabControl>
|
||||
<TabItem Header="{x:Static r:Strings.General}">
|
||||
<local:GeneralControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static r:Strings.Options}">
|
||||
<local:OptionsTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static r:Strings.Hotkeys}">
|
||||
<local:HotkeysTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static r:Strings.Macros}">
|
||||
<local:MacrosTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static r:Strings.Skills}">
|
||||
<local:SkillsTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static r:Strings.Agents}">
|
||||
<local:AgentsTabControl />
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static r:Strings.Public_Macros}">
|
||||
<browser:MacroBrowserControl/>
|
||||
</TabItem>
|
||||
<TabItem Header="{x:Static r:Strings.About}">
|
||||
<local:AboutControl />
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid Grid.Row="1" HorizontalAlignment="Left" Margin="5,0,5,5">
|
||||
<Button Command="{Binding DebugCommand}">
|
||||
<Image Source="{StaticResource bugIcon}" Height="16" Width="16" />
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</Window>
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using ClassicAssist.Shared;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<Window
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:local="clr-namespace:ClassicAssist.UI.Views"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.Shared.UI.ViewModels;assembly=ClassicAssist.Shared"
|
||||
xmlns:ValueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
x:Class="ClassicAssist.UI.Views.NewProfileWindow"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static resources:Strings.New_Profile}" Height="130" Width="290" WindowStyle="ToolWindow">
|
||||
<Window.Resources>
|
||||
<ValueConverters:EnumMatchToBooleanConverter x:Key="EnumMatchToBooleanConverter" />
|
||||
</Window.Resources>
|
||||
<Window.DataContext>
|
||||
<viewModels:NewProfileViewModel />
|
||||
</Window.DataContext>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0" Margin="10,10,10,5">
|
||||
<TextBlock Text="{x:Static resources:Strings.Name_}" Margin="0,0,20,0" />
|
||||
<TextBox Width="200" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="1" Margin="10,5,10,10">
|
||||
<RadioButton Content="{x:Static resources:Strings.Blank}" Margin="0,0,30,0"
|
||||
IsChecked="{Binding Option, ConverterParameter=Blank, Converter={StaticResource EnumMatchToBooleanConverter}}" />
|
||||
<RadioButton Content="{x:Static resources:Strings.Duplicate}"
|
||||
IsChecked="{Binding Option, ConverterParameter=Duplicate, Converter={StaticResource EnumMatchToBooleanConverter}}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="2">
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="MinWidth" Value="80" />
|
||||
<Setter Property="Margin" Value="10,0,0,0" />
|
||||
<Setter Property="Padding" Value="20,2,20,2" />
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
<Button Content="{x:Static resources:Strings.OK}" Command="{Binding OkCommand}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
<Button Content="{x:Static resources:Strings.Cancel}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for NewProfileWindow.xaml
|
||||
/// </summary>
|
||||
public partial class NewProfileWindow : Window
|
||||
{
|
||||
public NewProfileWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<Window x:Class="ClassicAssist.UI.Views.ObjectInspectorWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:viewModels="clr-namespace:ClassicAssist.UI.ViewModels;assembly=ClassicAssist.Shared"
|
||||
xmlns:r="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static r:Strings.Object_Inspector}" Height="396.8" Width="450" Topmost="True">
|
||||
<Window.InputBindings>
|
||||
<KeyBinding Modifiers="Ctrl" Key="C" Command="{Binding CopyToClipboardCommand}" />
|
||||
</Window.InputBindings>
|
||||
<Window.DataContext>
|
||||
<viewModels:ObjectInspectorViewModel />
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<CollectionViewSource x:Key='src' Source="{Binding Items}">
|
||||
<CollectionViewSource.GroupDescriptions>
|
||||
<PropertyGroupDescription PropertyName="Category" />
|
||||
</CollectionViewSource.GroupDescriptions>
|
||||
</CollectionViewSource>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<ListView ItemsSource="{Binding Source={StaticResource src}}"
|
||||
SelectedValue="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:ListViewDoubleClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Width="150" Header="{x:Static r:Strings.Property}"
|
||||
DisplayMemberBinding="{Binding Name}" />
|
||||
<GridViewColumn Width="250" Header="{x:Static r:Strings.Value}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Value}" TextWrapping="Wrap" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
<ListView.GroupStyle>
|
||||
<GroupStyle>
|
||||
<GroupStyle.ContainerStyle>
|
||||
<Style TargetType="{x:Type GroupItem}">
|
||||
<Setter Property="Margin" Value="0,0,0,5" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GroupItem}">
|
||||
<Expander IsExpanded="{Binding Items/IsExpanded}" BorderThickness="0,0,0,0">
|
||||
<Expander.Header>
|
||||
<DockPanel>
|
||||
<TextBlock FontSize="12" Text="{Binding Path=Name}"
|
||||
Margin="5,0,0,0" Width="100" />
|
||||
</DockPanel>
|
||||
</Expander.Header>
|
||||
<Expander.Content>
|
||||
<ItemsPresenter />
|
||||
</Expander.Content>
|
||||
</Expander>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</GroupStyle.ContainerStyle>
|
||||
</GroupStyle>
|
||||
</ListView.GroupStyle>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ObjectInpectorWindow.xaml
|
||||
/// </summary>
|
||||
public partial class ObjectInspectorWindow : Window
|
||||
{
|
||||
public ObjectInspectorWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
<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:viewModels="clr-namespace:ClassicAssist.UI.ViewModels;assembly=ClassicAssist.Shared"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.Misc"
|
||||
xmlns:misc1="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:data="clr-namespace:ClassicAssist.Data"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:misc11="clr-namespace:ClassicAssist.Data;assembly=ClassicAssist.Shared"
|
||||
x:Class="ClassicAssist.UI.Views.OptionsTabControl"
|
||||
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.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../Resources/ResourceDictionary.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<UserControl.DataContext>
|
||||
<viewModels:OptionsTabViewModel />
|
||||
</UserControl.DataContext>
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0">
|
||||
<StackPanel.Resources>
|
||||
<misc:BindingProxy x:Key="proxy" Data="{Binding}" />
|
||||
</StackPanel.Resources>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
|
||||
<Label Content="{x:Static resources:Strings.Language}" />
|
||||
<ComboBox Margin="10,0,10,0"
|
||||
ItemsSource="{Binding Source={misc1:EnumBindingSource {x:Type misc11:Language}}}"
|
||||
x:Name="langCombo" SelectedItem="{x:Static misc11:AssistantOptions.LanguageOverride}"
|
||||
MinWidth="100">
|
||||
<i:Interaction.Behaviors>
|
||||
<misc1:ComboBoxBehavior CommandBinding="{Binding SetLanguageOverrideCommand}"
|
||||
CommandParameter="{Binding SelectedItem, ElementName=langCombo}"
|
||||
OnlyUserTriggered="True" />
|
||||
</i:Interaction.Behaviors>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
|
||||
<Label Content="{x:Static resources:Strings.Command_Prefix_}" />
|
||||
<ComboBox Text="{Binding CurrentOptions.CommandPrefix}" Margin="10,0,10,0" Padding="10,2,10,2"
|
||||
MinWidth="50">
|
||||
<ComboBoxItem Content="+" />
|
||||
<ComboBoxItem Content="=" />
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
|
||||
<Label Content="{x:Static resources:Strings.Smart_last_target_}" />
|
||||
<ComboBox Text="{Binding CurrentOptions.SmartTargetOption, Mode=TwoWay}" Margin="10,0,10,0"
|
||||
ItemsSource="{Binding Source={misc1:EnumBindingSource {x:Type misc11:SmartTargetOption}}}"
|
||||
MinWidth="100" />
|
||||
</StackPanel>
|
||||
<CheckBox Content="{x:Static resources:Strings.Persist_Use_Once}"
|
||||
IsChecked="{Binding CurrentOptions.PersistUseOnce, Mode=TwoWay}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Use_death_screen_whilst_hidden}"
|
||||
IsChecked="{Binding CurrentOptions.UseDeathScreenWhilstHidden}" />
|
||||
<CheckBox IsChecked="{Binding CurrentOptions.RangeCheckLastTarget}" DataContext="{Binding}">
|
||||
<CheckBox.ContentTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{x:Static resources:Strings.Range_check_last_target}" TextWrapping="Wrap" />
|
||||
<TextBox Width="40" Margin="5,0,0,0"
|
||||
Text="{Binding Path=Data.CurrentOptions.RangeCheckLastTargetAmount, Source={StaticResource proxy}}" />
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</CheckBox.ContentTemplate>
|
||||
</CheckBox>
|
||||
<CheckBox Content="{x:Static resources:Strings.Use_experimental_fizzle_detection}"
|
||||
IsChecked="{Binding CurrentOptions.UseExperimentalFizzleDetection}" />
|
||||
<CheckBox IsChecked="{Binding CurrentOptions.UseObjectQueue}" DataContext="{Binding}">
|
||||
<CheckBox.ContentTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Content="{x:Static resources:Strings.Use_object_queue}" Margin="0" />
|
||||
<TextBox Width="40" Margin="10,0,10,0"
|
||||
Text="{Binding Path=Data.CurrentOptions.UseObjectQueueAmount, Source={StaticResource proxy}}" />
|
||||
<Label Content="{x:Static resources:Strings.items}" Margin="0"
|
||||
Padding="0,0,0,0" />
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</CheckBox.ContentTemplate>
|
||||
</CheckBox>
|
||||
<CheckBox IsChecked="{Binding CurrentOptions.LimitMouseWheelTrigger}" DataContext="{Binding}">
|
||||
<CheckBox.ContentTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{x:Static resources:Strings.Limit_Mouse_Wheel_Retrigger}" Margin="0"
|
||||
TextWrapping="Wrap" VerticalAlignment="Center" />
|
||||
<TextBox Width="40" Margin="10,0,10,0"
|
||||
Text="{Binding Path=Data.CurrentOptions.LimitMouseWheelTriggerMS, Source={StaticResource proxy}}"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBlock Text="ms" TextWrapping="Wrap"
|
||||
Margin="5,0,0,0" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</CheckBox.ContentTemplate>
|
||||
</CheckBox>
|
||||
<CheckBox Content="{x:Static resources:Strings.Auto_accept_party_invites}"
|
||||
IsChecked="{Binding CurrentOptions.AutoAcceptPartyInvite}" />
|
||||
<CheckBox IsChecked="{Binding CurrentOptions.AutoAcceptPartyOnlyFromFriends}">
|
||||
<TextBlock Text="{x:Static resources:Strings.Auto_accept_only_from_friends}" TextWrapping="Wrap" />
|
||||
</CheckBox>
|
||||
<CheckBox Content="{x:Static resources:Strings.Macros_default_to_quiet_mode}"
|
||||
IsChecked="{Binding CurrentOptions.DefaultMacroQuietMode}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Check_hands_before_potions}"
|
||||
IsChecked="{Binding CurrentOptions.CheckHandsPotions}" />
|
||||
</StackPanel>
|
||||
<StackPanel x:Name="stackPanel" Grid.Column="1">
|
||||
<CheckBox IsChecked="{Binding CurrentOptions.PreventTargetingInnocentsInGuardzone}"
|
||||
ToolTip="{x:Static resources:Strings.Applies_to_hotkeys___macros_only_}">
|
||||
<TextBlock Text="{x:Static resources:Strings.Prevent_targeting_innocents_in_guardzone}"
|
||||
TextWrapping="Wrap" />
|
||||
</CheckBox>
|
||||
<CheckBox IsChecked="{Binding CurrentOptions.PreventAttackingInnocentsInGuardzone}"
|
||||
ToolTip="{x:Static resources:Strings.Applies_to_hotkeys___macros_only_}">
|
||||
<TextBlock Text="{x:Static resources:Strings.Prevent_attacking_innocents_in_guardzone}"
|
||||
TextWrapping="Wrap" />
|
||||
</CheckBox>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Content="{x:Static resources:Strings.Last_target_message_}" Grid.Row="0" Grid.Column="0" />
|
||||
<TextBox Text="{Binding CurrentOptions.LastTargetMessage}" Grid.Row="0" Grid.Column="1" />
|
||||
<Label Content="{x:Static resources:Strings.Friend_target_message_}" Grid.Row="1" Grid.Column="0" />
|
||||
<TextBox Text="{Binding CurrentOptions.FriendTargetMessage}" Grid.Row="1" Grid.Column="1" />
|
||||
<Label Content="{x:Static resources:Strings.Enemy_target_message_}" Grid.Row="2" Grid.Column="0" />
|
||||
<TextBox Text="{Binding CurrentOptions.EnemyTargetMessage}" Grid.Row="2" Grid.Column="1" />
|
||||
</Grid>
|
||||
<CheckBox Content="{x:Static resources:Strings.GetFriend_GetEnemy_uses_ignore_list}"
|
||||
IsChecked="{Binding CurrentOptions.GetFriendEnemyUsesIgnoreList}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Abilities_Gump}"
|
||||
IsChecked="{Binding CurrentOptions.AbilitiesGump}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Show_running_macros_gump}"
|
||||
IsChecked="{Binding CurrentOptions.MacrosGump}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Show_Profile_Name_In_Title}"
|
||||
IsChecked="{Binding CurrentOptions.ShowProfileNameWindowTitle}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Queue_Last_Target___Target_Self}"
|
||||
IsChecked="{Binding CurrentOptions.QueueLastTarget}" />
|
||||
<DockPanel IsEnabled="{Binding CurrentOptions.QueueLastTarget}">
|
||||
<Label Content="{x:Static resources:Strings.Max_Target_Queue_Length_}" DockPanel.Dock="Left" />
|
||||
<xctk:IntegerUpDown Minimum="1" Maximum="100" Value="{Binding CurrentOptions.MaxTargetQueueLength}"
|
||||
Width="50" UpdateValueOnEnterKey="True" DockPanel.Dock="Right" Margin="10,0,0,0" />
|
||||
</DockPanel>
|
||||
<CheckBox Content="{x:Static resources:Strings.Sort_Macros_Alphabetical}"
|
||||
IsChecked="{Binding CurrentOptions.SortMacrosAlphabetical}" />
|
||||
<CheckBox Content="{x:Static resources:Strings.Show_resurrection_waypoints}"
|
||||
IsChecked="{Binding CurrentOptions.ShowResurrectionWaypoints}"
|
||||
ToolTip="{x:Static resources:Strings.Requires_Server_Support}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for OptionsTabControl.xaml
|
||||
/// </summary>
|
||||
public partial class OptionsTabControl : UserControl
|
||||
{
|
||||
public OptionsTabControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<Window x:Class="ClassicAssist.UI.Views.RepositionableGumpWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:local="clr-namespace:ClassicAssist.UI.Views"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels;assembly=ClassicAssist.Shared"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:misc="clr-namespace:ClassicAssist.UI.Misc"
|
||||
mc:Ignorable="d" WindowStartupLocation="CenterScreen" Opacity="0.5" WindowStyle="None"
|
||||
AllowsTransparency="True" Topmost="True"
|
||||
Title="Position" Height="130" Width="200" Background="{DynamicResource ThemeWindowBackgroundBrush}"
|
||||
ResizeMode="NoResize">
|
||||
<Window.DataContext>
|
||||
<viewModels:RepositionableGumpViewModel />
|
||||
</Window.DataContext>
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../../Resources/DarkTheme.xaml" />
|
||||
<ResourceDictionary>
|
||||
<DrawingImage x:Key="TickIcon">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
|
||||
<GeometryDrawing Brush="#FF8CA82F" Geometry="F1 M512,512z M0,0z M504.5,118.618L504.5,118.618 483.287,97.405 151.954,378.738 151.954,428.738 173.167,449.951z" />
|
||||
<GeometryDrawing Brush="#FFA5C244" Geometry="F1 M512,512z M0,0z M447.932,62.049L447.932,62.049 173.167,336.814 64.068,227.716 7.5,284.284 151.954,428.738 483.287,97.405z" />
|
||||
<GeometryDrawing Brush="#FF000000" Geometry="F1 M512,512z M0,0z M509.803,113.315L453.235,56.746C451.829,55.34 449.921,54.549 447.932,54.549 445.943,54.549 444.036,55.339 442.629,56.746L173.167,326.208 69.372,222.413C67.965,221.007 66.058,220.216 64.069,220.216 62.08,220.216 60.172,221.006 58.766,222.413L2.197,278.981C-0.732,281.91,-0.732,286.659,2.197,289.587L167.864,455.254C169.328,456.719 171.248,457.451 173.167,457.451 175.086,457.451 177.006,456.719 178.47,455.254L509.803,123.921C512.733,120.992,512.733,116.244,509.803,113.315z M173.167,439.344L18.107,284.285 64.069,238.323 167.864,342.118C170.793,345.047,175.542,345.047,178.47,342.118L447.932,72.656 493.894,118.618 173.167,439.344z" />
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<Grid Margin="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Slider Grid.Row="0" Grid.Column="0" Orientation="Vertical" Maximum="{Binding VerticalMax}"
|
||||
Value="{Binding Y}" IsDirectionReversed="True" />
|
||||
<StackPanel Grid.Row="0" Grid.Column="1">
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="X:" Margin="5" />
|
||||
<TextBox Width="130" Text="{Binding X, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="Y:" Margin="5" />
|
||||
<TextBox Width="130" Text="{Binding Y, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="0" Grid.Column="2" VerticalAlignment="Top">
|
||||
<Button Background="Transparent" BorderBrush="Transparent" BorderThickness="0">
|
||||
<Image Source="{StaticResource TickIcon}" Height="16"/>
|
||||
<i:Interaction.Behaviors>
|
||||
<misc:CloseOnClickBehaviour />
|
||||
</i:Interaction.Behaviors>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<Slider Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,10,0,0"
|
||||
Maximum="{Binding HorizontalMax}" Value="{Binding X}" />
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for RepositionableGumpWindow.xaml
|
||||
/// </summary>
|
||||
public partial class RepositionableGumpWindow : Window
|
||||
{
|
||||
public RepositionableGumpWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
<UserControl x:Class="ClassicAssist.UI.Views.SkillsTabControl"
|
||||
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:misc="clr-namespace:ClassicAssist.Misc"
|
||||
xmlns:misc1="clr-namespace:ClassicAssist.UI.Misc"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:viewModels="clr-namespace:ClassicAssist.UI.ViewModels;assembly=ClassicAssist.Shared"
|
||||
xmlns:valueConverters="clr-namespace:ClassicAssist.UI.Misc.ValueConverters"
|
||||
xmlns:resources="clr-namespace:ClassicAssist.Shared.Resources;assembly=ClassicAssist.Shared"
|
||||
xmlns:data="clr-namespace:ClassicAssist.UO.Data;assembly=ClassicAssist.Shared"
|
||||
mc:Ignorable="d">
|
||||
<d:DesignerProperties.DesignStyle>
|
||||
<Style TargetType="UserControl">
|
||||
<Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
|
||||
</Style>
|
||||
</d:DesignerProperties.DesignStyle>
|
||||
<UserControl.DataContext>
|
||||
<viewModels:SkillsTabViewModel />
|
||||
</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="*" />
|
||||
<ColumnDefinition Width="110" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.Resources>
|
||||
<valueConverters:LockStatusValueConverter x:Key="LockStatusValueConverter" />
|
||||
<valueConverters:SetSkillLockMultiValueConverter x:Key="MenuItemMultiValueConverter" />
|
||||
<!--ContextMenu in a different visual tree, https://stackoverflow.com/questions/3583507/wpf-binding-a-contextmenu-to-an-mvvm-command-->
|
||||
<misc:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Margin" Value="0,7,0,0" />
|
||||
</Style>
|
||||
<ContextMenu x:Key="ItemContextMenu">
|
||||
<MenuItem Header="{x:Static resources:Strings.Set_Up}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.SetSkillLocksCommand}"
|
||||
CommandParameter="{x:Static data:LockStatus.Up}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Set_Down}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.SetSkillLocksCommand}"
|
||||
CommandParameter="{x:Static data:LockStatus.Down}" />
|
||||
<MenuItem Header="{x:Static resources:Strings.Set_Locked}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.SetSkillLocksCommand}"
|
||||
CommandParameter="{x:Static data:LockStatus.Locked}" />
|
||||
<Separator />
|
||||
<MenuItem Header="{x:Static resources:Strings.Use_skill}"
|
||||
Command="{Binding Source={StaticResource Proxy}, Path=Data.UseSkillCommand}" />
|
||||
</ContextMenu>
|
||||
</Grid.Resources>
|
||||
<ListView Grid.Column="0" ItemsSource="{Binding Items}" Margin="5"
|
||||
GridViewColumnHeader.Click="GridViewHeaderOnClick" x:Name="listView"
|
||||
SelectedItem="{Binding SelectedItem}" ContextMenu="{StaticResource ItemContextMenu}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<misc1:SkillsGridViewColumn Header="{x:Static resources:Strings.Name}"
|
||||
DisplayMemberBinding="{Binding Skill}" Width="130"
|
||||
SortField="Name" />
|
||||
<misc1:SkillsGridViewColumn Header="{x:Static resources:Strings.Value}" Width="70"
|
||||
SortField="Value"
|
||||
DisplayMemberBinding="{Binding Value}" />
|
||||
<misc1:SkillsGridViewColumn Header="{x:Static resources:Strings.Base}" Width="70" SortField="Base"
|
||||
DisplayMemberBinding="{Binding Base}" />
|
||||
<misc1:SkillsGridViewColumn Header="+/-" Width="50" SortField="Delta"
|
||||
DisplayMemberBinding="{Binding Delta, StringFormat={}{0:0.#}}" />
|
||||
<misc1:SkillsGridViewColumn Header="{x:Static resources:Strings.Cap}" Width="70" SortField="Cap"
|
||||
DisplayMemberBinding="{Binding Cap}" />
|
||||
<misc1:SkillsGridViewColumn Header="{x:Static resources:Strings.Status}" Width="40"
|
||||
SortField="LockStatus">
|
||||
<misc1:SkillsGridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image
|
||||
Source="{Binding LockStatus, Converter={StaticResource LockStatusValueConverter}}"
|
||||
HorizontalAlignment="Center" Width="40" Stretch="Uniform" Height="10"
|
||||
VerticalAlignment="Center" />
|
||||
</DataTemplate>
|
||||
</misc1:SkillsGridViewColumn.CellTemplate>
|
||||
</misc1:SkillsGridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<StackPanel Grid.Column="1" Margin="10,0,10,10">
|
||||
<StackPanel.Resources>
|
||||
<ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}" x:Key="SkillStatesEnum">
|
||||
<ObjectDataProvider.MethodParameters>
|
||||
<x:Type TypeName="data:LockStatus" />
|
||||
</ObjectDataProvider.MethodParameters>
|
||||
</ObjectDataProvider>
|
||||
</StackPanel.Resources>
|
||||
<Button Content="{x:Static resources:Strings.Reset____}"
|
||||
Command="{Binding ResetDeltasCommand, Mode=OneWay}" />
|
||||
<TextBlock Text="{x:Static resources:Strings.All_skills_}" Margin="0,20,0,0" />
|
||||
<ComboBox x:Name="comboBox" ItemsSource="{Binding Mode=OneWay, Source={StaticResource SkillStatesEnum}}"
|
||||
Margin="0,5,0,0" SelectedIndex="0" />
|
||||
<Button Content="{x:Static resources:Strings.Set}" Command="{Binding SetAllSkillLocksCommand, Mode=OneWay}"
|
||||
CommandParameter="{Binding SelectedIndex, ElementName=comboBox}" />
|
||||
<TextBlock Text="{x:Static resources:Strings.Total_base_}" Margin="0,30,0,0" TextWrapping="Wrap" />
|
||||
<TextBlock Text="{Binding TotalBase}" FontWeight="Bold" Margin="0,3,0,0" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,66 @@
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using ClassicAssist.Data.Skills;
|
||||
using ClassicAssist.UI.Misc;
|
||||
|
||||
namespace ClassicAssist.UI.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SkillsTabControl.xaml
|
||||
/// </summary>
|
||||
public partial class SkillsTabControl : UserControl
|
||||
{
|
||||
private ListSortDirection _lastDirection;
|
||||
private GridViewColumnHeader _lastHeaderClicked;
|
||||
|
||||
public SkillsTabControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void GridViewHeaderOnClick( object sender, RoutedEventArgs e )
|
||||
{
|
||||
GridViewColumnHeader headerClicked = e.OriginalSource as GridViewColumnHeader;
|
||||
ListSortDirection direction;
|
||||
|
||||
if ( headerClicked == null || headerClicked.Role == GridViewColumnHeaderRole.Padding )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !Equals( headerClicked, _lastHeaderClicked ) )
|
||||
{
|
||||
direction = ListSortDirection.Ascending;
|
||||
}
|
||||
else
|
||||
{
|
||||
direction = _lastDirection == ListSortDirection.Ascending
|
||||
? ListSortDirection.Descending
|
||||
: ListSortDirection.Ascending;
|
||||
}
|
||||
|
||||
if ( headerClicked.Column is SkillsGridViewColumn column )
|
||||
{
|
||||
Sort( (string) headerClicked.Column.Header, direction, column.SortField );
|
||||
}
|
||||
|
||||
_lastHeaderClicked = headerClicked;
|
||||
_lastDirection = direction;
|
||||
}
|
||||
|
||||
private void Sort( string header, ListSortDirection direction, SkillsGridViewColumn.Enums sortField )
|
||||
{
|
||||
ListCollectionView dataView =
|
||||
(ListCollectionView) CollectionViewSource.GetDefaultView( listView.ItemsSource );
|
||||
|
||||
dataView.SortDescriptions.Clear();
|
||||
SortDescription sd = new SortDescription( header, direction );
|
||||
dataView.SortDescriptions.Add( sd );
|
||||
|
||||
dataView.CustomSort = new SkillComparer( direction, sortField );
|
||||
dataView.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user