aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-09-16 17:48:16 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-09-16 17:48:16 +0300
commit161fe6f6d2b29ba3deb641cdc049ad0d8f58004e (patch)
tree20318bb7ea4a243b8c2e9757e4635e8d5f5cb728 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles
parent30fcfa4100a9d00e887c6e17e32e427b05296ce7 (diff)
parentb674a2e7751daa80c0d74207968bf8e3d18d7faf (diff)
downloadTango-161fe6f6d2b29ba3deb641cdc049ad0d8f58004e.tar.gz
Tango-161fe6f6d2b29ba3deb641cdc049ad0d8f58004e.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml12
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml59
4 files changed, 34 insertions, 45 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs
index 735b1e75c..a46d5f456 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/ViewModels/MainViewVM.cs
@@ -226,7 +226,7 @@ namespace Tango.MachineStudio.UsersAndRoles.ViewModels
foreach (var userRole in ManagedUser.UsersRoles.Where(x => x.Role == role).ToList())
{
- userRole.DefferedDelete(_userContext);
+ _userContext.UsersRoles.Remove(userRole);
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml
index 64b05769a..d5a5d41d7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationManagementView.xaml
@@ -28,7 +28,7 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
- <Border Background="#A6FFFFFF" BorderBrush="Gray" BorderThickness="0 0 1 0">
+ <Border Background="{StaticResource TransparentBackgroundBrush420}" BorderBrush="{StaticResource GrayBrush}" BorderThickness="0 0 1 0">
<Grid Margin="10 20 10 10">
<StackPanel HorizontalAlignment="Center">
@@ -39,7 +39,7 @@
<TextBlock FontSize="14" FontWeight="SemiBold">ADDRESS</TextBlock>
- <Border BorderBrush="Gray" BorderThickness="1" Width="300" HorizontalAlignment="Left" Padding="5" Margin="0 10 0 0" Background="#A9FFFFFF" Height="300">
+ <Border BorderBrush="Gray" BorderThickness="1" Width="300" HorizontalAlignment="Left" Padding="5" Margin="0 10 0 0" Background="{StaticResource TransparentBackgroundBrush420}" Height="300">
<DockPanel>
<DockPanel DockPanel.Dock="Top">
<materialDesign:PackIcon Kind="Magnify" DockPanel.Dock="Left" Width="24" Height="24" />
@@ -51,7 +51,7 @@
<TextBlock FontSize="14" FontWeight="SemiBold" Margin="0 40 0 0">CONTACT</TextBlock>
- <Border BorderBrush="Gray" BorderThickness="1" Width="300" HorizontalAlignment="Left" Padding="5" Margin="0 10 0 0" Background="#A9FFFFFF" Height="250">
+ <Border BorderBrush="Gray" BorderThickness="1" Width="300" HorizontalAlignment="Left" Padding="5" Margin="0 10 0 0" Background="{StaticResource TransparentBackgroundBrush420}" Height="250">
<local:ContactView DataContext="{Binding ManagedOrganization.Contact}" />
</Border>
@@ -84,13 +84,13 @@
</Grid>
<Grid DockPanel.Dock="Bottom">
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0 0 0 0">
- <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveUserCommand}">
+ <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Command="{Binding RemoveUserCommand}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Delete" Width="20" Height="20" />
<TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock>
</StackPanel>
</Button>
- <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddUserCommand}">
+ <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Command="{Binding AddUserCommand}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Plus" Width="20" Height="20" />
<TextBlock Margin="5 0 0 0" FontSize="16">NEW USER</TextBlock>
@@ -107,7 +107,7 @@
</StackPanel>
</Grid>
<Grid>
- <DataGrid Margin="0 0 0 10" ItemsSource="{Binding ManagedOrganization.Users}" SelectedItem="{Binding SelectedUser}" d:DataContext="{d:DesignInstance Type=entities:User, IsDesignTimeCreatable=False}" BorderBrush="Silver" BorderThickness="1" Background="#93FFFFFF" AlternatingRowBackground="#C9F6F6F6" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True">
+ <DataGrid Margin="0 0 0 10" ItemsSource="{Binding ManagedOrganization.Users}" SelectedItem="{Binding SelectedUser}" d:DataContext="{d:DesignInstance Type=entities:User, IsDesignTimeCreatable=False}" BorderBrush="{StaticResource borderBrush}" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True">
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter Property="BorderThickness" Value="0"/>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml
index 16dd36360..814e60d93 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/OrganizationSelectionView.xaml
@@ -23,13 +23,13 @@
</Grid>
<Grid DockPanel.Dock="Bottom">
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0 0 0 0">
- <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveOrganizationCommand}">
+ <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Command="{Binding RemoveOrganizationCommand}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Delete" Width="20" Height="20" />
<TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock>
</StackPanel>
</Button>
- <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddOrganizationCommand}">
+ <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Command="{Binding AddOrganizationCommand}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Plus" Width="20" Height="20" />
<TextBlock Margin="5 0 0 0" FontSize="16">NEW ORGANIZATION</TextBlock>
@@ -46,7 +46,7 @@
</StackPanel>
</Grid>
<Grid>
- <DataGrid Margin="0 0 0 10" BorderBrush="Silver" IsReadOnly="True" BorderThickness="1" Background="#93FFFFFF" AlternatingRowBackground="#C9F6F6F6" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding Organizations}" SelectedItem="{Binding SelectedOrganization}">
+ <DataGrid Margin="0 0 0 10" BorderBrush="{StaticResource borderBrush}" IsReadOnly="True" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding Organizations}" SelectedItem="{Binding SelectedOrganization}">
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter Property="BorderThickness" Value="0"/>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml
index ccb38b198..bb003f525 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.UsersAndRoles/Views/UserManagementView.xaml
@@ -47,19 +47,19 @@
<StackPanel Orientation="Horizontal" Margin="0 20 0 0" HorizontalAlignment="Right">
<StackPanel>
<TextBlock FontSize="16" FontWeight="SemiBold">LOGIN</TextBlock>
- <Border Width="300" BorderThickness="1" BorderBrush="Gray" Margin="0 5 0 0" Padding="15 5" Height="150" Background="#8EFFFFFF">
+ <Border Width="300" BorderThickness="1" BorderBrush="Gray" Margin="0 5 0 0" Padding="15 5" Height="150" Background="{StaticResource TransparentBackgroundBrush500}">
<local:UserView FontSize="10" DataContext="{Binding ManagedUser}" />
</Border>
</StackPanel>
<StackPanel Margin="10 0 0 0">
<TextBlock FontSize="16" FontWeight="SemiBold">CONTACT</TextBlock>
- <Border Width="300" BorderThickness="1" BorderBrush="Gray" Margin="0 5 0 0" Padding="15 5" Height="250" Background="#8EFFFFFF">
+ <Border Width="300" BorderThickness="1" BorderBrush="Gray" Margin="0 5 0 0" Padding="15 5" Height="250" Background="{StaticResource TransparentBackgroundBrush500}">
<local:ContactView FontSize="10" DataContext="{Binding ManagedUser.Contact}" />
</Border>
</StackPanel>
<StackPanel Margin="10 0 0 0">
<TextBlock FontSize="16" FontWeight="SemiBold">ADDRESS</TextBlock>
- <Border Width="300" BorderThickness="1" BorderBrush="Gray" Margin="0 5 0 0" Padding="15 5" Height="300" Background="#8EFFFFFF">
+ <Border Width="300" BorderThickness="1" BorderBrush="Gray" Margin="0 5 0 0" Padding="15 5" Height="300" Background="{StaticResource TransparentBackgroundBrush500}">
<DockPanel>
<DockPanel DockPanel.Dock="Top">
<materialDesign:PackIcon Kind="Magnify" DockPanel.Dock="Left" Width="24" Height="24" />
@@ -84,9 +84,9 @@
<Grid>
<DockPanel Margin="0 20 0 0">
<TextBlock DockPanel.Dock="Top" FontSize="16" FontWeight="SemiBold">ROLES</TextBlock>
- <Grid Margin="0 5 0 0" Style="{StaticResource droppableGrid}" dragAndDrop:DragAndDropService.Drop="OnDropRole" Background="#7BFFFFFF">
+ <Grid Margin="0 5 0 0" Style="{StaticResource droppableGrid}" dragAndDrop:DragAndDropService.Drop="OnDropRole" Background="{StaticResource TransparentBackgroundBrush420}">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Top" Foreground="Silver" FontSize="20">DRAG &amp; DROP ROLES</TextBlock>
- <Border BorderBrush="Gray" BorderThickness="1" Padding="10">
+ <Border BorderBrush="{StaticResource borderBrush}" BorderThickness="1" Padding="10">
<ListBox ItemsSource="{Binding ManagedUserRoles}" ItemContainerStyle="{StaticResource basicListBoxItem}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
@@ -97,7 +97,7 @@
<DataTemplate DataType="{x:Type entities:Role}">
<Grid>
<Grid.ToolTip>
- <StackPanel>
+ <StackPanel Background="Transparent">
<TextBlock Text="{Binding Description}" FontSize="10" Margin="0 0 0 10"></TextBlock>
<ItemsControl ItemsSource="{Binding RolesPermissions}">
<ItemsControl.ItemTemplate>
@@ -113,10 +113,10 @@
</ItemsControl>
</StackPanel>
</Grid.ToolTip>
- <Border Margin="5" CornerRadius="5" Width="100" Height="100" BorderThickness="1" Padding="2">
+ <Border Margin="5" CornerRadius="5" Width="100" Height="100" BorderThickness="1" Padding="2" Background="{StaticResource UserRoles.Background}">
<Border.Style>
<Style TargetType="Border">
- <Setter Property="BorderBrush" Value="Silver"></Setter>
+ <Setter Property="BorderBrush" Value="{StaticResource borderBrush}"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
<Setter Property="BorderBrush" Value="{StaticResource AccentColorBrush}"></Setter>
@@ -124,12 +124,6 @@
</Style.Triggers>
</Style>
</Border.Style>
- <Border.Background>
- <LinearGradientBrush>
- <GradientStop Color="White"/>
- <GradientStop Color="#FFD6D6D6" Offset="1"/>
- </LinearGradientBrush>
- </Border.Background>
<Grid>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Source="../Images/roles.png" Width="32" RenderOptions.BitmapScalingMode="Fant"></Image>
@@ -149,7 +143,7 @@
</Style.Triggers>
</Style>
</Button.Style>
- <materialDesign:PackIcon Kind="Delete" Foreground="#FF5C5C" Width="16" Height="16" />
+ <materialDesign:PackIcon Kind="Delete" Foreground="{StaticResource RedBrush100}" Width="16" Height="16" />
</Button>
</Grid>
</DataTemplate>
@@ -162,7 +156,7 @@
</DockPanel>
</Grid>
- <Grid Grid.Column="1" Background="White">
+ <Grid Grid.Column="1" Background="{StaticResource WhiteBackgroundBrush}">
<DockPanel Margin="10">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
<Image Source="../Images/roles.png" Width="70" RenderOptions.BitmapScalingMode="Fant"></Image>
@@ -175,14 +169,18 @@
<DataTemplate>
<Grid Background="Transparent" IsHitTestVisible="True" Style="{StaticResource draggableGrid}" dragAndDrop:DragAndDropService.DraggableBorderBrush="{StaticResource AccentColorBrush}" dragAndDrop:DragAndDropService.Draggable="True" dragAndDrop:DragAndDropService.DraggingSurface="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DraggingSurface}">
<Grid.ToolTip>
- <StackPanel>
+ <StackPanel Background="Transparent">
<TextBlock Text="{Binding Description}" FontSize="10" Margin="0 0 0 10"></TextBlock>
<ItemsControl ItemsSource="{Binding RolesPermissions}">
<ItemsControl.ItemTemplate>
<DataTemplate>
- <StackPanel Orientation="Horizontal">
+ <StackPanel Orientation="Horizontal"
+ Background="Transparent">
<materialDesign:PackIcon Kind="Security" Width="12" />
- <TextBlock Margin="5 0 0 0" FontSize="10" Text="{Binding Permission.Name}"></TextBlock>
+ <TextBlock Margin="5 0 0 0"
+ FontSize="10"
+ Text="{Binding Permission.Name}"
+ ></TextBlock>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
@@ -190,13 +188,7 @@
</StackPanel>
</Grid.ToolTip>
<DockPanel>
- <Border DockPanel.Dock="Left" Width="100" Height="100" IsHitTestVisible="False" BorderBrush="Silver" BorderThickness="1" CornerRadius="5" Margin="5" Padding="2">
- <Border.Background>
- <LinearGradientBrush>
- <GradientStop Color="White"/>
- <GradientStop Color="#FFD6D6D6" Offset="1"/>
- </LinearGradientBrush>
- </Border.Background>
+ <Border DockPanel.Dock="Left" Width="100" Height="100" IsHitTestVisible="False" BorderBrush="{StaticResource borderBrush}" BorderThickness="1" CornerRadius="5" Margin="5" Padding="2" Background="{StaticResource UserRoles.Background}">
<Grid>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Source="../Images/roles.png" Width="32" RenderOptions.BitmapScalingMode="Fant"></Image>
@@ -205,8 +197,11 @@
</Grid>
</Border>
- <Grid MaxHeight="85" HorizontalAlignment="Left" Margin="20 0 0 0">
- <ItemsControl ItemsSource="{Binding RolesPermissions}">
+ <Grid MaxHeight="85"
+ HorizontalAlignment="Left"
+ Margin="20 0 0 0"
+ Width="200">
+ <ItemsControl ItemsSource="{Binding RolesPermissions}" Foreground="{StaticResource MainWindow.Foreground}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
@@ -217,13 +212,7 @@
</ItemsControl.ItemTemplate>
</ItemsControl>
- <Grid>
- <Grid.Background>
- <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop/>
- <GradientStop Color="White" Offset="1"/>
- </LinearGradientBrush>
- </Grid.Background>
+ <Grid Background="{StaticResource UserRoles.GridBackground}">
</Grid>
</Grid>
</DockPanel>