-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPage.xaml
112 lines (98 loc) · 7.44 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
110
111
112
<Page
x:Class="Soft_Walkman.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:Windows10version1903="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 8)"
mc:Ignorable="d" Height="720.333" Width="875" MaxHeight="649" MaxWidth="875">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" RenderTransformOrigin="0.492,0.582" Margin="97,16,0,0" HorizontalAlignment="Left" Width="688" Height="613" VerticalAlignment="Top">
<Button x:Name="stopButton" Click="StopButton_Click" Margin="246,423,0,0" VerticalAlignment="Top" Height="63" Width="69" ToolTipService.ToolTip="Stop Cassette Tape from playing | ctrl-s">
<SymbolIcon x:Name="Stop" Symbol="Stop" />
<Button.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="Control" Key="s"></KeyboardAccelerator>
</Button.KeyboardAccelerators>
</Button>
<Button x:Name="openButton" Click="OpenCassetteButton_ClickAsync" Margin="316,423,0,0" VerticalAlignment="Top" Height="63" Width="70" ToolTipService.ToolTip="Select Cassette Tape(a.k.a Folder of Music) to play | ctrl-o">
<SymbolIcon x:Name="Open" Symbol="Add" />
<Button.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="Control" Key="o"></KeyboardAccelerator>
</Button.KeyboardAccelerators>
</Button>
<RepeatButton x:Name="fastFowardButton" Click="fastFowardButton_Click" Margin="389,458,0,0" VerticalAlignment="Top" Height="61" Width="70" ToolTipService.ToolTip="Fast Forward Cassette Tape | ctrl-f" ToolTipService.Placement="Right">
<SymbolIcon x:Name="FastForward" Symbol="Forward" />
<RepeatButton.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="Control" Key="f"></KeyboardAccelerator>
</RepeatButton.KeyboardAccelerators>
</RepeatButton>
<RepeatButton x:Name="rewindButton" Click="RewindButton_Click" Margin="173,458,0,0" VerticalAlignment="Top" Height="61" Width="70" ToolTipService.ToolTip="Rewind Cassette Tape | ctrl-r" ToolTipService.Placement="Left">
<SymbolIcon x:Name="Rewind" Symbol="Back" />
<RepeatButton.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="Control" Key="r"></KeyboardAccelerator>
</RepeatButton.KeyboardAccelerators>
</RepeatButton>
<Button x:Name="playButton" Click="Play_ClickAsync" Margin="316,487,0,0" VerticalAlignment="Top" Height="63" Width="70" RenderTransformOrigin="0.481,0.497" ToolTipService.ToolTip="Play loaded Cassette Tape | ctrl-shift-p" ToolTipService.Placement="Top">
<SymbolIcon x:Name="Play" Symbol="Play" />
<Button.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="Control,Shift" Key="p"></KeyboardAccelerator>
</Button.KeyboardAccelerators>
</Button>
<Button x:Name="pauseButton" Click="PauseButton_Click" Height="63" Width="69" Margin="246,487,0,0" VerticalAlignment="Top" ToolTipService.ToolTip="Pause Cassette Tape | ctrl-p" ToolTipService.Placement="Bottom">
<SymbolIcon x:Name="Pause" Symbol="Pause"/>
<Button.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="Control" Key="p"></KeyboardAccelerator>
</Button.KeyboardAccelerators>
</Button>
<Image CacheMode="BitmapCache" AllowDrop="True" DragOver="Tape_DragOver" Drop="Tape_DragDrop" HorizontalAlignment="Left" Height="302" Margin="43,28,0,0" VerticalAlignment="Top" Width="556">
<Image.Source>
<BitmapImage x:Name="cassetteTapeGif" UriSource="Assets/CassetteImages/rolling-cassette.gif"></BitmapImage>
</Image.Source>
</Image>
<ScrollViewer x:Name="scrollviewer" Unloaded="TapeNameScrollViewer_Unloaded" VerticalScrollBarVisibility="Disabled" VerticalScrollMode="Disabled" HorizontalScrollBarVisibility="Hidden" HorizontalScrollMode="Enabled" HorizontalContentAlignment="Center" Margin="148,0,330,508" RenderTransformOrigin="0.502,0.564" Height="81" VerticalAlignment="Bottom">
<Grid>
<TextBlock x:Name="cassetteTitleLabel" Text="Mix Tape Vol. 1" Margin="3,63,6,1" TextWrapping="NoWrap" TextReadingOrder="Default" TextAlignment="Center" FontFamily="Courier New" Height="19"/>
</Grid>
</ScrollViewer>
<Slider x:Name="volumeSlider" ValueChanged="ChangeWalkmanVolume" Minimum="0" Maximum="10" Header="Volume" HorizontalAlignment="Left" Margin="189,334,0,0" VerticalAlignment="Top" Width="260" Height="54" ToolTipService.Placement="Top" ToolTipService.ToolTip="Control Walkman volume | ctrl-v to raise volume; ctrl-shift-v to lower volume">
<Slider.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="Control" Key="v" Invoked="VolumeIncreased_Invoked"></KeyboardAccelerator>
<KeyboardAccelerator Modifiers="Control,Shift" Key="v" Invoked="VolumeDecreased_Invoked"></KeyboardAccelerator>
</Slider.KeyboardAccelerators>
</Slider>
<Ellipse x:Name="lightIndicator" Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="16" Margin="551,35,0,0" VerticalAlignment="Top" Width="16">
</Ellipse>
<Button x:Name="cassetteTrackListButton" ToolTipService.Placement="Left" ToolTipService.ToolTip="Track List | ctrl-t" HorizontalAlignment="Left" Margin="542,69,0,0" VerticalAlignment="Top" Width="33" RenderTransformOrigin="0.363,-0.177" Height="31">
<SymbolIcon x:Name="cassetteTrackList" Symbol="List"/>
<Button.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="Control" Key="T" ></KeyboardAccelerator>
</Button.KeyboardAccelerators>
<Button.Flyout>
<Flyout Placement="Bottom">
<ListView x:Name="CassetteTrackListView">
<ListView.Header>
<TextBlock Text="Track List:" FontSize="14" FontWeight="SemiBold"/>
</ListView.Header>
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" TextWrapping="NoWrap" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Flyout>
</Button.Flyout>
</Button>
<Button x:Name="cassetteAlbumArtButton" Margin="542,108,0,0" VerticalAlignment="Top" Width="33" Height="33" ToolTipService.Placement="Left" ToolTipService.ToolTip="View Album Art | ctrl-a">
<SymbolIcon x:Name="CassetteAlbumArt" Symbol="Pictures" Margin="-6,1,-6,-1" />
<Button.KeyboardAccelerators>
<KeyboardAccelerator Modifiers="Control" Key="A"></KeyboardAccelerator>
</Button.KeyboardAccelerators>
<Button.Flyout>
<Flyout Placement="Bottom">
<Image x:Name="AlbumArtImage" Height="300" Width="300" CacheMode="BitmapCache" />
</Flyout>
</Button.Flyout>
</Button>
</Grid>
</Page>