-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainPage.xaml
109 lines (100 loc) · 5.92 KB
/
MainPage.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
<!--
Copyright 2021 Jacob Zhang. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Page
x:Class="MidiPageTurner.MainPage"
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:i="http://schemas.microsoft.com/expression/2010/interactivity"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel Padding="12">
<RelativePanel VerticalAlignment="Center" Margin="0,0,0,8">
<Rectangle x:Name="Indicator" Height="14" Width="14" RadiusX="7" RadiusY="7" Fill="{x:Bind _inactiveBrush}" HorizontalAlignment="Left" RelativePanel.AlignVerticalCenterWithPanel="True"/>
<TextBlock Text="MIDI Page Turner" FontSize="36" FontWeight="Light" RelativePanel.AlignHorizontalCenterWithPanel="True" Padding="0,0,0,4"/>
</RelativePanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
<TextBlock FontFamily="Segoe MDL2 Assets" Text="" FontSize="14" VerticalAlignment="Center" Margin="0,2,4,0"/>
<TextBlock>MIDI Input Devices</TextBlock>
</StackPanel>
<ListBox x:Name="MidiInListBox" Height="120" SelectionChanged="MidiInListBox_SelectionChanged" Margin="0,0,0,24"/>
<Grid Margin="0,0,0,24">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
<TextBlock FontFamily="Segoe MDL2 Assets" Text="" FontSize="14" VerticalAlignment="Center" Margin="0,0,4,0"/>
<TextBlock>MIDI Trigger 1</TextBlock>
</StackPanel>
<ListBox x:Name="MidiTriggerListBox1" SelectedIndex="0" SelectionChanged="MidiTriggerListBox1_SelectionChanged">
<ListBoxItem>Soft Pedal (Left)</ListBoxItem>
<ListBoxItem>Sostenuto Pedal (Middle)</ListBoxItem>
<ListBoxItem>Sustain Pedal (Right)</ListBoxItem>
</ListBox>
</StackPanel>
<TextBlock Grid.Column="1" FontFamily="Segoe MDL2 Assets" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
<StackPanel Grid.Column="2">
<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
<TextBlock FontFamily="Segoe MDL2 Assets" Text="" FontSize="16" VerticalAlignment="Center" Margin="0,2,4,0"/>
<TextBlock>Page Turn Forward Key</TextBlock>
</StackPanel>
<ListBox x:Name="PageTurnKeyListBox1" SelectedIndex="0">
<ListBoxItem>Right Arrow Key</ListBoxItem>
<ListBoxItem>Page Down</ListBoxItem>
<ListBoxItem>Space Bar</ListBoxItem>
</ListBox>
</StackPanel>
</Grid>
<Grid Margin="0,0,0,24">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
<TextBlock FontFamily="Segoe MDL2 Assets" Text="" FontSize="14" VerticalAlignment="Center" Margin="0,0,4,0"/>
<TextBlock>MIDI Trigger 2</TextBlock>
</StackPanel>
<ListBox x:Name="MidiTriggerListBox2" SelectedIndex="1" SelectionChanged="MidiTriggerListBox2_SelectionChanged">
<ListBoxItem>Soft Pedal (Left)</ListBoxItem>
<ListBoxItem>Sostenuto Pedal (Middle)</ListBoxItem>
<ListBoxItem>Sustain Pedal (Right)</ListBoxItem>
</ListBox>
</StackPanel>
<TextBlock Grid.Column="1" FontFamily="Segoe MDL2 Assets" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
<StackPanel Grid.Column="2">
<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
<TextBlock FontFamily="Segoe MDL2 Assets" Text="" FontSize="16" VerticalAlignment="Center" Margin="0,2,4,0"/>
<TextBlock>Page Turn Backward Key</TextBlock>
</StackPanel>
<ListBox x:Name="PageTurnKeyListBox2" SelectedIndex="0">
<ListBoxItem>Left Arrow Key</ListBoxItem>
<ListBoxItem>Page Up</ListBoxItem>
<ListBoxItem>Shift + Space Bar</ListBoxItem>
</ListBox>
</StackPanel>
</Grid>
<Button x:Name="StartButton" Content="Start" Click="StartButton_Click" HorizontalAlignment="Stretch" IsEnabled="False" Height="50" Margin="0,0,0,24"/>
<ScrollViewer x:Name="LogScrollViewer" Height="160" BorderThickness="1" Padding="4">
<ScrollViewer.BorderBrush>
<SolidColorBrush Color="{ThemeResource SystemBaseLowColor}"/>
</ScrollViewer.BorderBrush>
<TextBlock x:Name="LogTextBox" FontSize="10"></TextBlock>
</ScrollViewer>
</StackPanel>
</Page>