-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.axaml
128 lines (123 loc) · 11.2 KB
/
MainWindow.axaml
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<Window xmlns="https://github.com/avaloniaui"
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:lang="clr-namespace:MoSpeedUI.Lang"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="MoSpeedUI.MainWindow"
Title="MoSpeedUI"
DragDrop.AllowDrop="True">
<ScrollViewer Margin="8">
<StackPanel HorizontalAlignment="Center" x:Name="ParentPanel">
<Image HorizontalAlignment="Center" Source="avares://MoSpeedUI/Assets/Images/mospeed.png" x:Name="MoSpeedLogo"></Image>
<TextBlock HorizontalAlignment="Center" FontSize="24" FontWeight="Medium" TextAlignment="Center" TextWrapping="WrapWithOverflow" Text="{x:Static lang:Resources.IntroText}" />
<StackPanel HorizontalAlignment="Center" x:Name="ControlPanel" Margin="0,20,0,0">
<!--Step 1 Start!-->
<StackPanel x:Name="Step1">
<TextBlock FontWeight="Bold" FontSize="26" Text="{x:Static lang:Resources.Step1}"/>
<Border Background="Gainsboro"
BorderBrush="Black"
BorderThickness="2"
CornerRadius="3"
Padding="10" Margin="0,10,0,10" x:Name="DragBox" DragDrop.AllowDrop="True">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="DragText" Text="{x:Static lang:Resources.DragBox}" Padding="0,25,0,25"/>
</Border>
<TextBlock Text="{x:Static lang:Resources.FileListDesc}"/>
<ScrollViewer x:Name="FileListScroller" VerticalScrollBarVisibility="Visible">
<StackPanel x:Name="FileListPanel"></StackPanel>
</ScrollViewer>
</StackPanel>
<!--Step 1 END!-->
<!--Step 2 Start!-->
<StackPanel x:Name="Step2" Margin="0,10,0,10">
<TextBlock FontWeight="Bold" FontSize="26" Text="{x:Static lang:Resources.Step2}"/>
<Grid ColumnDefinitions="*, *" RowDefinitions="*, *" Margin="0,0,0,10">
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static lang:Resources.TargetPlatform}" Margin="0,0,0,4"/>
<ComboBox Margin="4,0,0,0" Grid.Row="1" Grid.Column="0" SelectedIndex="-1" x:Name="PlatformSelect">
<ComboBoxItem>C64</ComboBoxItem>
<ComboBoxItem>VIC 20/VC 20</ComboBoxItem>
<ComboBoxItem>JavaScript</ComboBoxItem>
<ComboBoxItem>Powershell</ComboBoxItem>
<ComboBoxItem>Python</ComboBoxItem>
</ComboBox>
<Grid Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" ColumnDefinitions="*" RowDefinitions="Auto, *, *" Margin="8,0,0,0" x:Name="PlatformConf">
<TextBlock Grid.Row="0" Text="{x:Static lang:Resources.PlatformSpecific}" Margin="0,0,0,4"/>
<Panel Grid.Row="1" x:Name="C64Conf">
<CheckBox x:Name="C64ConfBox" Content="{x:Static lang:Resources.C64Specific}"/>
</Panel>
<Panel Grid.Row="1" x:Name="Vc20Conf">
<StackPanel>
<TextBlock Text="{x:Static lang:Resources.MemoryConfig}" Margin="0,0,0,4"/>
<ComboBox SelectedIndex="1" x:Name="Vc20ConfBox">
<ComboBoxItem Content="{x:Static lang:Resources.NoExpansion}"/>
<ComboBoxItem Content="{x:Static lang:Resources.ThreeKExpansion}"/>
<ComboBoxItem Content="{x:Static lang:Resources.EightKExpansion}"/>
</ComboBox>
</StackPanel>
</Panel>
<Panel Grid.Row="1" x:Name="JSConf">
<TextBlock Text="{x:Static lang:Resources.JSPlatformConfig}"/>
</Panel>
<Panel Grid.Row="1" x:Name="PSConf">
<TextBlock Text="{x:Static lang:Resources.PSPlatformConfig}"/>
</Panel>
<Panel Grid.Row="1" x:Name="PyConf">
<TextBlock Text="{x:Static lang:Resources.PyPlatformConfig}"/>
</Panel>
</Grid>
</Grid>
<Grid ColumnDefinitions="Auto, *" RowDefinitions="Auto, Auto, Auto, Auto" ShowGridLines="False">
<Label Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" Margin="0,0,6,0" Content="{x:Static lang:Resources.ProgramStart}" Target="ProgramStartAdd"/>
<TextBox Margin="4" Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" x:Name="ProgramStartAdd" Watermark="{x:Static lang:Resources.DecimalOrHexWDefault}"/>
<Label Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" Margin="0,0,6,0" Content="{x:Static lang:Resources.VarsStart}" Target="VarsStartAdd"/>
<TextBox Margin="4" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" x:Name="VarsStartAdd" Watermark="{x:Static lang:Resources.DecimalOrHexWDefault}"/>
<Label Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" Margin="0,0,6,0" Content="{x:Static lang:Resources.StringMemEnd}" Target="StringMemEndAdd"/>
<TextBox Margin="4" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" x:Name="StringMemEndAdd" Watermark="{x:Static lang:Resources.DecimalOrHexWDefault}"/>
<Label Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" Margin="0,0,6,0" Content="{x:Static lang:Resources.RuntimeStart}" Target="RuntimeStartAdd"/>
<TextBox Margin="4" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" x:Name="RuntimeStartAdd" Watermark="{x:Static lang:Resources.DecimalOrHexWDefault}"/>
</Grid>
</StackPanel>
<!--Step 2 END!-->
<!--Step 3 Start-->
<StackPanel x:Name="Step3">
<TextBlock FontWeight="Bold" FontSize="26" Text="{x:Static lang:Resources.Step3}"/>
<Grid ColumnDefinitions="Auto, *" RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto" ShowGridLines="False">
<Label Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" Margin="0,0,6,0" Content="{x:Static lang:Resources.CompressLvl}" Target="CompressLvl"/>
<ComboBox SelectedIndex="0" Margin="4" Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" x:Name="CompressLvl">
<ComboBoxItem Content="{x:Static lang:Resources.CompressLvl0}"/>
<ComboBoxItem Content="{x:Static lang:Resources.CompressLvl1}"/>
<ComboBoxItem Content="{x:Static lang:Resources.CompressLvl2}"/>
<ComboBoxItem Content="{x:Static lang:Resources.CompressLvl3}"/>
</ComboBox>
<Label Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" Margin="0,0,6,0" Content="{x:Static lang:Resources.SrcCdePrsc}" Target="SrcCdePrsc"/>
<ComboBox Margin="4" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" x:Name="SrcCdePrsc" SelectedIndex="0">
<ComboBoxItem Content="{x:Static lang:Resources.SrcCdeNone}"/>
<ComboBoxItem Content="{x:Static lang:Resources.SrcCdeLower}"/>
<ComboBoxItem Content="{x:Static lang:Resources.SrcCdeFlip}"/>
</ComboBox>
<Label Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" Margin="0,0,6,0" Content="{x:Static lang:Resources.LoopHandling}" Target="LoopHandling"/>
<ComboBox Margin="4" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" x:Name="LoopHandling" SelectedIndex="0">
<ComboBoxItem Content="{x:Static lang:Resources.LoopHandlingRemove}"/>
<ComboBoxItem Content="{x:Static lang:Resources.LoopHandlingRetain}"/>
</ComboBox>
<Label Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" Margin="0,0,6,0" Content="Linker:"/>
<CheckBox Margin="4" Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" x:Name="LinkerOpt" Content="{x:Static lang:Resources.LinkerOptBox}"/>
<Label Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static lang:Resources.MemHoles}"/>
<Grid Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" x:Name="MemHoleGrid" RowDefinitions="*" ColumnDefinitions="*, Auto, *">
<TextBox Name="MemHoleStart0" Grid.Row="0" Grid.Column="0" Watermark="{x:Static lang:Resources.DecimalOrHex}" />
<TextBlock Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4,0,4,0" Text="{x:Static lang:Resources.To}" />
<TextBox Name="MemHoleEnd0" Grid.Row="0" Grid.Column="2" Watermark="{x:Static lang:Resources.DecimalOrHex}" />
</Grid>
<Button Grid.Row="6" x:Name="MemHoleBtn" Grid.Column="1" Margin="0,4,0,0" HorizontalAlignment="Right" Content="{x:Static lang:Resources.AddMemHole}" Click="MemHoleBtn_OnClick"/>
</Grid>
</StackPanel>
<!--Step 3 END!-->
<StackPanel x:Name="Step4" Margin="0,16,0,0">
<Button x:Name="CompileBtn" Click="CompileBtn_OnClick" Margin="0,0,0,4" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Content="{x:Static lang:Resources.Compile}"/>
<Button Margin="0,0,0,4" x:Name="AdvSettings" Click="AdvSettings_OnClick" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Content="{x:Static lang:Resources.Advanced}"/>
<TextBlock Text="{x:Static lang:Resources.About}" x:Name="AboutLink" HorizontalAlignment="Center" TextDecorations="Underline" Foreground="Blue" PointerPressed="AboutLink_OnPointerPressed"/>
</StackPanel>
</StackPanel>
</StackPanel>
</ScrollViewer>
</Window>