-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMainWindow.xaml
179 lines (149 loc) · 8.98 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
171
172
173
174
175
176
177
178
179
<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:IFCGeoRefCheckerGUI"
xmlns:props="clr-namespace:IFCGeoRefCheckerGUI.Properties"
xmlns:vm="clr-namespace:IFCGeoRefCheckerGUI.ViewModels" x:Class="IFCGeoRefCheckerGUI.MainWindow"
mc:Ignorable="d"
Title="IfcGeoRefChecker" Height="750" Width="650" MinWidth="650" MinHeight="750"
>
<Window.Resources>
<local:ResxConverter x:Key="ResxConverter" />
</Window.Resources>
<Window.DataContext>
<vm:MainWindowViewModel></vm:MainWindowViewModel>
</Window.DataContext>
<Grid Margin="10,10,10,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" >
<GroupBox x:Name="SetWorkDirGroupBox" Header="Set working directory">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label x:Name="WorkingDirLabel" Content="Working directory" Grid.Row="0" Grid.Column="0"/>
<TextBox x:Name="PathTextBox" Grid.Row="1" Grid.ColumnSpan="2"
Text="{Binding workingDirViewModel.WorkingDirPath, TargetNullValue='Please choose path!'}"
Margin="0,5,0,5" Padding="0,5,0,5" VerticalScrollBarVisibility="Auto"
VerticalContentAlignment="Center" />
</Grid>
</GroupBox>
</Grid>
<!-- Status View Model -->
<Grid Grid.Row="1">
<GroupBox x:Name="InputIFCGroupBox" Header="Input IFC-Files">
<Grid Margin="5,5,5,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal">
<Label x:Name="StatusLabel" Content="Status:"></Label>
<Label Content="{Binding filePanelViewModel.FilePaths.Count, Mode=OneWay}" ContentStringFormat=" {0} file(s) loaded"/>
<Label Content="{Binding checkViewModel.NrOfChecks}" ContentStringFormat=" {0} file(s) checked"/>
</StackPanel>
<StackPanel Grid.Row="1">
<Label x:Name="LoadedIFCFilesLabel" Content="Loaded IFC-Files"></Label>
<ListBox MinHeight="175" ScrollViewer.VerticalScrollBarVisibility="Auto" MaxHeight="150"
ScrollViewer.HorizontalScrollBarVisibility="Auto" ItemsSource="{Binding filePanelViewModel.FilePaths}"
SelectionMode="Single" SelectedItem="{Binding filePanelViewModel.SelectedPath}">
</ListBox>
</StackPanel>
<ProgressBar Grid.Row="3" Height="20" Margin="0,10,0,10" IsIndeterminate="{Binding checkViewModel.IsChecking}"/>
</Grid>
</GroupBox>
</Grid>
<!-- Check View Model -->
<Grid Grid.Row="2">
<GroupBox x:Name="StatusReportGroupBox" Header="Status report">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Content="LoGeoRef 10 (Address)" Grid.Column="0" Grid.Row="0"/>
<Label Content="LoGeoRef 20 (Geolocation)" Grid.Column="0" Grid.Row="1"/>
<Label Content="LoGeoRef 30 (Site location)" Grid.Column="0" Grid.Row="2"/>
<Label Content="LoGeoRef 40 (Project location)" Grid.Column="0" Grid.Row="3"/>
<Label Content="LoGeoRef 50 (CRS conversion)" Grid.Column="0" Grid.Row="4"/>
<Label Content="{Binding checkViewModel.CheckerResults.level10Fulfilled, TargetNullValue='?'}" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center"/>
<Label Content="{Binding checkViewModel.CheckerResults.level20Fulfilled, TargetNullValue='?'}" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center"/>
<Label Content="{Binding checkViewModel.CheckerResults.level30Fulfilled, TargetNullValue='?'}" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Center"/>
<Label Content="{Binding checkViewModel.CheckerResults.level40Fulfilled, TargetNullValue='?'}" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"/>
<Label Content="{Binding checkViewModel.CheckerResults.level50Fulfilled, TargetNullValue='?'}" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"/>
<Button x:Name="ShowProtocolBtn" Content="Show protocol" Grid.Column="3" Grid.Row="0" Command="{Binding checkViewModel.ShowLog}"></Button>
</Grid>
</GroupBox>
</Grid>
</Grid>
<Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
<GroupBox x:Name="LogOutputGroupBox" Header="Log output" Margin="0,5,0,5">
<RichTextBox x:Name="LogBox" Margin="0,5,0,5" IsReadOnly="True" VerticalScrollBarVisibility="Auto" TextChanged="LogBox_TextChanged"></RichTextBox>
</GroupBox>
</Grid>
<!-- Button Grid -->
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Source="/IFCGeorefCheckerGUI;component/images/DD-BIM-LOGO.png" Margin="5,5,5,5"/>
<Label x:Name="LanguageLabel" Content="Select language:" Grid.Row="1" Margin="10,10,10,0"/>
<ComboBox x:Name="LanguageComboBox" IsEditable="False"
SelectionChanged="LanguageComboBox_SelectionChanged" Grid.Row="2"
Margin="10,0,10,10" Padding="1,5,1,5"/>
<Button x:Name="SetWorkinDirBtn" Grid.Row="3"
Content="Set working directory" Margin="10,10,10,10"
Padding="1,5,1,5" Click="SetWorkinDirBtn_Click"
/>
<Button x:Name="LoadFilesBtn" Grid.Row="4"
Content="Load IFC-Files" Margin="10,10,10,10"
Padding="1,5,1,5" Click="LoadFilesBtn_Click" />
<Button x:Name="CheckFileBtn" Grid.Row="5"
Content="Check selected file" Margin="10,10,10,10"
Padding="1,5,1,5" Command="{Binding checkViewModel.CheckIFC}" CommandParameter="{Binding filePanelViewModel.FilePaths}"
/>
<!--
<Button Content="Update File" Grid.Row="4" Command="{Binding OpenUpdateDialogCommand}"
Margin="10,10,10,10" Padding="1,5,1,5">
</Button>
-->
</Grid>
</Grid>
</Window>