Cosmos/source/Cosmos.Build.Windows/UI/OptionsUC.xaml
2009-05-16 10:26:46 +00:00

271 lines
15 KiB
XML

<UserControl x:Class="Cosmos.Compiler.Builder.OptionsUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:l="clr-namespace:Cosmos.Compiler.Builder"
Width="607" Height="Auto">
<UserControl.Resources>
<Style x:Key="sectionTitle" TargetType="{x:Type Label}">
<Setter Property="Background" Value="LightGray" />
<Setter Property="Padding" Value="5" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="13" />
</Style>
<Style x:Key="sectionBody" TargetType="Panel">
<Setter Property="Margin" Value="7" />
</Style>
<Style x:Key="subsectionTitle" TargetType="{x:Type Label}">
<Setter Property="FontWeight" Value="Bold" />
</Style>
<Style TargetType="RadioButton">
<Setter Property="Margin" Value="5, 5, 10, 5" />
</Style>
<Style TargetType="CheckBox">
<Setter Property="Margin" Value="5, 5, 10, 5" />
</Style>
<Style TargetType="ComboBox">
<Setter Property="Height" Value="23" />
<Setter Property="MinWidth" Value="60" />
</Style>
<Style TargetType="Button">
<Setter Property="Width" Value="75" />
<Setter Property="Height" Value="23" />
</Style>
<Style TargetType="l:OptionsUC">
<Setter Property="Template" >
<Setter.Value>
<ControlTemplate TargetType="l:OptionsUC">
<ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Auto">
<ContentPresenter Content="{TemplateBinding Content}"/>
</ScrollViewer>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border Grid.Row="0" Background="Gray">
<Image Source="/Cosmos.Compiler.Builder;component/Logo-1.png" Width="150" HorizontalAlignment="Center"
Margin="20, 10, 10, 8"/>
</Border>
<ScrollViewer Grid.Row="1" CanContentScroll="False" ScrollViewer.VerticalScrollBarVisibility="Auto">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<Label Style="{StaticResource sectionTitle}">Status</Label>
<StackPanel Orientation="Horizontal" Style="{StaticResource sectionBody}">
<Label Style="{StaticResource subsectionTitle}">Current build path:</Label>
<TextBlock TextWrapping="Wrap" Margin="25, 0, 0, 5" Name="tblkBuildPath">Build Path</TextBlock>
</StackPanel>
<Label Style="{StaticResource sectionTitle}">Target</Label>
<WrapPanel Style="{StaticResource sectionBody}">
<StackPanel>
<Label Style="{StaticResource subsectionTitle}">Emulators &amp; Virtualization</Label>
<WrapPanel Margin="20,0,0,0">
<RadioButton Name="rdioQEMU" GroupName="Target">_QEMU</RadioButton>
<RadioButton Name="rdioVMWare" GroupName="Target">VM_Ware</RadioButton>
<RadioButton Name="rdioVPC" GroupName="Target">Virtual _PC</RadioButton>
</WrapPanel>
</StackPanel>
<StackPanel Margin="20,0,0,0">
<Label Style="{StaticResource subsectionTitle}">Native</Label>
<WrapPanel Margin="20,0,0,0">
<RadioButton GroupName="Target" Name="rdioISO">_ISO</RadioButton>
<RadioButton GroupName="Target" Name="rdioPXE">_Network (PXE)</RadioButton>
<RadioButton GroupName="Target" Name="rdioUSB">_USB Device</RadioButton>
<RadioButton GroupName="Target" Name="rdioVHD" IsEnabled="False">_VHD</RadioButton>
</WrapPanel>
</StackPanel>
</WrapPanel>
<Label Style="{StaticResource sectionTitle}">.NET Framework</Label>
<Grid Style="{StaticResource sectionBody}">
<WrapPanel Margin="20, 0, 0, 0">
<RadioButton GroupName="FrameworkImplementation" Name="rdioMSNET">Microsoft</RadioButton>
<RadioButton GroupName="FrameworkImplementation" Name="rdioProjectMono">Mono</RadioButton>
</WrapPanel>
</Grid>
<StackPanel Name="spnlDebugger">
<Label Style="{StaticResource sectionTitle}">Cosmos Debugger</Label>
<StackPanel Style="{StaticResource sectionBody}">
<WrapPanel>
<StackPanel>
<Label Style="{StaticResource subsectionTitle}">Source Level</Label>
<WrapPanel Margin="20,0,0,0">
<RadioButton Name="rdioDebugModeNone" GroupName="DebugMode" IsChecked="True">None</RadioButton>
<RadioButton Name="rdioDebugModeIL" GroupName="DebugMode">IL</RadioButton>
<RadioButton Name="rdioDebugModeSource" GroupName="DebugMode">Source</RadioButton>
</WrapPanel>
</StackPanel>
<StackPanel Margin="10, 0, 0, 0">
<Label Style="{StaticResource subsectionTitle}">Traced Assemblies</Label>
<WrapPanel Margin="20,0,0,0">
<RadioButton Name="rdioDebugAssembliesAll" GroupName="DebugAsseblies">All</RadioButton>
<RadioButton Name="rdioDebugAssembliesCosmos" GroupName="DebugAsseblies" IsChecked="True">Cosmos + User</RadioButton>
<RadioButton Name="rdioDebugAssembliesUser" GroupName="DebugAsseblies">User Only</RadioButton>
</WrapPanel>
</StackPanel>
</WrapPanel>
<WrapPanel Name="wpnlDebugPort" Margin="0, 10, 0, 0" ToolTip="This is the COM-port on the machine running the debugger">
<Label Margin="0,0,10,0">COM Port:</Label>
<ComboBox Name="cmboDebugPort"/>
</WrapPanel>
</StackPanel>
</StackPanel>
<StackPanel Name="DebugComMode">
<Label Style="{StaticResource sectionTitle}">Debug communication mode</Label>
<StackPanel Orientation="Horizontal" Style="{StaticResource sectionBody}">
<Label Margin="0, 0, 10, 0">Mode:</Label>
<ComboBox Margin="0, 2" Name="cmbDebugComMode" HorizontalAlignment="Left" />
</StackPanel>
</StackPanel>
<StackPanel Name="spnlPXE">
<Label Style="{StaticResource sectionTitle}">PXE Network Boot</Label>
<Grid Style="{StaticResource sectionBody}">
<TextBlock TextWrapping="Wrap">
After building, start up another PC with network boot enabled and Cosmos will boot
on to it automatically.
</TextBlock>
</Grid>
</StackPanel>
<StackPanel Name="spnlUSB">
<Label Style="{StaticResource sectionTitle}">USB Boot</Label>
<StackPanel Style="{StaticResource sectionBody}">
<TextBlock Margin="10,10,10,0" TextWrapping="Wrap">
Please choose a USB drive or stick that is formatted as FAT or FAT32. Note that
selecting this device will overwrite the Master Boot Record (MBR) on the USB drive.
Because of this take care to select the proper device. After a succesful build,
you can then use this device to boot a physical machine. You may need to select the
BIOS boot menu, use a multi boot utility, or change the BIOS boot sequence.
</TextBlock>
<TextBlock Margin="10,10,10,0" TextWrapping="Wrap">
Only removable drives formatted as FAT or FAT32 will be listed. If you do not see your
device, check its format.
</TextBlock>
<WrapPanel Margin="10,10,0,0">
<Label Margin="-5,0,10,0">USB Device on drive letter:</Label>
<ComboBox Name="cmboUSBDevice"/>
</WrapPanel>
</StackPanel>
</StackPanel>
<StackPanel Name="spnlQEMU" Visibility="Collapsed">
<Label Style="{StaticResource sectionTitle}">QEMU Emulator</Label>
<StackPanel Style="{StaticResource sectionBody}">
<WrapPanel>
<CheckBox Name="chbxQEMUUseGDB" IsChecked="False">Enable GDB</CheckBox>
<CheckBox Name="chbxQEMUUseHD" IsChecked="False">Enable hard disk images</CheckBox>
</WrapPanel>
<Grid Margin="10,10,0,0">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Margin="0,0,10,0">Network Card:</Label>
<ComboBox Grid.Row="0" Grid.Column="1" Margin="5" Name="cmboNetworkCards" SelectedIndex="1" />
<CheckBox Name="chckQEMUUseNetworkTAP" Grid.Row="0" Grid.Column="2" IsChecked="False" HorizontalAlignment="Center">
Enable network TAP. The TAP must be named CosmosTAP.
</CheckBox>
<Label Grid.Row="1" Grid.Column="0" Margin="0,0,10,0">Audio Card:</Label>
<ComboBox Name="cmboAudioCards" Grid.Row="1" Grid.Column="1" Margin="5" SelectedIndex="1" />
</Grid>
</StackPanel>
</StackPanel>
<StackPanel Name="spnlVMWare">
<Label Style="{StaticResource sectionTitle}">VMWare</Label>
<WrapPanel Style="{StaticResource sectionBody}">
<RadioButton Name="rdVMWareWorkstation" GroupName="VMWareVersion" IsChecked="True">Workstation</RadioButton>
<RadioButton Name="rdVMWareServer" GroupName="VMWareVersion">Server</RadioButton>
</WrapPanel>
</StackPanel>
<StackPanel Name="spnlVPC">
<Label Style="{StaticResource sectionTitle}">Microsoft Virtual PC, Virtual Server &amp; Hyper-V</Label>
<Grid Style="{StaticResource sectionBody}">
<TextBlock TextWrapping="Wrap">No options are available for Virtual PC.</TextBlock>
</Grid>
</StackPanel>
<StackPanel Name="spnlVHD">
<Label Style="{StaticResource sectionTitle}">VHD</Label>
<WrapPanel Style="{StaticResource sectionBody}">
<CheckBox Name="chbxBM" IsChecked="False">Add vhd on Windows Boot Manager (only Windows 7 for now)</CheckBox>
</WrapPanel>
</StackPanel>
<StackPanel Name="spnlISO">
<Label Style="{StaticResource sectionTitle}">ISO Image</Label>
<StackPanel Orientation="Horizontal" Style="{StaticResource sectionBody}">
<Label Style="{StaticResource subsectionTitle}">ISO image will be output as:</Label>
<TextBlock TextWrapping="Wrap" Margin="25, 0, 0, 5" Name="tblkISOPath">ISO Path</TextBlock>
</StackPanel>
</StackPanel>
<Label Style="{StaticResource sectionTitle}">Miscellaneous</Label>
<StackPanel Style="{StaticResource sectionBody}">
<CheckBox IsChecked="True" Name="chbxShowOptions">Always show this window</CheckBox>
<TextBlock TextWrapping="Wrap" Margin="35,0">If unchecked, this screen will not be shown on each build and the last options will be used. To redisplay this window, hold down the Control key.</TextBlock>
<CheckBox Name="chbxCompileIL" IsChecked="True">Compile IL</CheckBox>
<TextBlock TextWrapping="Wrap" Margin="35,0">Warning: This is an advanced option and normally should remain checked.</TextBlock>
<CheckBox Name="chbxUseInternalAssembler" IsChecked="False">Use Internal _Assembler</CheckBox>
<TextBlock TextWrapping="Wrap" Margin="35,0">Warning: This is an experimental feature, and should not be checked. Also, this is not persisted!</TextBlock>
</StackPanel>
</StackPanel>
</Grid>
</ScrollViewer>
</Grid>
</UserControl>