forked from JN0122/CTP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
184 lines (174 loc) · 12.9 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
180
181
182
183
184
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:charts="clr-namespace:CTP.Charts"
xmlns:core="clr-namespace:CTP.core"
xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.WPF"
xmlns:av="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="av" x:Class="CTP.MainWindow"
Title="MainWindow" Height="750" Width="1200">
<TabControl x:Name="myTabControl" VerticalAlignment="Stretch">
<TabItem Header="Import danych" FontSize="16">
<Grid VerticalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Column="1" Margin="0,0,0,527">
<TextBlock Margin="10,20,10,0" TextWrapping="Wrap" FontWeight="Bold"><Run Language="pl-pl" Text="Wczytaj pomiar z pliku"/></TextBlock>
<Button Margin="10,20,10,0" x:Name="FilePickerButton" Content="Wybierz plik" Click="FilePickerButton_Click"/>
</StackPanel>
<Button x:Name="ConfigureSensorsButton" Content="Przejdź do konfiguracji czujników" Click="ConfigureSensorsButton_Click" Grid.Column="1" Margin="10,369,10,180"/>
<TextBlock x:Name="loaded_file" Grid.Column="1" HorizontalAlignment="Left" Margin="0,179,0,0" TextWrapping="Wrap" VerticalAlignment="Top"><Run Language="pl-pl" Text="Załadowano plik: "/></TextBlock>
</Grid>
</TabItem>
<TabItem Header="Konfiguruj czujniki" FontSize="16">
<Grid>
<Grid.DataContext>
<core:ColumnViewModel x:Name="ColViewModelInstance"/>
</Grid.DataContext>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<ListView x:Name="ColumnGrid" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="3" Margin="10" ItemsSource="{Binding Columns}">
<ListView.View>
<GridView x:Name="grdTest">
<GridViewColumn Header="Nazwa" DisplayMemberBinding="{Binding Name}" Width="200"/>
<GridViewColumn Header="Rodzaj" DisplayMemberBinding="{Binding Rodzaj}" Width="200"/>
<GridViewColumn Header="V min" DisplayMemberBinding="{Binding Vmin}" Width="80"/>
<GridViewColumn Header="V max" DisplayMemberBinding="{Binding Vmax}" Width="80"/>
<GridViewColumn Header="mm od:" DisplayMemberBinding="{Binding Mmin}" Width="80"/>
<GridViewColumn Header="mm do:" DisplayMemberBinding="{Binding Mmax}" Width="80"/>
</GridView>
</ListView.View>
</ListView>
<!-- Other TextBoxes and Labels for User details -->
<!--<Button Content="Aktualizuj" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="310,40,0,0" Name="btnUpdate" VerticalAlignment="Top" Width="141" Command="{Binding Path=UpdateCommand}" />-->
<!-- Textboxes and labels for user's City, State, and Country -->
<!--<TextBox Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="80,143,0,0" Name="txtCity" VerticalAlignment="Top" Width="178" Text="{Binding SelectedItem.City, ElementName=ColumnGrid}"/>-->
<!-- Labels for Country, City, State -->
<!-- Textboxes and labels for Country, City, State -->
<!-- Textboxes and labels for user details -->
<Label Grid.Row="0" VerticalAlignment="Top" Content="Nazwa" Height="30" HorizontalAlignment="Left" Margin="0,0,0,0" ToolTip="Nazwa czujnika"/>
<TextBox Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="80,7,0,0" x:Name="txtColName" VerticalAlignment="Top" Width="178" Text="{Binding SelectedItem.Name, ElementName=ColumnGrid, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="0" VerticalAlignment="Top" Content="Rodzaj" Height="30" HorizontalAlignment="Left" Margin="0,30,0,0" ToolTip="Impulsowy lub napięciowy"/>
<TextBox Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="80,37,0,0" x:Name="txtColRodzaj" VerticalAlignment="Top" Width="178" Text="{Binding SelectedItem.Rodzaj, ElementName=ColumnGrid, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="0" VerticalAlignment="Top" Content="V min" Height="30" HorizontalAlignment="Left" Margin="0,60,0,0" ToolTip="Dolny zakres napięcia"/>
<TextBox Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="80,67,0,0" x:Name="txtColVmin" VerticalAlignment="Top" Width="178" Text="{Binding SelectedItem.Vmin, ElementName=ColumnGrid, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="0" VerticalAlignment="Top" Content="V max" Height="30" HorizontalAlignment="Left" Margin="0,90,0,0" ToolTip="Górny zakres napięcia"/>
<TextBox Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="80,97,0,0" x:Name="txtColVMax" VerticalAlignment="Top" Width="178" Text="{Binding SelectedItem.Vmax, ElementName=ColumnGrid, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="0" VerticalAlignment="Top" Content="mm od:" Height="30" HorizontalAlignment="Left" Margin="0,120,0,0" ToolTip="Minimalna mierzalna odległość"/>
<TextBox Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="80,127,0,0" x:Name="txtColMmin" VerticalAlignment="Top" Width="178" Text="{Binding SelectedItem.Mmin, ElementName=ColumnGrid, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="0" VerticalAlignment="Top" Content="mm do:" Height="30" HorizontalAlignment="Left" Margin="0,150,0,0" ToolTip="Maksymalna mierzalna odległość"/>
<TextBox Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="80,157,0,0" x:Name="txtColMmax" VerticalAlignment="Top" Width="178" Text="{Binding SelectedItem.Mmax, ElementName=ColumnGrid, UpdateSourceTrigger=PropertyChanged}"/>
<Button x:Name="FinishSensorConfiguration" Content="Zakończ konfigurację czujników" Click="FinishSensorConfiguration_Click" Width="300" Grid.Column="1" VerticalAlignment="Top" Margin="318,96,318,0"/>
<TextBlock Grid.Column="1" HorizontalAlignment="Center" Margin="0,43,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="16" FontWeight="Bold"><Run Language="pl-pl" Text="Konfiguracja czujników"/></TextBlock>
</Grid>
</TabItem>
<TabItem Header="Wykresy czujników w czasie rzeczywistym" FontSize="16">
<Grid x:Name="Content2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Grid.Column="0" Grid.RowSpan="3" Margin="20" Width="400">
<TextBlock FontWeight="Bold" TextWrapping="Wrap"><Run Text="Wybierz czujniki"/><Run Text=" "/><Run Language="pl-pl" Text="- "/><Run Text="wykresy w czasie rzeczywistym"/></TextBlock>
<StackPanel Margin="0,10" x:Name="SensorList1"/>
<TextBlock FontWeight="Bold" Margin="0,10" TextWrapping="Wrap"><Run Language="pl-pl" Text="Dane klienta:"/></TextBlock>
<TextBox Text="Imię i nazwisko" TextChanged="TextBox_TextChanged"/>
<TextBlock FontWeight="Bold" Margin="0,10"><Run Text="Wybierz datę pomiaru:"/></TextBlock>
<DatePicker/>
<Button x:Name="FilePickerButton2" Content="Drukuj PDF" Click="FilePDFButton_Click" Margin="0,10"/>
</StackPanel>
<Grid Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0" Margin="0,15,0,0">
<Grid.DataContext>
<charts:RealTimeChart x:Name="XChart"/>
</Grid.DataContext>
<lvc:CartesianChart
SyncContext="{Binding Sync}"
YAxes="{Binding YAxesDistance}"
Series="{Binding Series}"
XAxes="{Binding XAxes}" />
</Grid>
<Grid Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,15,0,15">
<Grid.DataContext>
<charts:RealTimeChart x:Name="VelocityChart"/>
</Grid.DataContext>
<lvc:CartesianChart
SyncContext="{Binding Sync}"
Series="{Binding Series}"
YAxes="{Binding YAxesVelocity}"
XAxes="{Binding XAxes}" />
</Grid>
<Grid Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2" Margin="0,15,0,15">
<Grid.DataContext>
<charts:RealTimeChart x:Name="AccelerationChart"/>
</Grid.DataContext>
<lvc:CartesianChart
SyncContext="{Binding Sync}"
Series="{Binding Series}"
YAxes="{Binding YAxesAcceleration}"
XAxes="{Binding XAxes}" />
</Grid>
</Grid>
</TabItem>
<TabItem Header="Wykres czujników" FontSize="16">
<Grid x:Name="Content3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Margin="20" Width="400">
<TextBlock FontWeight="Bold" TextWrapping="Wrap"><Run Text="Wybierz czujniki"/></TextBlock>
<StackPanel Margin="0,10" x:Name="SensorList2"/>
<!-- <TextBlock FontWeight="Bold" Margin="0,10" TextWrapping="Wrap"><Run Language="pl-pl" Text="Zmień zakres wykresu:"/></TextBlock>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Margin="0,5" TextWrapping="Wrap" TextAlignment="Center" Grid.Column="0"><Run Language="pl-pl" Text="od"/></TextBlock>
<TextBox x:Name="AllSensorToFrom" Grid.Column="1"/>
<TextBlock Margin="0,5" TextWrapping="Wrap" TextAlignment="Center" Grid.Column="2"><Run Language="pl-pl" Text="do"/></TextBlock>
<TextBox x:Name="AllSensorToField" Grid.Column="3"/>
</Grid>
<Button x:Name="AllSensorChangeChartRange" Content="Zmień zakres wykresu" Click="AllSensorChangeChartRange_Click" Margin="0,10"/> -->
<TextBlock FontWeight="Bold" Margin="0,10" TextWrapping="Wrap"><Run Language="pl-pl" Text="Dane klienta:"/></TextBlock>
<TextBox Text="Imię i nazwisko" TextChanged="TextBox_TextChanged"/>
<TextBlock FontWeight="Bold" Margin="0,10"><Run Text="Wybierz datę pomiaru:"/></TextBlock>
<DatePicker/>
<Button x:Name="FilePickerButton1" Content="Drukuj PDF" Click="FilePDFButton_Click" Margin="0,10"/>
</StackPanel>
<Grid Grid.Column="1" Grid.ColumnSpan="2" Margin="0,15">
<Grid.DataContext>
<charts:AllSensorsChart x:Name="AllSensorsChart"/>
</Grid.DataContext>
<lvc:CartesianChart
Series="{Binding Series}"
XAxes="{Binding XAxes}"
YAxes="{Binding YAxes}"
ZoomMode="X"/>
</Grid>
</Grid>
</TabItem>
</TabControl>
</Window>