2024-12-13 07:21:14 +00:00
|
|
|
<UserControl xmlns="https://github.com/avaloniaui"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:vm="using:Presence.Desktop.ViewModels"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:Class="Presence.Desktop.Views.GroupView"
|
|
|
|
x:DataType="vm:GroupViewModel">
|
|
|
|
|
|
|
|
<Design.DataContext>
|
|
|
|
<vm:GroupViewModel/>
|
|
|
|
</Design.DataContext>
|
|
|
|
<DockPanel Background="Azure">
|
|
|
|
<StackPanel DockPanel.Dock="Bottom">
|
|
|
|
<TextBlock Text="List ↑" HorizontalAlignment="Center"/>
|
2024-12-21 11:14:33 +00:00
|
|
|
<TextBlock Text="{Binding Users.Count, StringFormat='Количество студентов: {0}'}"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Margin="10,10,0,0"
|
|
|
|
Foreground="Black"
|
|
|
|
IsVisible="{Binding SelectedGroupItem, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
2024-12-22 12:37:22 +00:00
|
|
|
<Button Content="Перейти к посещаемости"
|
|
|
|
Command="{Binding NavigateToPresenceCommand}"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Margin="0,10,0,0"
|
|
|
|
Foreground="Black"/>
|
2024-12-13 07:21:14 +00:00
|
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
|
|
Spacing="10"
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
DockPanel.Dock="Top"
|
|
|
|
Orientation="Horizontal">
|
|
|
|
<TextBlock Text="Combobox ->"/>
|
|
|
|
<ComboBox ItemsSource="{Binding Groups}" SelectedValue="{Binding SelectedGroupItem}">
|
|
|
|
<ComboBox.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<TextBlock Text="{Binding Name}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</ComboBox.ItemTemplate>
|
|
|
|
</ComboBox>
|
2024-12-17 09:13:12 +00:00
|
|
|
<Button Width="100" Command="{Binding OpenFileDialog}"/>
|
2024-12-13 07:21:14 +00:00
|
|
|
<ComboBox/>
|
|
|
|
</StackPanel>
|
|
|
|
<Border>
|
2024-12-21 11:14:33 +00:00
|
|
|
<ListBox SelectionMode="Multiple" Selection="{Binding Selection}" Background="Bisque" ItemsSource="{Binding Users}">
|
|
|
|
<ListBox.ContextMenu>
|
|
|
|
<ContextMenu>
|
|
|
|
<MenuItem
|
|
|
|
IsVisible="{Binding !MultipleSelected}"
|
|
|
|
Header="Remove"
|
|
|
|
Command="{Binding RemoveUserCommand}"
|
|
|
|
CommandParameter="{Binding Selection.SelectedItem}"
|
|
|
|
Foreground="Black"/>
|
|
|
|
<MenuItem
|
|
|
|
IsVisible="{Binding !MultipleSelected}"
|
|
|
|
Header="Edit"
|
|
|
|
Command="{Binding EditUserCommand}"
|
|
|
|
CommandParameter="{Binding Selection.SelectedItem}"
|
|
|
|
Foreground="Black"/>
|
|
|
|
<MenuItem
|
|
|
|
IsVisible="{Binding MultipleSelected}"
|
|
|
|
Header="RemoveAll"
|
|
|
|
Command="{Binding RemoveAllSelectedCommand}"
|
|
|
|
Foreground="Black"/>
|
|
|
|
</ContextMenu>
|
|
|
|
</ListBox.ContextMenu>
|
2024-12-13 07:21:14 +00:00
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2024-12-17 09:13:12 +00:00
|
|
|
<TextBlock Text="{Binding Name}" Foreground="Black"/>
|
2024-12-13 07:21:14 +00:00
|
|
|
</StackPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
</ListBox>
|
|
|
|
</Border>
|
|
|
|
</DockPanel>
|
|
|
|
</UserControl>
|