aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/DBViews/UserView.xaml
blob: 62802c5d9424422df6cf063ba944f6ea87593a1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<UserControl x:Class="Tango.MachineStudio.UI.Views.DBViews.UserView"
             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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:controls="clr-namespace:Tango.MachineStudio.UI.Controls"
             xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views.DBViews"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <Grid>
        <controls:TableGrid>
            <TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
            <TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True" IsEnabled="False"></TextBox>
            <TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
            <TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True" IsEnabled="False"></TextBox>
            <TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
            <TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True" IsEnabled="False"></TextBox>
            <TextBlock Text="Email:" FontWeight="Bold"></TextBlock>
            <TextBox Text="{Binding EditEntity.Email,Mode=TwoWay}"></TextBox>
            <TextBlock Text="Password:" FontWeight="Bold"></TextBlock>
            <TextBox Text="{Binding EditEntity.Password,Mode=TwoWay}"></TextBox>
            <TextBlock Text="Roles:" FontWeight="Bold"></TextBlock>
            <ComboBox x:Name="comboRoles" SelectionChanged="comboRoles_SelectionChanged" ItemsSource="{Binding SelectedRoles}" materialDesign:HintAssist.Hint="{Binding SelectedRoles,Converter={StaticResource UsersRolesToStringConverter},UpdateSourceTrigger=PropertyChanged}">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <CheckBox IsChecked="{Binding IsSelected}" Width="20"/>
                            <TextBlock Text="{Binding Entity.Name}" Width="100" />
                        </StackPanel>
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
            <TextBlock Text="Organization:" FontWeight="Bold"></TextBlock>
            <ComboBox ItemsSource="{Binding Adapter.Organizations}" SelectedItem="{Binding EditEntity.Organization,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
            <TextBlock Text="Address:" FontWeight="Bold"></TextBlock>
            <ComboBox ItemsSource="{Binding Adapter.Addresses}" SelectedItem="{Binding EditEntity.Address}" DisplayMemberPath="AddressString"></ComboBox>
            <TextBlock Text="Contact:" FontWeight="Bold"></TextBlock>
            <ComboBox ItemsSource="{Binding Adapter.Contacts}" SelectedItem="{Binding EditEntity.Contact}" DisplayMemberPath="FullName"></ComboBox>
        </controls:TableGrid>
    </Grid>
</UserControl>