UI Role and Securables

This commit is contained in:
Daniel Schick 2023-04-10 14:43:31 +02:00
parent 485c75f06c
commit ae232ae686
2 changed files with 90 additions and 12 deletions

View File

@ -33,7 +33,7 @@
<ColumnDefinition Width=".38*" /> <ColumnDefinition Width=".38*" />
<ColumnDefinition Width=".62*" /> <ColumnDefinition Width=".62*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ListBox x:Name="listBoxParticipant" Margin="2" Grid.RowSpan="7" /> <ListBox x:Name="listBoxParticipant" Margin="2" Grid.RowSpan="7" SelectionChanged="listBoxParticipant_SelectionChanged" />
<Label Content="Name" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right"/> <Label Content="Name" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right"/>
<Label Content="Street" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right"/> <Label Content="Street" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right"/>
<Label Content="Postal code" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right"/> <Label Content="Postal code" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right"/>
@ -70,7 +70,7 @@
<ColumnDefinition Width=".38*" /> <ColumnDefinition Width=".38*" />
<ColumnDefinition Width=".62*" /> <ColumnDefinition Width=".62*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ListBox x:Name="listBoxUser" Margin="2" Grid.RowSpan="9" /> <ListBox x:Name="listBoxUser" Margin="2" Grid.RowSpan="9" SelectionChanged="listBoxUser_SelectionChanged" />
<Label Grid.Row="0" Grid.Column="1" Content="First name" HorizontalAlignment="Right"/> <Label Grid.Row="0" Grid.Column="1" Content="First name" HorizontalAlignment="Right"/>
<Label Grid.Row="1" Grid.Column="1" Content="Last name" HorizontalAlignment="Right"/> <Label Grid.Row="1" Grid.Column="1" Content="Last name" HorizontalAlignment="Right"/>
<Label Grid.Row="2" Grid.Column="1" Content="User name" HorizontalAlignment="Right"/> <Label Grid.Row="2" Grid.Column="1" Content="User name" HorizontalAlignment="Right"/>
@ -93,33 +93,57 @@
<GroupBox Header="Role" Margin="2" Grid.Column="1"> <GroupBox Header="Role" Margin="2" Grid.Column="1">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/> <RowDefinition Height="28"/>
<RowDefinition Height="28"/> <RowDefinition Height="28"/>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="160" /> <ColumnDefinition Width=".5*" />
<ColumnDefinition Width="28" /> <ColumnDefinition Width="60" />
<ColumnDefinition Width="28" /> <ColumnDefinition Width=".5*" />
<ColumnDefinition Width="28" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Content="User roles" Grid.Row="0" Grid.Column="0" />
<Label Content="All roles" Grid.Row="0" Grid.Column="2" />
<ListBox x:Name="listBoxUserRoles" Grid.Row="1" Grid.Column="0" Grid.RowSpan="3" Margin="2" />
<ListBox x:Name="listBoxRoles" Grid.Row="1" Grid.Column="2" Grid.RowSpan="3" Margin="2" SelectionChanged="listBoxRoles_SelectionChanged"/>
<Button x:Name="buttonAddRole" Margin="2" Content="&lt;" Grid.Row="1" Grid.Column="1" Click="buttonAddRole_Click"/>
<Button x:Name="buttonRemoveRole" Margin="2" Content="X" Grid.Row="2" Grid.Column="1" Click="buttonRemoveRole_Click" />
<Label Content="Name" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Right" />
<Label Content="Descr." Grid.Row="5" Grid.Column="1" HorizontalAlignment="Right" />
<TextBox x:Name="textBoxRoleName" Grid.Row="4" Grid.Column="2" Margin="2" />
<TextBox x:Name="textBoxRoleDescription" Grid.Row="5" Grid.Column="2" Grid.RowSpan="2" Margin="2" />
<Button x:Name="buttonSaveRole" Grid.Row="7" Grid.Column="2" Margin="2" Content="Save" Click="buttonSaveRole_Click" />
</Grid> </Grid>
</GroupBox> </GroupBox>
<GroupBox Header="Securable" Margin="2" Grid.Row="1" Grid.Column="1"> <GroupBox Header="Securable" Margin="2" Grid.Row="1" Grid.Column="1">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/> <RowDefinition Height="28"/>
<RowDefinition Height="28"/> <RowDefinition Height="28"/>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
<RowDefinition Height="28"/>
<RowDefinition Height="28"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="160" /> <ColumnDefinition Width=".5*" />
<ColumnDefinition Width="28" /> <ColumnDefinition Width="60" />
<ColumnDefinition Width="28" /> <ColumnDefinition Width=".5*" />
<ColumnDefinition Width="28" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Role securables" />
<Label Grid.Row="0" Grid.Column="2" Content="Securables" />
<ListBox x:Name="listBoxRoleSecurables" Grid.Row="1" Grid.Column="0" Grid.RowSpan="3" Margin="2" />
<ListBox x:Name="listBoxSecurables" Grid.Row="1" Grid.Column="2" Grid.RowSpan="3" Margin="2" SelectionChanged="listBoxSecurables_SelectionChanged" />
<Button x:Name="buttonAddSecurable" Margin="2" Content="&lt;" Grid.Row="1" Grid.Column="1" Click="buttonAddSecurable_Click" />
<Button x:Name="buttonRemoveSecurable" Margin="2" Content="X" Grid.Row="2" Grid.Column="1" Click="buttonRemoveSecurable_Click" />
<Label Content="Name" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Right" />
<TextBox x:Name="textBoxSecurableName" Grid.Row="4" Grid.Column="2" Margin="2" />
<Button x:Name="buttonSaveSecurable" Grid.Row="5" Grid.Column="2" Margin="2" Content="Save" Click="buttonSaveSecurable_Click" />
</Grid> </Grid>
</GroupBox> </GroupBox>
</Grid> </Grid>

View File

@ -27,6 +27,8 @@ namespace RoleEditor
InitializeComponent(); InitializeComponent();
} }
#region button callbacks
private void buttonParticipantSave_Click(object sender, RoutedEventArgs e) private void buttonParticipantSave_Click(object sender, RoutedEventArgs e)
{ {
@ -36,5 +38,57 @@ namespace RoleEditor
{ {
} }
private void buttonAddRole_Click(object sender, RoutedEventArgs e)
{
}
private void buttonRemoveRole_Click(object sender, RoutedEventArgs e)
{
}
private void buttonAddSecurable_Click(object sender, RoutedEventArgs e)
{
}
private void buttonRemoveSecurable_Click(object sender, RoutedEventArgs e)
{
}
private void buttonSaveSecurable_Click(object sender, RoutedEventArgs e)
{
}
private void buttonSaveRole_Click(object sender, RoutedEventArgs e)
{
}
#endregion
private void listBoxParticipant_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}
private void listBoxRoles_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}
private void listBoxUser_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}
private void listBoxSecurables_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}
} }
} }