first commit

This commit is contained in:
Beyhan Oğur
2026-09-03 04:45:36 +03:00
commit d5f52cc3d3
1038 changed files with 169579 additions and 0 deletions
@@ -0,0 +1,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>