Skip to content

Commit 3ba1c97

Browse files
committed
[client] 테이블/타입 권한 설정의 사용자 미리보기에서 연결 목록이 보이도록 함
1 parent b2d25d3 commit 3ba1c97

4 files changed

Lines changed: 50 additions & 0 deletions

File tree

client/Ntreev.Crema.Client.Framework/Assets/TreeView.xaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4040
<ContentControl Style="{StaticResource UserDescriptor_ContentControl_Style}" ContextMenu="{StaticResource User_ContextMenu}" />
4141
</HierarchicalDataTemplate>
4242

43+
<HierarchicalDataTemplate DataType="{x:Type ncf:UserAuthenticationTreeItemBase}" ItemsSource="{Binding Items}">
44+
<HierarchicalDataTemplate.Resources>
45+
<nmfc:ExpandableContextMenu x:Key="UserAuthentication_ContextMenu" ItemsSource="{Binding ContextMenus}">
46+
</nmfc:ExpandableContextMenu>
47+
</HierarchicalDataTemplate.Resources>
48+
<ContentControl Style="{StaticResource UserDescriptor_ContentControl_Style}" ContextMenu="{StaticResource UserAuthentication_ContextMenu}" />
49+
</HierarchicalDataTemplate>
50+
4351
<HierarchicalDataTemplate DataType="{x:Type ncf:DomainCategoryTreeItemBase}" ItemsSource="{Binding Items}">
4452
<HierarchicalDataTemplate.Resources>
4553
<nmfc:ExpandableContextMenu x:Key="Category_ContextMenu" ItemsSource="{Binding ContextMenus}" />
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//Released under the MIT License.
2+
//
3+
//Copyright (c) 2018 Ntreev Soft co., Ltd.
4+
//
5+
//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
6+
//documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
7+
//rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
8+
//persons to whom the Software is furnished to do so, subject to the following conditions:
9+
//
10+
//The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
11+
//Software.
12+
//
13+
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
14+
//WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
15+
//COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
16+
//OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17+
18+
using System;
19+
using System.Collections.Generic;
20+
using System.Linq;
21+
using System.Text;
22+
using System.Threading.Tasks;
23+
using Ntreev.Crema.Services;
24+
25+
namespace Ntreev.Crema.Client.Framework.Dialogs.ViewModels
26+
{
27+
public class UserAuthenticationTreeViewItemViewModel : UserAuthenticationTreeItemBase
28+
{
29+
public UserAuthenticationTreeViewItemViewModel(Authentication authentication, UserAuthenticationDescriptor descriptor, object owner)
30+
: base(authentication, descriptor, owner)
31+
{
32+
}
33+
34+
public override string DisplayName => this.Descriptor.DisplayName;
35+
}
36+
}

client/Ntreev.Crema.Client.Framework/Dialogs/ViewModels/UserTreeViewItemViewModel.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,10 @@ public string DisplayPath
4646
{
4747
get { return this.descriptor.UserID; }
4848
}
49+
50+
protected override UserAuthenticationTreeItemBase CreateInstance(Authentication authentication, UserAuthenticationDescriptor descriptor, object owner)
51+
{
52+
return new UserAuthenticationTreeViewItemViewModel(authentication, descriptor, owner);
53+
}
4954
}
5055
}

client/Ntreev.Crema.Client.Framework/Ntreev.Crema.Client.Framework.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
</Reference>
7979
</ItemGroup>
8080
<ItemGroup>
81+
<Compile Include="Dialogs\ViewModels\UserAuthenticationTreeViewItemViewModel.cs" />
8182
<Compile Include="IUserAuthenticationDescriptor.cs" />
8283
<Compile Include="ListBoxBase.cs" />
8384
<Compile Include="TreeViewBase.cs" />

0 commit comments

Comments
 (0)