-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
107 lines (101 loc) · 5.75 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
<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:LTracker"
xmlns:Properties="clr-namespace:LTracker.Properties" x:Class="LTracker.MainWindow"
mc:Ignorable="d"
Title="LithTracker" Height="450" Width="800">
<Window.CommandBindings>
<CommandBinding Command="ApplicationCommands.New" CanExecute="OpenCommand_CanExecute" />
<CommandBinding Command="ApplicationCommands.Open" CanExecute="OpenCommand_CanExecute" Executed="OpenCommand_Executed" />
</Window.CommandBindings>
<Window.Resources>
<DataTemplate x:Key="ChannelView" DataType="x:Channel">
<DockPanel Width="100" Height="360">
<WrapPanel DockPanel.Dock="Top" Margin="8,2">
<TextBlock DockPanel.Dock="Left" Text="{Binding instrument_id}"></TextBlock>
<TextBlock Text="{Binding name}"></TextBlock>
</WrapPanel>
<GroupBox DockPanel.Dock="Top" Header="Transpose">
<StackPanel Orientation="Vertical">
<WrapPanel>
<TextBlock DockPanel.Dock="Left" Margin="0,0,8,0">Octave:</TextBlock>
<TextBox Text="{Binding transpose}"></TextBox>
</WrapPanel>
<WrapPanel>
<TextBlock DockPanel.Dock="Left" Margin="0,0,8,0">Whatever:</TextBlock>
<TextBox>M</TextBox>
</WrapPanel>
</StackPanel>
</GroupBox>
<GroupBox Header="Sample">
<DockPanel>
<StackPanel DockPanel.Dock="Top">
<TextBlock>Pan</TextBlock>
<Slider Orientation="Horizontal" Value="{Binding pan}" Minimum="-1.0" Maximum="1.0" SmallChange="0.05" TickPlacement="BottomRight" TickFrequency="0.1"></Slider>
</StackPanel>
<DockPanel>
<ContentPresenter DockPanel.Dock="Left" VerticalAlignment="Center">
<ContentPresenter.LayoutTransform>
<RotateTransform Angle="270"></RotateTransform>
</ContentPresenter.LayoutTransform>
<ContentPresenter.Content>
<TextBlock>Volume</TextBlock>
</ContentPresenter.Content>
</ContentPresenter>
<Slider Orientation="Vertical" Value="{Binding volume}" Minimum="0" Maximum="100" TickFrequency="5" TickPlacement="BottomRight"></Slider>
</DockPanel>
</DockPanel>
</GroupBox>
</DockPanel>
</DataTemplate>
</Window.Resources>
<DockPanel LastChildFill="True">
<Menu DockPanel.Dock="Top">
<MenuItem Header="_File">
<MenuItem Command="ApplicationCommands.New" Header="_New"></MenuItem>
<MenuItem Command="ApplicationCommands.Open" Header="_Open"></MenuItem>
<Separator />
<MenuItem Command="ApplicationCommands.Close" Header="_Exit"></MenuItem>
</MenuItem>
<MenuItem Header="_Help"></MenuItem>
</Menu>
<ToolBarTray DockPanel.Dock="Top">
<ToolBar>
<Button Command="ApplicationCommands.New" Content="New" />
<Button Command="ApplicationCommands.Open" Content="Open" />
<Button Command="ApplicationCommands.Save" Content="Save" />
</ToolBar>
<ToolBar>
<Button Click="OpenInstrumentsWindow" Content="Instruments" />
<Button Click="OpenPatternWindow" Content="Pattern" />
<Button Click="OpenSectionWindow" Content="Section" />
<Button Click="Button_Click" Content="Channels" />
</ToolBar>
</ToolBarTray>
<StatusBar DockPanel.Dock="Bottom">
<TextBlock x:Name="TrackerName" Text="{Binding file_path}"/>
</StatusBar>
<!--<Border DockPanel.Dock="Left" Width="128px" BorderThickness="2" BorderBrush="#FF0E7E13" Padding="2,2,2,2">
<DockPanel>-->
<ListBox DockPanel.Dock="Left" Width="128" x:Name="ChunkList" ItemsSource="{Binding song_files}" DisplayMemberPath="file_name" SelectionChanged="ChunkList_SelectionChanged" />
<!--</DockPanel>
</Border>-->
<Border BorderThickness="2" BorderBrush="#FF570404" Padding="2,2,2,2">
<DockPanel>
<TextBox DockPanel.Dock="Top" TextWrapping="Wrap" x:Name="TestTextBox" VerticalScrollBarVisibility="Auto" />
<ScrollViewer Height="Auto" VerticalAlignment="Top" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<ItemsControl HorizontalContentAlignment="Left" x:Name="Channels" ItemTemplate="{StaticResource ChannelView}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</ScrollViewer>
</DockPanel>
</Border>
</DockPanel>
</Window>