-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
170 lines (170 loc) · 15.5 KB
/
MainWindow.xaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BoxNestGroup"
xmlns:GridView="clr-namespace:BoxNestGroup.GridView"
xmlns:Forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" x:Class="BoxNestGroup.MainWindow"
mc:Ignorable="d"
Title="BoxNestGroup" Height="768" Width="1024"
>
<Window.Resources>
<Style TargetType="TextBox" x:Key="dataGridUserTextBoxStyle">
<EventSetter Event="KeyDown" Handler="dataGridUserTextColumnKeyDown" />
</Style>
<BooleanToVisibilityConverter x:Key="BoolVisibilityConverter" ></BooleanToVisibilityConverter>
</Window.Resources>
<Grid Cursor="">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10*"/>
<ColumnDefinition Width="2"/>
<ColumnDefinition Width="24*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="27*"/>
</Grid.RowDefinitions>
<Menu x:Name="menuMain" DockPanel.Dock="Top" Grid.Row="0" Grid.ColumnSpan="8">
<MenuItem x:Name="menuSetting" Header="設定">
<MenuItem Header="接続設定" Click="settingsClick"/>
<MenuItem Header="承認" Click="webAuthClick"/>
</MenuItem>
<MenuItem x:Name="menuShow" Header="表示">
<MenuItem x:Name="menuShowUser" Header="ユーザー">
<MenuItem Header="{x:Static local:MainWindow.MENU_USER_ID}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowUserId}"/>
<MenuItem Header="{x:Static local:MainWindow.MENU_USER_MAIL}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowUserMail}"/>
<MenuItem Header="{x:Static local:MainWindow.MENU_USER_NOW}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowUserNowGroup}" />
<MenuItem Header="{x:Static local:MainWindow.MENU_USER_ALL}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowUserAllGroup}"/>
<MenuItem Header="{x:Static local:MainWindow.MENU_USER_MOD}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowUserModGroup}"/>
<MenuItem Header="{x:Static local:MainWindow.MENU_USER_NEST}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowUserNestGroup}"/>
<MenuItem Header="{x:Static local:MainWindow.MENU_USER_USED}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowUserUsed}"/>
<MenuItem Header="{x:Static local:MainWindow.MENU_USER_COLABO}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowUserColabo}"/>
</MenuItem>
<MenuItem x:Name="menuShowGroup" Header="グループ">
<MenuItem Header="{x:Static local:MainWindow.MENU_GROUP_ID}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowGroupId}"/>
<MenuItem Header="{x:Static local:MainWindow.MENU_GROUP_NEST_MAX}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowGroupNestMax}"/>
<MenuItem Header="{x:Static local:MainWindow.MENU_GROUP_FOLDER_NUM}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowGroupFolderCount}" />
<MenuItem Header="{x:Static local:MainWindow.MENU_GROUP_USER_NUM}" IsCheckable="True" IsChecked="{Binding Source={x:Static local:Settings.Default}, Mode=TwoWay, Path=ShowGroupUserCount}" />
</MenuItem>
</MenuItem>
<MenuItem x:Name="menuMenu" Header="メニュー">
<MenuItem Header="About" Click="aboutClick" />
<MenuItem Header="終了" />
</MenuItem>
</Menu>
<Label x:Name="labelLogin" Grid.Row="1" Grid.Column="0" Content="ログイン:" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="1,1,1,1"/>
<DockPanel Grid.Row="1" Grid.Column="2" Margin="1,1,1,1">
<Button x:Name="buttonWebAuth" Content=" 承 認 " HorizontalAlignment="Left" VerticalAlignment="Center" Margin="1,1,1,1" Click="webAuthClick"/>
<Button x:Name="buttonOffLine" Content="オフライン" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="1,1,1,1" Click="offlineButtonClick"/>
</DockPanel>
<TreeView x:Name="treeViewFolder" Grid.Row="2" Grid.Column="0" Grid.RowSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,1,1,1"
PreviewMouseDown="treeViewFolderPreviewMouseDown"
MouseMove="treeViewFolderMouseMove"
Drop="treeViewFolderDrop">
<TreeView.ItemTemplate >
<HierarchicalDataTemplate DataType= "local:BoxNestGroup.View.FolderGroupTreeView" ItemsSource="{Binding ListViewGroup}">
<TextBlock Text="{Binding GroupName}" />
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
<GridSplitter Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" HorizontalAlignment="Stretch" Background="Gray" />
<Button x:Name="buttonAddUserGroup" Grid.Row="2" Grid.Column="2" Content="グループ追加" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="1,1,1,1" Click="addUserGroupClick"/>
<TabControl x:Name="tabControlBox" Grid.Row="3" Grid.Column="2" Margin="1,1,1,1" Grid.RowSpan="3" TabStripPlacement="Left">
<TabItem Header="ユーザー" Margin="1,1,1,1" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid Background="#FFE5E5E5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="28*"/>
<RowDefinition Height="641*"/>
<RowDefinition Height="0*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" Grid.Column="0" Margin="1,1,1,1">
<Button x:Name="buttonMakeUser" Content="ユーザー作成" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1,1,1,1" Click="makeUserButtonClick" Visibility="Collapsed" />
<Button x:Name="buttonRenewUser" Content="更新" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="1,1,1,1" Click="renewUserButtonClick"/>
<Button x:Name="buttonSaveExcel" Content="Excel保存" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="1,1,1,1" Click="saveExcelButtonClick"/>
</DockPanel>
<DataGrid x:Name="dataGridUser" Grid.Row="1"
HorizontalAlignment="Center" VerticalAlignment="Top" Margin="1,1,1,1" CanUserAddRows="True" AutoGenerateColumns="False" HeadersVisibility="Column"
CellEditEnding="dataGridUserCellEditEnding">
<DataGrid.Columns>
<DataGridCheckBoxColumn Header="{x:Static local:MainWindow.MENU_USER_SEELCT}" Binding="{Binding Selected}" Width="*">
<DataGridColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="Aquamarine"/>
</Style>
</DataGridColumn.HeaderStyle>
<DataGridColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Background" Value="Aquamarine"/>
</Style>
</DataGridColumn.CellStyle>
</DataGridCheckBoxColumn>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_USER_NAME}" Binding="{Binding UserName}" Width="4*" IsReadOnly="True" />
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_USER_MAIL}" Binding="{Binding UserMailAddress}" Width="4*" IsReadOnly="True" Visibility="{Binding Source={x:Static local:Settings.Default}, Path=ShowUserMail, Converter={StaticResource BoolVisibilityConverter}}"/>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_USER_ID}" Binding="{Binding UserId}" Width="3*" IsReadOnly="True" Visibility="{Binding Source={x:Static local:Settings.Default}, Path=ShowUserId, Converter={StaticResource BoolVisibilityConverter}}"/>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_USER_NOW}" Binding="{Binding ListNowGroup}" Width="4*" IsReadOnly="True" Visibility="{Binding Source={x:Static local:Settings.Default}, Path=ShowUserNowGroup, Converter={StaticResource BoolVisibilityConverter}}"/>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_USER_ALL}" Binding="{Binding ListAllGroup}" Width="4*" IsReadOnly="True" Visibility="{Binding Source={x:Static local:Settings.Default}, Path=ShowUserAllGroup, Converter={StaticResource BoolVisibilityConverter}}"/>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_USER_MOD}" Binding="{Binding ListModGroup}" Width="4*">
<DataGridColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="Aquamarine"/>
</Style>
</DataGridColumn.HeaderStyle>
<DataGridColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Background" Value="Aquamarine"/>
</Style>
</DataGridColumn.CellStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_USER_NEST}" Binding="{Binding ListNestGroup}" Width="4*" IsReadOnly="True" Visibility="{Binding Source={x:Static local:Settings.Default}, Path=ShowUserNestGroup, Converter={StaticResource BoolVisibilityConverter}}"/>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_USER_USED}" Binding="{Binding UserSpaceUsed}" Width="*" IsReadOnly="True" Visibility="{Binding Source={x:Static local:Settings.Default}, Path=ShowUserUsed, Converter={StaticResource BoolVisibilityConverter}}"/>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_USER_COLABO}" Binding="{Binding UserExternalCollaborate}" Width="*" IsReadOnly="True" Visibility="{Binding Source={x:Static local:Settings.Default}, Path=ShowUserColabo, Converter={StaticResource BoolVisibilityConverter}}"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</TabItem>
<TabItem Header="ユーザー名
フィルタ" VerticalAlignment="Top" HorizontalAlignment="Left" Visibility="Collapsed">
<TextBox x:Name="textBoxUserNameFilter" TextWrapping="Wrap" Text="" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" />
</TabItem>
<TabItem Header="グループ" Margin="1,1,1,1" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid Background="#FFE5E5E5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="23*"/>
</Grid.RowDefinitions>
<Button x:Name="buttonMakeGroup" Grid.Row="0" Content="グループ作成" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1,1,1,1" Click="makeGroupButtonClick"/>
<DataGrid x:Name="dataGridGroup" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1"
HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1,1,1,1" CanUserAddRows="True" AutoGenerateColumns="False" HeadersVisibility="Column"
CellEditEnding="dataGridGroupCellEditEnding">
<DataGrid.Columns>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_GROUP_NAME}" Binding="{Binding GroupName}" Width="3*">
<DataGridColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="Aquamarine"/>
</Style>
</DataGridColumn.HeaderStyle>
<DataGridColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Background" Value="Aquamarine"/>
</Style>
</DataGridColumn.CellStyle>
</DataGridTextColumn>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_GROUP_ID}" Binding="{Binding GroupId}" Width="2*" IsReadOnly="True" Visibility="{Binding Source={x:Static local:Settings.Default}, Path=ShowGroupId, Converter={StaticResource BoolVisibilityConverter}}"/>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_GROUP_NEST_MAX}" Binding="{Binding MaxNestCount}" Width="*" IsReadOnly="True" Visibility="{Binding Source={x:Static local:Settings.Default}, Path=ShowGroupNestMax, Converter={StaticResource BoolVisibilityConverter}}"/>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_GROUP_FOLDER_NUM}" Binding="{Binding FolderCount}" Width="*" IsReadOnly="True" Visibility="{Binding Source={x:Static local:Settings.Default}, Path=ShowGroupFolderCount, Converter={StaticResource BoolVisibilityConverter}}"/>
<DataGridTextColumn Header="{x:Static local:MainWindow.MENU_GROUP_USER_NUM}" Binding="{Binding UserCount}" Width="*" IsReadOnly="True" Visibility="{Binding Source={x:Static local:Settings.Default}, Path=ShowGroupUserCount, Converter={StaticResource BoolVisibilityConverter}}"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</TabItem>
</TabControl>
</Grid>
</Window>