2022-11-24 19:38:19 +01:00
<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:abc="http://wpfcontrols.com/"
2022-12-14 18:44:39 +01:00
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
2022-11-24 19:38:19 +01:00
xmlns:local="clr-namespace:EliteBGS"
xmlns:Util="clr-namespace:EliteBGS.Util" d:DataContext="{d:DesignInstance Type=Util:AppConfig}" x:Name="window" x:Class="EliteBGS.MainWindow"
mc:Ignorable="d"
2022-11-29 17:09:45 +01:00
Title="Elite: Dangerous BGS Helper" Height="520" Width="890" Icon="Salus.ico" Closing="window_Closing">
2022-11-26 16:19:55 +01:00
<Window.Resources>
<Style x:Key="StretchingTreeViewStyle" TargetType="TreeViewItem" BasedOn="{StaticResource {x:Type TreeViewItem}}">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
</Style>
<local:MinusFortyFiveConverter x:Key="MinusFortyFiveConverter" />
</Window.Resources>
2022-11-24 19:38:19 +01:00
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TabControl>
<TabItem Header="Current Objectives">
<Grid Background="#FFE5E5E5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
2022-12-14 18:17:25 +01:00
<RowDefinition/>
<RowDefinition Height="Auto"/>
<RowDefinition/>
2022-11-24 19:38:19 +01:00
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
2022-12-14 18:17:25 +01:00
<ToolBar VerticalAlignment="Top" Grid.Row="0" Width="Auto" Margin="0,0,0,0" Height="Auto" Grid.ColumnSpan="3" HorizontalAlignment="Left">
2022-11-24 19:38:19 +01:00
<Button x:Name="ParseJournal" Content="Parse Journal" VerticalAlignment="Center" Click="ParseJournal_Click" HorizontalAlignment="Center"/>
<Separator Margin="1" VerticalAlignment="Center" MinWidth="1" HorizontalAlignment="Center" MinHeight="22"/>
2022-12-14 18:44:39 +01:00
<Label Content="From (UTC):" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Center"/>
<xctk:DateTimePicker x:Name="startdate" Height="26.2857142857143" VerticalAlignment="Center" HorizontalAlignment="Center"/>
2022-12-14 19:07:05 +01:00
<Label Content="To (UTC):" Height="26.2857142857143" VerticalAlignment="Top"/>
2022-12-14 18:44:39 +01:00
<xctk:DateTimePicker x:Name="enddate" Height="26.2857142857143" VerticalAlignment="Center" HorizontalAlignment="Center"/>
2022-11-24 19:38:19 +01:00
<Separator Margin="1" VerticalAlignment="Center" MinWidth="1" HorizontalAlignment="Center" MinHeight="22"/>
2022-12-14 19:07:05 +01:00
<Button x:Name="ResetTime" Content="Reset Time" Click="ResetTime_Click" />
<Separator Margin="1" VerticalAlignment="Center" MinWidth="1" HorizontalAlignment="Center" MinHeight="22"/>
2022-11-24 19:38:19 +01:00
<Button x:Name="ManuallyParse" Content="Manually Parse JSON" Click="ManuallyParse_Click" />
</ToolBar>
2022-12-14 18:17:25 +01:00
<ToolBar Grid.Row="1" HorizontalAlignment="Left" Height="36" VerticalAlignment="Top" Width="Auto" Grid.ColumnSpan="2">
<Button x:Name="GenerateDiscord" Content="Generate Discord Report" VerticalAlignment="Center" Margin="0,0,0,5" Click="GenerateDiscord_Click" Height="26"/>
<Separator />
<ComboBox x:Name="LogType" Height="36" Margin="0" VerticalAlignment="Center" Width="140" SelectionChanged="LogType_SelectionChanged" />
</ToolBar>
2022-11-26 16:19:55 +01:00
<TreeView CheckBox.Checked="TreeView_CheckBox_Updated"
CheckBox.Unchecked="TreeView_CheckBox_Updated"
x:Name="entries" Margin="0,0,0,0"
Grid.ColumnSpan="3" Grid.Row="2"
KeyUp="entries_KeyUp"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
>
2022-11-24 19:38:19 +01:00
<TreeView.ItemTemplate>
2022-11-26 16:19:55 +01:00
<HierarchicalDataTemplate DataType="{x:Type local:Objective}" ItemsSource="{Binding UITransactions}" ItemContainerStyle="{StaticResource StretchingTreeViewStyle}">
2022-11-29 17:42:20 +01:00
<Grid
HorizontalAlignment="Stretch"
Width="{Binding ActualWidth, ElementName=entries, Converter={StaticResource MinusFortyFiveConverter}}"
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
2022-12-14 19:09:59 +01:00
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,2,0,2">
2022-11-29 17:42:20 +01:00
<CheckBox Focusable="False" IsChecked="{Binding IsEnabled}" VerticalAlignment="Center"/>
2022-12-14 19:09:59 +01:00
<TextBlock Text="System: " Visibility="{Binding HasSystem}" Margin="2,0,0,0"/>
2022-11-29 17:42:20 +01:00
<TextBlock Text="{Binding System}" FontWeight="DemiBold" Visibility="{Binding HasSystem}"/>
2022-12-14 19:09:59 +01:00
<TextBlock Text="Faction: " Visibility="{Binding HasFaction}" Margin="2,0,0,0"/>
2022-11-29 17:42:20 +01:00
<TextBlock Text="{Binding Faction}" FontWeight="DemiBold" Visibility="{Binding HasFaction}"/>
</StackPanel>
<Separator Visibility="Hidden" Grid.Column="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" />
2022-11-29 18:15:30 +01:00
<StackPanel Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Center">
2022-11-29 17:42:20 +01:00
<Button x:Name="AddCombatZone" Content="Add Combat Zone" Click="AddCombatZone_Click" />
</StackPanel>
</Grid>
2022-11-24 19:38:19 +01:00
<HierarchicalDataTemplate.ItemTemplate>
<HierarchicalDataTemplate>
2022-11-26 16:19:55 +01:00
<!-- This will stretch out the width of the item-->
<Grid Initialized="Transaction_Initialized"
HorizontalAlignment="Stretch"
Width="{Binding ActualWidth, ElementName=entries, Converter={StaticResource MinusFortyFiveConverter}}"
2022-12-14 19:09:59 +01:00
Margin="0,2,0,2"
2022-11-26 16:19:55 +01:00
>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto"/>
2022-11-29 18:05:08 +01:00
<ColumnDefinition Width="Auto"/>
2022-11-26 16:19:55 +01:00
</Grid.ColumnDefinitions>
2022-11-29 18:15:30 +01:00
<StackPanel Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Center">
2022-11-26 16:19:55 +01:00
<CheckBox Focusable="False" IsChecked="{Binding IsEnabled}" VerticalAlignment="Center"/>
2022-12-14 19:09:59 +01:00
<TextBlock Text="{Binding CompletedAt}" Margin="2,0,2,0" HorizontalAlignment="Right" TextAlignment="Center"/>
2022-11-26 16:19:55 +01:00
<TextBlock Text="{Binding Name}" FontWeight="DemiBold" TextAlignment="Center"/>
</StackPanel>
2022-11-26 17:09:01 +01:00
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right" x:Name="CombatZone" Visibility="{Binding IsCombatZone}">
2022-12-03 11:24:44 +01:00
<Expander Header="Optional Objectives" Visibility="{Binding IsShipCombatZone}">
2022-11-29 18:15:30 +01:00
<StackPanel Orientation="Vertical">
2022-12-03 11:24:44 +01:00
<ToggleButton x:Name="CapitalShip" Margin="2,0,2,0" Content="Capital Ship" IsChecked="{Binding HasCapitalShip, Mode=TwoWay}" IsThreeState="False"/>
<ToggleButton x:Name="Captain" Margin="2,0,2,0" Content="Captain" IsChecked="{Binding HasCaptain, Mode=TwoWay}" IsThreeState="False"/>
<ToggleButton x:Name="Correspondent" Margin="2,0,2,0" Content="Correspondent" IsChecked="{Binding HasCorrespondent, Mode=TwoWay}" IsThreeState="False"/>
<ToggleButton x:Name="SpecOps" Margin="2,0,2,0" Content="Spec Ops" IsChecked="{Binding HasSpecOps, Mode=TwoWay}" IsThreeState="False"/>
2022-11-29 18:15:30 +01:00
</StackPanel>
</Expander>
<Expander Header="Difficulty">
<StackPanel Orientation="Vertical">
<Button x:Name="Low" Content="Low" Click="Low_Click"/>
<Button x:Name="Med" Content="Med" Click="Med_Click"/>
<Button x:Name="High" Content="High" Click="High_Click"/>
2022-12-03 20:42:38 +01:00
<Button x:Name="VeryHigh" Content="Very High" Click="VeryHigh_Click" />
2022-11-29 18:15:30 +01:00
</StackPanel>
</Expander>
<Expander Header="Type">
<StackPanel Orientation="Vertical">
<Button Content="Ground" x:Name="Ground" Click="Ground_Click"/>
<Button Content="Ship" x:Name="Ship" Click="Ship_Click"/>
2022-12-03 20:42:38 +01:00
<Button Content="AX" x:Name="Thargoid" Click="Thargoid_Click"/>
2022-11-29 18:15:30 +01:00
</StackPanel>
</Expander>
2022-11-26 16:19:55 +01:00
</StackPanel>
2022-11-26 17:09:01 +01:00
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right" x:Name="SellCargo" Visibility="{Binding IsSellCargo}">
<TextBlock Text="Adjust Profit: " TextAlignment="Center" />
2022-11-29 18:05:08 +01:00
<TextBox x:Name="Profit" MinWidth="80" HorizontalContentAlignment="Right" Text="{Binding Profit, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" LostFocus="Profit_LostFocus" KeyUp="Profit_KeyUp"/>
2022-11-26 17:09:01 +01:00
</StackPanel>
2022-11-26 16:19:55 +01:00
</Grid>
2022-11-24 19:38:19 +01:00
</HierarchicalDataTemplate>
</HierarchicalDataTemplate.ItemTemplate>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
<TreeView.ItemContainerStyle>
<Style TargetType="TreeViewItem">
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
</Style>
</TreeView.ItemContainerStyle>
</TreeView>
2022-12-14 18:53:03 +01:00
<GridSplitter Background="LightSkyBlue" Grid.Row="3" Height="5" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.ColumnSpan="3" ResizeBehavior="PreviousAndNext"/>
2022-12-14 18:17:25 +01:00
<TextBox x:Name="DiscordLog" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="4" Height="Auto" TextWrapping="Wrap" FontFamily="Consolas" FontSize="14" Grid.ColumnSpan="3" AcceptsReturn="True" AcceptsTab="True"/>
2022-11-24 19:38:19 +01:00
</Grid>
</TabItem>
<TabItem Header="Settings" HorizontalAlignment="Left" Height="20" VerticalAlignment="Top" Width="53.7142857142857">
<Grid Background="#FFE5E5E5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<GroupBox Header="Location of Player Journal" Height="Auto" Grid.Row="0" VerticalAlignment="Top" Width="Auto" Grid.ColumnSpan="3" Margin="0,0,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Content="Location on disk for the player journal. There is usually no need to change this setting." Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.08,0.496"/>
<TextBox x:Name="journallocation" IsReadOnly="true" Text="" Grid.Row="1" Grid.Column="0" Margin="5,0,5,10" TextWrapping="Wrap" />
<Button x:Name="browsejournallocation" Content="Browse" Grid.Row="1" Grid.Column="1" Margin="0,0,0,0" Width="Auto" VerticalAlignment="Top" HorizontalAlignment="Left" Click="browsejournallocation_Click"/>
</Grid>
</GroupBox>
</Grid>
</TabItem>
<TabItem Header="Event Log" HorizontalAlignment="Left" Height="20" VerticalAlignment="Top">
<Grid Background="#FFE5E5E5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBox IsReadOnly="True" Grid.Row="1" x:Name="log" Height="Auto" Margin="5" TextWrapping="Wrap" FontFamily="Courier New" Background="{x:Null}"/>
<RichTextBox IsReadOnly="True" HorizontalAlignment="Left" Height="Auto" Margin="5" Width="Auto" VerticalContentAlignment="Stretch" VerticalAlignment="Top" Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}">
<FlowDocument>
<Paragraph>
<Run Text="This tool does not recognise every option and/or configuration that E:D outputs through its JSON files."/>
</Paragraph>
<Paragraph>
<Run Text="Within this log you will find error messages that are of interest to the author (CMDR Hekateh). If something appears here please send it to me via Discord."/>
</Paragraph>
</FlowDocument>
</RichTextBox>
</Grid>
</TabItem>
</TabControl>
</Grid>
</Window>