-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPage.xaml
109 lines (92 loc) · 6.12 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
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:modules="clr-namespace:MauiController.Classes.Modules"
x:Class="MauiController.MainPage"
x:Name="HomePage"
BindingContext="{x:Reference HomePage}"
BackgroundColor="WhiteSmoke"
xmlns:local="clr-namespace:MauiController">
<ContentPage.ToolbarItems>
<!--<ImageButton Source="setting.png" Clicked="OnSettingClicked"/>-->
<ToolbarItem Text="Settings" IconImageSource="setting.png" />
<!--Clicked="OnSettingClicked" />-->
</ContentPage.ToolbarItems>
<ScrollView>
<!--MIDI INPUT/OUTPUT SELECTION-->
<VerticalStackLayout x:Name="StackLayoutHomePage" Padding="30" Spacing="20">
<HorizontalStackLayout HorizontalOptions="Center" Spacing="40">
<Label Text="Pedalboard Configuration: " VerticalTextAlignment="Center" HorizontalOptions="Center" TextColor="Black" VerticalOptions="Center" FontSize="28"></Label>
<Entry x:Name="LabelPedalboardName" TextChanged="OnPedalboardLabelChanged" VerticalOptions="Center" WidthRequest="200" FontSize="18" HeightRequest="60" Text="MyPedalboard" TextColor="Black" BackgroundColor="WhiteSmoke" ></Entry> <!--Text="MyPedalboardName"-->
</HorizontalStackLayout>
<HorizontalStackLayout HorizontalOptions="Center" Spacing="30">
<Button WidthRequest="150" Clicked="OnCreateNewPedalboardClicked" x:Name="bCreateNewPedalboard" Text="Create New" FontSize="18" ></Button>
<Button WidthRequest="100" Clicked="OnSavePedalboardClicked" x:Name="bSavePedalboard" Text="Save" FontSize="18" ></Button>
<Button WidthRequest="100" Clicked="OnLoadPedalboardClicked" x:Name="bOpenPedalBoard" Text="Open" FontSize="18" ></Button>
</HorizontalStackLayout>
<Label Text="General I/O Settings" HorizontalOptions="Center" TextColor="Black" VerticalOptions="StartAndExpand" FontSize="28"></Label>
<HorizontalStackLayout
Padding="30,0"
Spacing="5"
HorizontalOptions="Center"
VerticalOptions="Start">
<HorizontalStackLayout Padding="30" Spacing="20" HorizontalOptions="Start">
<Label Text="Midi Input Device" HorizontalOptions="Center" TextColor="Black" VerticalOptions="Center" FontSize="18">
</Label>
<Picker
x:Name="cbMidiInputs"
TextColor="White"
BackgroundColor="grey"
FontAutoScalingEnabled="True"
HeightRequest="60"
SelectedIndexChanged="OnMidiInputSelectionChange"
WidthRequest="300" >
</Picker>
</HorizontalStackLayout>
<HorizontalStackLayout Padding="30" Spacing="20">
<Label Text="Midi Output Device" HorizontalOptions="Center" TextColor="Black" VerticalOptions="Center" FontSize="18">
</Label>
<Picker
x:Name="cbMidiOutputs"
TextColor="White"
BackgroundColor="Grey"
HeightRequest="60"
SelectedIndexChanged="OnMidiOutputSelectionChange"
WidthRequest="300" >
</Picker>
</HorizontalStackLayout>
</HorizontalStackLayout>
<Label Text="Pedalboard Modules" HorizontalOptions="Center" TextColor="Black" VerticalOptions="Center" FontSize="28"></Label>
<CollectionView ItemsSource="{Binding PedalboardModules}" SelectionMode="Single" EmptyView="Add the first device module to you pedalboard!">
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="modules:Modules">
<HorizontalStackLayout Padding="30" Spacing="40" HorizontalOptions="Center" x:Name = "StackLayoutModule" IsVisible="True">
<Label Text="{Binding ModuleFriendlyName}" x:Name="LabelModuleName" HorizontalOptions="Center" TextColor="Black" VerticalOptions="Center" FontSize="23"></Label>
<Label Text="Channel" HorizontalOptions="Center" TextColor="Black" VerticalOptions="Center" FontSize="20"></Label>
<Picker
ItemsSource="{Binding MidiChannels}"
SelectedIndex="{Binding MidiChannelSelectedIdx}"
x:Name="cbChannel"
TextColor="White"
BackgroundColor="grey"
FontAutoScalingEnabled="True"
HeightRequest="60"
WidthRequest="150" >
</Picker>
<ImageButton WidthRequest="100"
CornerRadius="10"
Padding="10"
HeightRequest="50"
BackgroundColor="OrangeRed"
Source="minus.png"
x:Name="RemoveModuleButton"
Command="{Binding DeleteModuleCommand}">
</ImageButton>
</HorizontalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<ImageButton WidthRequest="250" CornerRadius="10" Padding="10" HeightRequest="50" Clicked="AddModuleClicked" BackgroundColor="LightGreen" Source="add.png" x:Name="AddModuleButton"></ImageButton>
</VerticalStackLayout>
</ScrollView>
</ContentPage>