Files
Orbis-Suite-3.0/Windows/OrbisPeeknPoke/MainWindow.xaml
T

312 lines
14 KiB
XML

<simpleControls:SimpleWindow x:Class="OrbisPeeknPoke.MainWindow"
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:OrbisPeeknPoke"
xmlns:simpleControls="clr-namespace:SimpleUI.Controls;assembly=SimpleUI"
xmlns:controls="clr-namespace:OrbisPeeknPoke.Controls"
xmlns:hv="clr-namespace:Be.Windows.Forms;assembly=Be.Windows.Forms.HexBox"
mc:Ignorable="d"
Title="Peek n' Poke"
Height="660" Width="837"
MinHeight="660" MinWidth="837"
MaxHeight="660" MaxWidth="837">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="80"/>
<RowDefinition/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<!-- Menu BG -->
<Rectangle Grid.Column="0"
Fill="{DynamicResource WindowBar}" Grid.ColumnSpan="2"/>
<!-- Separation bar -->
<Rectangle Grid.Column="0"
Height="0.6" VerticalAlignment="Top"
Fill="{DynamicResource WindowBackground}" Grid.ColumnSpan="2"/>
<!-- Separation bar Main Top -->
<Rectangle Grid.Column="0"
Height="1" VerticalAlignment="Bottom"
Fill="{DynamicResource WindowBackground}" Grid.ColumnSpan="2"/>
<!-- Current Target -->
<controls:CurrentTargetDisplay VerticalAlignment="Center" Grid.ColumnSpan="2"/>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Right" Grid.ColumnSpan="2">
<!-- Current Debugging Process -->
<StackPanel HorizontalAlignment="Right"
Margin="0 6 6 6">
<simpleControls:SimpleTextField Name="CurrentDebuggingProccess"
FieldName="Currently Debugging"
FieldText="N/A"
VerticalContentAlignment="Center"
Width="180"/>
<Grid Margin="0 6 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<controls:ImageButton x:Name="AttachProcess"
Grid.Column="0"
Width="25"
Height="25"
ToolTip="Attach to new process"
ImageSource="/OrbisPeeknPoke;component/Images/Attached.png"
ImageMargin="1"
Click="AttachProcess_Click"/>
<controls:ImageButton x:Name="DetachProcess"
Grid.Column="2"
Width="25"
Height="25"
ToolTip="Detach the current attached process"
ImageSource="/OrbisPeeknPoke;component/Images/Detached.png"
ImageMargin="2"
Click="DetachProcess_Click"/>
<controls:ImageButton x:Name="LoadSomething"
Grid.Column="4"
Width="25"
Height="25"
ToolTip="Browse for something to load from local machine"
ImageSource="/OrbisPeeknPoke;component/Images/Send.png"
ImageMargin="5"
Click="LoadSomething_Click"/>
<controls:ImageButton x:Name="KillProcess"
Grid.Column="6"
Width="25"
Height="25"
ToolTip="Kills the currently attached process"
ImageSource="/OrbisPeeknPoke;component/Images/KillProcess.png"
ImageMargin="1"
Click="KillProcess_Click"/>
<controls:ImageButton x:Name="RestartTarget"
Grid.Column="8"
Width="25"
Height="25"
ToolTip="Restart the Target"
ImageSource="/OrbisPeeknPoke;component/Images/Restart.png"
ImageMargin="0"
Click="RestartTarget_Click"/>
<controls:ImageButton x:Name="ShutdownTarget"
Grid.Column="10"
Width="25"
Height="25"
ToolTip="Shutdown the Target"
ImageSource="/OrbisPeeknPoke;component/Images/Shutdown.png"
ImageMargin="0"
Click="ShutdownTarget_Click"/>
</Grid>
</StackPanel>
</StackPanel>
<!-- Main View -->
<WindowsFormsHost Grid.Row="1"
Height="Auto" Width="625"
HorizontalAlignment="Left"
x:Name="FormsHost">
<hv:HexBox x:Name="HexBox"
StringViewVisible="True"
UseFixedBytesPerLine="True"
VScrollBarVisible="false"
LineInfoVisible="True"
ColumnInfoVisible="True"
GroupSeparatorVisible="false"
InfoForeColor="186, 105, 105"
ForeColor="220, 220, 220"
BackColor="60, 63, 65"
ChangedForeColor="186, 105, 105"
SelectionBackColor="100, 176, 75, 75"
SelectionForeColor="Gainsboro"
ShadowSelectionColor="100, 176, 75, 75"
BorderStyle="None"
MouseDown="HexBox_MouseDown"/>
<WindowsFormsHost.ContextMenu>
<ContextMenu>
<MenuItem Name="FollowPointer" Header="Follow Pointer" Click="FollowPointer_Click"/>
<MenuItem Name="ReturnPointer" Header="Return" Click="ReturnPointer_Click" IsEnabled="False"/>
<Separator/>
<MenuItem Name="CopyHex" Header="Copy Hex" Click="CopyHex_Click"/>
<MenuItem Name="PasteHex" Header="Paste Hex" Click="PasteHex_Click"/>
<Separator/>
<MenuItem Name="CopyText" Header="Copy Text" Click="CopyText_Click"/>
<MenuItem Name="PasteText" Header="Paste Text" Click="PasteText_Click"/>
<Separator/>
<MenuItem Name="SelectAll" Header="Select All" Click="SelectAll_Click"/>
</ContextMenu>
</WindowsFormsHost.ContextMenu>
</WindowsFormsHost>
<!-- Control Area -->
<Grid Grid.Row="1" HorizontalAlignment="Right">
<!-- Background -->
<Border
HorizontalAlignment="Right"
Width="192"
Background="{DynamicResource WindowBar}"/>
<StackPanel Orientation="Vertical"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Margin="0 6 0 0">
<!-- Base Address -->
<StackPanel Orientation="Horizontal"
>
<simpleControls:SimpleTextField
Name="BaseAddress"
FieldName="Base Address"
FieldText=""
IsReadOnly="False"
VerticalContentAlignment="Center"
Width="143"
Margin="6 0 6 6"/>
<simpleControls:SimpleButton
Name="SelectBase"
Content="Get"
Width="31"
Height="31"
Margin="0 0 6 6"
Click="SelectBase_Click"/>
</StackPanel>
<!-- Offset / Len -->
<StackPanel Orientation="Horizontal">
<simpleControls:SimpleTextField Grid.Column="0"
Name="Offset"
FieldName="Offset"
FieldText=""
IsReadOnly="False"
Margin="6 0 6 6"
VerticalContentAlignment="Center"
Width="87"/>
<simpleControls:SimpleTextField Grid.Column="0"
Name="Length"
FieldName="Length"
FieldText="0x200"
IsReadOnly="False"
Margin="0 0 0 6"
VerticalContentAlignment="Center"
Width="87"/>
</StackPanel>
<!-- Peek / Poke -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<simpleControls:SimpleButton Name="Peek"
Content="Peek"
Width="52"
Height="25"
Margin="0 0 6 0"
Click="Peek_Click"/>
<simpleControls:SimpleButton Name="Poke"
Content="Poke"
Width="52"
Height="25"
Margin="0 0 6 0"
Click="Poke_Click"/>
</StackPanel>
</StackPanel>
</Grid>
<!-- Info BG -->
<Rectangle Grid.Row="2"
Fill="{DynamicResource WindowBar}"/>
<!-- Info -->
<StackPanel Orientation="Horizontal"
Grid.Row="2"
Margin="10 0 0 0"
VerticalAlignment="Center">
<!-- Address -->
<StackPanel Orientation="Horizontal">
<TextBlock
Foreground="{DynamicResource Text}"
FontSize="13"
FontWeight="Bold"
Text="Address: ">
</TextBlock>
<TextBlock
Foreground="{DynamicResource Text}"
FontSize="13"
Margin="0 0 10 0"
Text="0x0">
</TextBlock>
</StackPanel>
<!-- Offset -->
<StackPanel Orientation="Horizontal">
<TextBlock
Foreground="{DynamicResource Text}"
FontSize="13"
FontWeight="Bold"
Text="Offset: ">
</TextBlock>
<TextBlock
x:Name="OffsetValue"
Foreground="{DynamicResource Text}"
FontSize="13"
Margin="0 0 10 0"
Text="0x0">
</TextBlock>
</StackPanel>
<!-- Slection -->
<!-- Length -->
</StackPanel>
<!-- Separation bar Main Bottom -->
<Rectangle Grid.Column="0"
Grid.Row="2"
Height="1" VerticalAlignment="Top"
Fill="{DynamicResource WindowBackground}" Grid.ColumnSpan="2"/>
</Grid>
</simpleControls:SimpleWindow>