blob: be82a8748955d4065e755604de8dcb33977835ac (
plain)
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
|
<UserControl x:Class="Tango.FSE.UI.Dialogs.EmulateMachineEventDialogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.FSE.UI.Dialogs"
mc:Ignorable="d"
Height="300" Width="700" d:DataContext="{d:DesignInstance Type=local:EmulateMachineEventDialogViewVM, IsDesignTimeCreatable=False}" Background="{StaticResource FSE_PrimaryBackgroundLightBrush}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">
<Grid>
<DockPanel Margin="10">
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0">
<materialDesign:PackIcon Kind="LightningBolt" Width="48" Height="48" Foreground="{StaticResource FSE_EmulatorBrush}" />
<TextBlock Text="Emulate Machine Event" FontWeight="SemiBold" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="{StaticResource FSE_MessageBoxTitleFontSize}"></TextBlock>
</StackPanel>
<TextBlock DockPanel.Dock="Top" TextWrapping="Wrap" Margin="10">
<Run>This dialog can help you emulate a machine hardware event for demonstration or testing purposes.</Run>
<LineBreak/>
<Run>Please select the event type and a duration for the event to remain active.</Run>
</TextBlock>
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10 20 10 0" Width="650">
<DockPanel>
<StackPanel DockPanel.Dock="Right" Margin="50 0 0 0">
<TextBlock Foreground="{StaticResource FSE_EmulatorBrush}">Duration (seconds)</TextBlock>
<mahapps:NumericUpDown Height="36" HasDecimals="False" Value="{Binding DurationSeconds,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Maximum="500" Minimum="1" />
</StackPanel>
<StackPanel>
<TextBlock Foreground="{StaticResource FSE_EmulatorBrush}">Event Type</TextBlock>
<controls:SearchComboBox Margin="0 5 0 0" Height="31" FontSize="{StaticResource FSE_SmallFontSize}" ItemsSource="{Binding EventTypes}" SelectedItem="{Binding SelectedEventType,Mode=TwoWay}" SearchProperty="Name">
<controls:SearchComboBox.ItemTemplate>
<DataTemplate>
<DockPanel>
<materialDesign:PackIcon Opacity="0.5" Kind="LightningBolt" Width="24" Height="24" Foreground="{StaticResource FSE_EmulatorBrush}" />
<StackPanel Margin="10 0 0 0">
<TextBlock>
<Run FontWeight="SemiBold">#</Run><Run FontWeight="SemiBold" Text="{Binding Code,Mode=OneWay}"></Run>
<Run></Run>
<Run></Run>
<Run Text="{Binding Name,Mode=OneWay}"></Run>
<LineBreak/>
<Run Text="{Binding Converter={StaticResource EventTypeTitleConverter},Mode=OneWay}" FontSize="{StaticResource FSE_SmallerFontSize}" Foreground="{StaticResource FSE_GrayBrush}"></Run>
</TextBlock>
</StackPanel>
</DockPanel>
</DataTemplate>
</controls:SearchComboBox.ItemTemplate>
</controls:SearchComboBox>
</StackPanel>
</DockPanel>
<StackPanel Margin="0 20 0 0">
<TextBlock Foreground="{StaticResource FSE_EmulatorBrush}">Message</TextBlock>
<TextBox Style="{StaticResource FSE_Rounded_Corners_TextBox_Multiline}" Text="{Binding Message}" Margin="0 5 0 0" Height="50" FontSize="{StaticResource FSE_SmallFontSize}"></TextBox>
</StackPanel>
</StackPanel>
</DockPanel>
</Grid>
</UserControl>
|