Первая бетка
This commit is contained in:
@@ -0,0 +1,125 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.IO;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace TracePad
|
||||||
|
{
|
||||||
|
public class MainView : INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
private ObservableCollection<Step> _steps;
|
||||||
|
private Step _currentStep;
|
||||||
|
|
||||||
|
public ObservableCollection<Step> Steps
|
||||||
|
{
|
||||||
|
get => _steps;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_steps = value;
|
||||||
|
OnPropertyChanged(nameof(Steps));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Step CurrentStep
|
||||||
|
{
|
||||||
|
get => _currentStep;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_currentStep = value;
|
||||||
|
OnPropertyChanged(nameof(CurrentStep));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainView()
|
||||||
|
{
|
||||||
|
Steps = new ObservableCollection<Step>();
|
||||||
|
// Создает начальный шаг
|
||||||
|
CurrentStep = new Step();
|
||||||
|
Steps.Add(CurrentStep);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveSession()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||||
|
string fullPath = Path.Combine(desktopPath, "session.json");
|
||||||
|
string json = JsonSerializer.Serialize(this.Steps, new JsonSerializerOptions { WriteIndented = true });
|
||||||
|
File.WriteAllText(fullPath, json);
|
||||||
|
MessageBox.Show("Сессия успешно сохранена на Рабочий стол!", "Успех", MessageBoxButton.OK);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"Не удалось сохранить файл: {ex.Message}", "Ошибка", MessageBoxButton.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadSession()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||||
|
string fullPath = Path.Combine(desktopPath, "session.json");
|
||||||
|
|
||||||
|
if (!File.Exists(fullPath))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Файл 'session.json' не найден на Рабочем столе!", "Файл отсутствует", MessageBoxButton.OK);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string json = File.ReadAllText(fullPath);
|
||||||
|
var loadedSteps = JsonSerializer.Deserialize<ObservableCollection<Step>>(json);
|
||||||
|
|
||||||
|
if (loadedSteps != null)
|
||||||
|
{
|
||||||
|
this.Steps.Clear();
|
||||||
|
foreach (var step in loadedSteps)
|
||||||
|
{
|
||||||
|
this.Steps.Add(step);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.Steps.Count > 0)
|
||||||
|
{
|
||||||
|
this.CurrentStep = this.Steps[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.Show("Сессия успешно загружена!", "Успех", MessageBoxButton.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"Ошибка при загрузке или чтении JSON: {ex.Message}", "Ошибка", MessageBoxButton.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void CreateNextStep()
|
||||||
|
{
|
||||||
|
var newStep = new Step();
|
||||||
|
Steps.Add(newStep);
|
||||||
|
CurrentStep = newStep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteStep()
|
||||||
|
{
|
||||||
|
if (CurrentStep != null && Steps.Count > 1)
|
||||||
|
{
|
||||||
|
var index = Steps.IndexOf(CurrentStep);
|
||||||
|
Steps.Remove(CurrentStep);
|
||||||
|
|
||||||
|
if (index < Steps.Count)
|
||||||
|
CurrentStep = Steps[index];
|
||||||
|
else if (Steps.Count > 0)
|
||||||
|
CurrentStep = Steps[Steps.Count - 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
protected void OnPropertyChanged(string propertyName)
|
||||||
|
{
|
||||||
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+382
-389
@@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:TracePad"
|
xmlns:local="clr-namespace:TracePad"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="MainWindow" Height="800" Width="600">
|
Title="MainWindow" Height="800" Width="800">
|
||||||
|
|
||||||
<!-- Отключение системного заголовка -->
|
<!-- Отключение системного заголовка -->
|
||||||
<WindowChrome.WindowChrome>
|
<WindowChrome.WindowChrome>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Кастомная Шапка -->
|
<!-- Кастомная Шапка -->
|
||||||
<Border Grid.Row = "0" Background="#888888" BorderBrush="Black" BorderThickness="3,3,3,0">
|
<Border Grid.Row="0" Background="#888888" BorderBrush="Black" BorderThickness="3,3,3,0">
|
||||||
<DockPanel LastChildFill="False">
|
<DockPanel LastChildFill="False">
|
||||||
<TextBlock Text="TracePad"
|
<TextBlock Text="TracePad"
|
||||||
FontFamily="Segoe UI"
|
FontFamily="Segoe UI"
|
||||||
@@ -52,399 +52,392 @@
|
|||||||
|
|
||||||
<!-- Основная часть (Регистры) -->
|
<!-- Основная часть (Регистры) -->
|
||||||
<Border Grid.Row="1" BorderBrush="Black" BorderThickness="3" Background="#DDDDDD">
|
<Border Grid.Row="1" BorderBrush="Black" BorderThickness="3" Background="#DDDDDD">
|
||||||
<StackPanel Margin="15">
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
|
<Grid Margin="15">
|
||||||
<!-- Таблица основных регистров (RAX, RBX, RCX, RDX) -->
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<!-- Rxx -->
|
<!-- Левая колонка - регистры -->
|
||||||
<ColumnDefinition Width="40"/>
|
|
||||||
<ColumnDefinition Width="90"/>
|
|
||||||
<!-- Exx -->
|
|
||||||
<ColumnDefinition Width="40"/>
|
|
||||||
<ColumnDefinition Width="70"/>
|
|
||||||
<!-- xx -->
|
|
||||||
<ColumnDefinition Width="35"/>
|
|
||||||
<ColumnDefinition Width="60"/>
|
|
||||||
<!-- xH -->
|
|
||||||
<ColumnDefinition Width="35"/>
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
<!-- xL -->
|
|
||||||
<ColumnDefinition Width="35"/>
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<!-- Ваши оригинальные стили -->
|
|
||||||
<Grid.Resources>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="FontFamily" Value="Consolas"/>
|
|
||||||
<Setter Property="FontSize" Value="13"/>
|
|
||||||
<Setter Property="FontWeight" Value="Bold"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
|
||||||
<Setter Property="Margin" Value="0,0,5,0"/>
|
|
||||||
</Style>
|
|
||||||
<Style TargetType="TextBox">
|
|
||||||
<Setter Property="FontFamily" Value="Consolas"/>
|
|
||||||
<Setter Property="Height" Value="24"/>
|
|
||||||
<Setter Property="Margin" Value="0,4,0,4"/>
|
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
||||||
<Setter Property="Background" Value="#F5F5F5"/>
|
|
||||||
</Style>
|
|
||||||
</Grid.Resources>
|
|
||||||
|
|
||||||
<!-- Строка 1: RAX -->
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="RAX"/>
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" x:Name="RAX"/>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="EAX"/>
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="3" x:Name="EAX"/>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="4" Text="AX"/>
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="5" x:Name="AX"/>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="6" Text="AH"/>
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="7" x:Name="AH"/>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="8" Text="AL"/>
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="9" x:Name="AL"/>
|
|
||||||
|
|
||||||
<!-- Строка 2: RBX -->
|
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="RBX"/>
|
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" x:Name="RBX"/>
|
|
||||||
<TextBlock Grid.Row="1" Grid.Column="2" Text="EBX"/>
|
|
||||||
<TextBox Grid.Row="1" Grid.Column="3" x:Name="EBX"/>
|
|
||||||
<TextBlock Grid.Row="1" Grid.Column="4" Text="BX"/>
|
|
||||||
<TextBox Grid.Row="1" Grid.Column="5" x:Name="BX"/>
|
|
||||||
<TextBlock Grid.Row="1" Grid.Column="6" Text="BH"/>
|
|
||||||
<TextBox Grid.Row="1" Grid.Column="7" x:Name="BH"/>
|
|
||||||
<TextBlock Grid.Row="1" Grid.Column="8" Text="BL"/>
|
|
||||||
<TextBox Grid.Row="1" Grid.Column="9" x:Name="BL"/>
|
|
||||||
|
|
||||||
<!-- Строка 3: RCX -->
|
|
||||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="RCX"/>
|
|
||||||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="RCX"/>
|
|
||||||
<TextBlock Grid.Row="2" Grid.Column="2" Text="ECX"/>
|
|
||||||
<TextBox Grid.Row="2" Grid.Column="3" x:Name="ECX"/>
|
|
||||||
<TextBlock Grid.Row="2" Grid.Column="4" Text="CX"/>
|
|
||||||
<TextBox Grid.Row="2" Grid.Column="5" x:Name="CX"/>
|
|
||||||
<TextBlock Grid.Row="2" Grid.Column="6" Text="CH"/>
|
|
||||||
<TextBox Grid.Row="2" Grid.Column="7" x:Name="CH"/>
|
|
||||||
<TextBlock Grid.Row="2" Grid.Column="8" Text="CL"/>
|
|
||||||
<TextBox Grid.Row="2" Grid.Column="9" x:Name="CL"/>
|
|
||||||
|
|
||||||
<!-- Строка 4: RDX -->
|
|
||||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="RDX"/>
|
|
||||||
<TextBox Grid.Row="3" Grid.Column="1" x:Name="RDX"/>
|
|
||||||
<TextBlock Grid.Row="3" Grid.Column="2" Text="EDX"/>
|
|
||||||
<TextBox Grid.Row="3" Grid.Column="3" x:Name="EDX"/>
|
|
||||||
<TextBlock Grid.Row="3" Grid.Column="4" Text="DX"/>
|
|
||||||
<TextBox Grid.Row="3" Grid.Column="5" x:Name="DX"/>
|
|
||||||
<TextBlock Grid.Row="3" Grid.Column="6" Text="DH"/>
|
|
||||||
<TextBox Grid.Row="3" Grid.Column="7" x:Name="DH"/>
|
|
||||||
<TextBlock Grid.Row="3" Grid.Column="8" Text="DL"/>
|
|
||||||
<TextBox Grid.Row="3" Grid.Column="9" x:Name="DL"/>
|
|
||||||
|
|
||||||
<!-- Строка 5: R8 -->
|
|
||||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="R8"/>
|
|
||||||
<TextBox Grid.Row="4" Grid.Column="1" x:Name="R8"/>
|
|
||||||
<TextBlock Grid.Row="4" Grid.Column="2" Text="R8D"/>
|
|
||||||
<TextBox Grid.Row="4" Grid.Column="3" x:Name="R8D"/>
|
|
||||||
<TextBlock Grid.Row="4" Grid.Column="4" Text="R8W"/>
|
|
||||||
<TextBox Grid.Row="4" Grid.Column="5" x:Name="R8W"/>
|
|
||||||
<TextBlock Grid.Row="4" Grid.Column="6" Text="R8B"/>
|
|
||||||
<TextBox Grid.Row="4" Grid.Column="7" Grid.ColumnSpan="3" x:Name="R8B"/>
|
|
||||||
|
|
||||||
<!-- Строка 6: R9 -->
|
|
||||||
<TextBlock Grid.Row="5" Grid.Column="0" Text="R9"/>
|
|
||||||
<TextBox Grid.Row="5" Grid.Column="1" x:Name="R9"/>
|
|
||||||
<TextBlock Grid.Row="5" Grid.Column="2" Text="R9D"/>
|
|
||||||
<TextBox Grid.Row="5" Grid.Column="3" x:Name="R9D"/>
|
|
||||||
<TextBlock Grid.Row="5" Grid.Column="4" Text="R9W"/>
|
|
||||||
<TextBox Grid.Row="5" Grid.Column="5" x:Name="R9W"/>
|
|
||||||
<TextBlock Grid.Row="5" Grid.Column="6" Text="R9B"/>
|
|
||||||
<TextBox Grid.Row="5" Grid.Column="7" Grid.ColumnSpan="3" x:Name="R9B"/>
|
|
||||||
|
|
||||||
<!-- Строка 7: R10 -->
|
|
||||||
<TextBlock Grid.Row="6" Grid.Column="0" Text="R10"/>
|
|
||||||
<TextBox Grid.Row="6" Grid.Column="1" x:Name="R10"/>
|
|
||||||
<TextBlock Grid.Row="6" Grid.Column="2" Text="R10D"/>
|
|
||||||
<TextBox Grid.Row="6" Grid.Column="3" x:Name="R10D"/>
|
|
||||||
<TextBlock Grid.Row="6" Grid.Column="4" Text="R10W"/>
|
|
||||||
<TextBox Grid.Row="6" Grid.Column="5" x:Name="R10W"/>
|
|
||||||
<TextBlock Grid.Row="6" Grid.Column="6" Text="R10B"/>
|
|
||||||
<TextBox Grid.Row="6" Grid.Column="7" Grid.ColumnSpan="3" x:Name="R10B"/>
|
|
||||||
|
|
||||||
<!-- Строка 8: R11 -->
|
|
||||||
<TextBlock Grid.Row="7" Grid.Column="0" Text="R11"/>
|
|
||||||
<TextBox Grid.Row="7" Grid.Column="1" x:Name="R11"/>
|
|
||||||
<TextBlock Grid.Row="7" Grid.Column="2" Text="R11D"/>
|
|
||||||
<TextBox Grid.Row="7" Grid.Column="3" x:Name="R11D"/>
|
|
||||||
<TextBlock Grid.Row="7" Grid.Column="4" Text="R11W"/>
|
|
||||||
<TextBox Grid.Row="7" Grid.Column="5" x:Name="R11W"/>
|
|
||||||
<TextBlock Grid.Row="7" Grid.Column="6" Text="R11B"/>
|
|
||||||
<TextBox Grid.Row="7" Grid.Column="7" Grid.ColumnSpan="3" x:Name="R11B"/>
|
|
||||||
|
|
||||||
<!-- Строка 9: R12 -->
|
|
||||||
<TextBlock Grid.Row="8" Grid.Column="0" Text="R12"/>
|
|
||||||
<TextBox Grid.Row="8" Grid.Column="1" x:Name="R12"/>
|
|
||||||
<TextBlock Grid.Row="8" Grid.Column="2" Text="R12D"/>
|
|
||||||
<TextBox Grid.Row="8" Grid.Column="3" x:Name="R12D"/>
|
|
||||||
<TextBlock Grid.Row="8" Grid.Column="4" Text="R12W"/>
|
|
||||||
<TextBox Grid.Row="8" Grid.Column="5" x:Name="R12W"/>
|
|
||||||
<TextBlock Grid.Row="8" Grid.Column="6" Text="R12B"/>
|
|
||||||
<TextBox Grid.Row="8" Grid.Column="7" Grid.ColumnSpan="3" x:Name="R12B"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Разделитель (отступ перед системными регистрами) -->
|
|
||||||
<Separator Height="20" Background="Transparent"/>
|
|
||||||
|
|
||||||
<!-- Указатели (RSP, RBP, RIP) -->
|
|
||||||
<Grid HorizontalAlignment="Left">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="40"/>
|
|
||||||
<ColumnDefinition Width="150"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Grid.Resources>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="FontFamily" Value="Consolas"/>
|
|
||||||
<Setter Property="FontSize" Value="13"/>
|
|
||||||
<Setter Property="FontWeight" Value="Bold"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
|
||||||
<Setter Property="Margin" Value="0,0,5,0"/>
|
|
||||||
</Style>
|
|
||||||
<Style TargetType="TextBox">
|
|
||||||
<Setter Property="FontFamily" Value="Consolas"/>
|
|
||||||
<Setter Property="Height" Value="24"/>
|
|
||||||
<Setter Property="Margin" Value="0,4,0,4"/>
|
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
||||||
<Setter Property="Background" Value="#F5F5F5"/>
|
|
||||||
</Style>
|
|
||||||
</Grid.Resources>
|
|
||||||
|
|
||||||
<!-- RSP -->
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="RSP"/>
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" x:Name="RSP"/>
|
|
||||||
|
|
||||||
<!-- RBP -->
|
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="RBP"/>
|
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" x:Name="RBP"/>
|
|
||||||
|
|
||||||
<!-- RIP -->
|
|
||||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="RIP"/>
|
|
||||||
<TextBox Grid.Row="2" Grid.Column="1" x:Name="RIP"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Разделитель -->
|
|
||||||
<Separator Height="20" Background="Transparent"/>
|
|
||||||
|
|
||||||
<!-- Флаги (Flags) -->
|
|
||||||
<!-- Первая группа флагов (CF, PF, AF, ZF, SF) -->
|
|
||||||
<Grid Margin="0,10,0,0" HorizontalAlignment="Left">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<!-- Строка 0: Текст, Строка 1: Чекбокс -->
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<!-- По одной колонке фиксированной ширины на каждый флаг -->
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
<!-- CF -->
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
<!-- PF -->
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
<!-- AF -->
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
<!-- ZF -->
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
<!-- SF -->
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Grid.Resources>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="FontFamily" Value="Consolas"/>
|
|
||||||
<Setter Property="FontSize" Value="13"/>
|
|
||||||
<Setter Property="FontWeight" Value="Bold"/>
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="Margin" Value="0,0,0,4"/>
|
|
||||||
</Style>
|
|
||||||
<Style TargetType="CheckBox">
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="Margin" Value="0,2,0,4"/>
|
|
||||||
</Style>
|
|
||||||
</Grid.Resources>
|
|
||||||
|
|
||||||
<!-- Строка 1: Названия -->
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="CF"/>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="PF"/>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="AF"/>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="3" Text="ZF"/>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="4" Text="SF"/>
|
|
||||||
|
|
||||||
<!-- Строка 2: Чекбоксы -->
|
|
||||||
<CheckBox Grid.Row="1" Grid.Column="0" x:Name="CF"/>
|
|
||||||
<CheckBox Grid.Row="1" Grid.Column="1" x:Name="PF"/>
|
|
||||||
<CheckBox Grid.Row="1" Grid.Column="2" x:Name="AF"/>
|
|
||||||
<CheckBox Grid.Row="1" Grid.Column="3" x:Name="ZF"/>
|
|
||||||
<CheckBox Grid.Row="1" Grid.Column="4" x:Name="SF"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Дополнительные флаги (TF, IF, DF, OF) -->
|
|
||||||
<Grid Margin="0,10,0,0" HorizontalAlignment="Left">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
<!-- TF -->
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
<!-- IF -->
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
<!-- DF -->
|
|
||||||
<ColumnDefinition Width="50"/>
|
|
||||||
<!-- OF -->
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Grid.Resources>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="FontFamily" Value="Consolas"/>
|
|
||||||
<Setter Property="FontSize" Value="13"/>
|
|
||||||
<Setter Property="FontWeight" Value="Bold"/>
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="Margin" Value="0,0,0,4"/>
|
|
||||||
</Style>
|
|
||||||
<Style TargetType="CheckBox">
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="Margin" Value="0,2,0,4"/>
|
|
||||||
</Style>
|
|
||||||
</Grid.Resources>
|
|
||||||
|
|
||||||
<!-- Строка 1: Названия -->
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="TF"/>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="IF"/>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="DF"/>
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="3" Text="OF"/>
|
|
||||||
|
|
||||||
<!-- Строка 2: Чекбоксы -->
|
|
||||||
<CheckBox Grid.Row="1" Grid.Column="0" x:Name="TF"/>
|
|
||||||
<CheckBox Grid.Row="1" Grid.Column="1" x:Name="IF"/>
|
|
||||||
<CheckBox Grid.Row="1" Grid.Column="2" x:Name="DF"/>
|
|
||||||
<CheckBox Grid.Row="1" Grid.Column="3" x:Name="OF"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Разделитель -->
|
|
||||||
<Separator Height="20" Background="Transparent"/>
|
|
||||||
|
|
||||||
<!-- Комментарий к шагу -->
|
|
||||||
<Grid>
|
|
||||||
<!-- Стили -->
|
|
||||||
<Grid.Resources>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Setter Property="FontFamily" Value="Consolas"/>
|
|
||||||
<Setter Property="FontSize" Value="13"/>
|
|
||||||
<Setter Property="FontWeight" Value="Bold"/>
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
</Style>
|
|
||||||
</Grid.Resources>
|
|
||||||
|
|
||||||
<!-- Строки -->
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="20"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!-- Колонны -->
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="100"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
|
<!-- Правая колонка - история шагов -->
|
||||||
|
<ColumnDefinition Width="250"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Комментарий"/>
|
<!-- Левая колонка: Регистры -->
|
||||||
|
<StackPanel Grid.Column="0">
|
||||||
|
<!-- Таблица основных регистров (RAX, RBX, RCX, RDX) -->
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<!-- Rxx -->
|
||||||
|
<ColumnDefinition Width="40"/>
|
||||||
|
<ColumnDefinition Width="90"/>
|
||||||
|
<!-- Exx -->
|
||||||
|
<ColumnDefinition Width="40"/>
|
||||||
|
<ColumnDefinition Width="70"/>
|
||||||
|
<!-- xx -->
|
||||||
|
<ColumnDefinition Width="35"/>
|
||||||
|
<ColumnDefinition Width="60"/>
|
||||||
|
<!-- xH -->
|
||||||
|
<ColumnDefinition Width="35"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
<!-- xL -->
|
||||||
|
<ColumnDefinition Width="35"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Background="Transparent" x:Name="Comment"/>
|
<Grid.Resources>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="FontFamily" Value="Consolas"/>
|
||||||
|
<Setter Property="FontSize" Value="13"/>
|
||||||
|
<Setter Property="FontWeight" Value="Bold"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||||
|
<Setter Property="Margin" Value="0,0,5,0"/>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="TextBox">
|
||||||
|
<Setter Property="FontFamily" Value="Consolas"/>
|
||||||
|
<Setter Property="Height" Value="24"/>
|
||||||
|
<Setter Property="Margin" Value="0,4,0,4"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Background" Value="#F5F5F5"/>
|
||||||
|
<Setter Property="Text" Value="{Binding CurrentStep.RAX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</Style>
|
||||||
|
</Grid.Resources>
|
||||||
|
|
||||||
|
<!-- Строка 1: RAX -->
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="RAX"/>
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" x:Name="txt_RAX"/>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="2" Text="EAX"/>
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="3" x:Name="txt_EAX" Text="{Binding CurrentStep.EAX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="4" Text="AX"/>
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="5" x:Name="txt_AX" Text="{Binding CurrentStep.AX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="6" Text="AH"/>
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="7" x:Name="txt_AH" Text="{Binding CurrentStep.AH, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="8" Text="AL"/>
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="9" x:Name="txt_AL" Text="{Binding CurrentStep.AL, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
|
||||||
|
<!-- Строка 2: RBX -->
|
||||||
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="RBX"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" x:Name="txt_RBX" Text="{Binding CurrentStep.RBX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="1" Grid.Column="2" Text="EBX"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="3" x:Name="txt_EBX" Text="{Binding CurrentStep.EBX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="1" Grid.Column="4" Text="BX"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="5" x:Name="txt_BX" Text="{Binding CurrentStep.BX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="1" Grid.Column="6" Text="BH"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="7" x:Name="txt_BH" Text="{Binding CurrentStep.BH, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="1" Grid.Column="8" Text="BL"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="9" x:Name="txt_BL" Text="{Binding CurrentStep.BL, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
|
||||||
|
<!-- Строка 3: RCX -->
|
||||||
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="RCX"/>
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="1" x:Name="txt_RCX" Text="{Binding CurrentStep.RCX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="2" Grid.Column="2" Text="ECX"/>
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="3" x:Name="txt_ECX" Text="{Binding CurrentStep.ECX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="2" Grid.Column="4" Text="CX"/>
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="5" x:Name="txt_CX" Text="{Binding CurrentStep.CX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="2" Grid.Column="6" Text="CH"/>
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="7" x:Name="txt_CH" Text="{Binding CurrentStep.CH, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="2" Grid.Column="8" Text="CL"/>
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="9" x:Name="txt_CL" Text="{Binding CurrentStep.CL, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
|
||||||
|
<!-- Строка 4: RDX -->
|
||||||
|
<TextBlock Grid.Row="3" Grid.Column="0" Text="RDX"/>
|
||||||
|
<TextBox Grid.Row="3" Grid.Column="1" x:Name="txt_RDX" Text="{Binding CurrentStep.RDX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="3" Grid.Column="2" Text="EDX"/>
|
||||||
|
<TextBox Grid.Row="3" Grid.Column="3" x:Name="txt_EDX" Text="{Binding CurrentStep.EDX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="3" Grid.Column="4" Text="DX"/>
|
||||||
|
<TextBox Grid.Row="3" Grid.Column="5" x:Name="txt_DX" Text="{Binding CurrentStep.DX, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="3" Grid.Column="6" Text="DH"/>
|
||||||
|
<TextBox Grid.Row="3" Grid.Column="7" x:Name="txt_DH" Text="{Binding CurrentStep.DH, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="3" Grid.Column="8" Text="DL"/>
|
||||||
|
<TextBox Grid.Row="3" Grid.Column="9" x:Name="txt_DL" Text="{Binding CurrentStep.DL, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
|
||||||
|
<!-- Строка 5: R8 -->
|
||||||
|
<TextBlock Grid.Row="4" Grid.Column="0" Text="R8"/>
|
||||||
|
<TextBox Grid.Row="4" Grid.Column="1" x:Name="txt_R8" Text="{Binding CurrentStep.R8, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="4" Grid.Column="2" Text="R8D"/>
|
||||||
|
<TextBox Grid.Row="4" Grid.Column="3" x:Name="txt_R8D" Text="{Binding CurrentStep.R8D, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="4" Grid.Column="4" Text="R8W"/>
|
||||||
|
<TextBox Grid.Row="4" Grid.Column="5" x:Name="txt_R8W" Text="{Binding CurrentStep.R8W, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="4" Grid.Column="6" Text="R8B"/>
|
||||||
|
<TextBox Grid.Row="4" Grid.Column="7" Grid.ColumnSpan="3" x:Name="txt_R8B" Text="{Binding CurrentStep.R8B, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
|
||||||
|
<!-- Строка 6: R9 -->
|
||||||
|
<TextBlock Grid.Row="5" Grid.Column="0" Text="R9"/>
|
||||||
|
<TextBox Grid.Row="5" Grid.Column="1" x:Name="txt_R9" Text="{Binding CurrentStep.R9, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="5" Grid.Column="2" Text="R9D"/>
|
||||||
|
<TextBox Grid.Row="5" Grid.Column="3" x:Name="txt_R9D" Text="{Binding CurrentStep.R9D, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="5" Grid.Column="4" Text="R9W"/>
|
||||||
|
<TextBox Grid.Row="5" Grid.Column="5" x:Name="txt_R9W" Text="{Binding CurrentStep.R9W, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="5" Grid.Column="6" Text="R9B"/>
|
||||||
|
<TextBox Grid.Row="5" Grid.Column="7" Grid.ColumnSpan="3" x:Name="txt_R9B" Text="{Binding CurrentStep.R9B, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
|
||||||
|
<!-- Строка 7: R10 -->
|
||||||
|
<TextBlock Grid.Row="6" Grid.Column="0" Text="R10"/>
|
||||||
|
<TextBox Grid.Row="6" Grid.Column="1" x:Name="txt_R10" Text="{Binding CurrentStep.R10, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="6" Grid.Column="2" Text="R10D"/>
|
||||||
|
<TextBox Grid.Row="6" Grid.Column="3" x:Name="txt_R10D" Text="{Binding CurrentStep.R10D, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="6" Grid.Column="4" Text="R10W"/>
|
||||||
|
<TextBox Grid.Row="6" Grid.Column="5" x:Name="txt_R10W" Text="{Binding CurrentStep.R10W, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="6" Grid.Column="6" Text="R10B"/>
|
||||||
|
<TextBox Grid.Row="6" Grid.Column="7" Grid.ColumnSpan="3" x:Name="txt_R10B" Text="{Binding CurrentStep.R10B, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
|
||||||
|
<!-- Строка 8: R11 -->
|
||||||
|
<TextBlock Grid.Row="7" Grid.Column="0" Text="R11"/>
|
||||||
|
<TextBox Grid.Row="7" Grid.Column="1" x:Name="txt_R11" Text="{Binding CurrentStep.R11, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="7" Grid.Column="2" Text="R11D"/>
|
||||||
|
<TextBox Grid.Row="7" Grid.Column="3" x:Name="txt_R11D" Text="{Binding CurrentStep.R11D, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="7" Grid.Column="4" Text="R11W"/>
|
||||||
|
<TextBox Grid.Row="7" Grid.Column="5" x:Name="txt_R11W" Text="{Binding CurrentStep.R11W, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="7" Grid.Column="6" Text="R11B"/>
|
||||||
|
<TextBox Grid.Row="7" Grid.Column="7" Grid.ColumnSpan="3" x:Name="txt_R11B" Text="{Binding CurrentStep.R11B, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
|
||||||
|
<!-- Строка 9: R12 -->
|
||||||
|
<TextBlock Grid.Row="8" Grid.Column="0" Text="R12"/>
|
||||||
|
<TextBox Grid.Row="8" Grid.Column="1" x:Name="txt_R12" Text="{Binding CurrentStep.R12, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="8" Grid.Column="2" Text="R12D"/>
|
||||||
|
<TextBox Grid.Row="8" Grid.Column="3" x:Name="txt_R12D" Text="{Binding CurrentStep.R12D, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="8" Grid.Column="4" Text="R12W"/>
|
||||||
|
<TextBox Grid.Row="8" Grid.Column="5" x:Name="txt_R12W" Text="{Binding CurrentStep.R12W, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<TextBlock Grid.Row="8" Grid.Column="6" Text="R12B"/>
|
||||||
|
<TextBox Grid.Row="8" Grid.Column="7" Grid.ColumnSpan="3" x:Name="txt_R12B" Text="{Binding CurrentStep.R12B, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Разделитель (отступ перед системными регистрами) -->
|
||||||
|
<Separator Height="20" Background="Transparent"/>
|
||||||
|
|
||||||
|
<!-- Указатели (RSP, RBP, RIP) -->
|
||||||
|
<Grid HorizontalAlignment="Left">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="40"/>
|
||||||
|
<ColumnDefinition Width="150"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Grid.Resources>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="FontFamily" Value="Consolas"/>
|
||||||
|
<Setter Property="FontSize" Value="13"/>
|
||||||
|
<Setter Property="FontWeight" Value="Bold"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||||
|
<Setter Property="Margin" Value="0,0,5,0"/>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="TextBox">
|
||||||
|
<Setter Property="FontFamily" Value="Consolas"/>
|
||||||
|
<Setter Property="Height" Value="24"/>
|
||||||
|
<Setter Property="Margin" Value="0,4,0,4"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Background" Value="#F5F5F5"/>
|
||||||
|
</Style>
|
||||||
|
</Grid.Resources>
|
||||||
|
|
||||||
|
<!-- RSP -->
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="RSP"/>
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" x:Name="txt_RSP" Text="{Binding CurrentStep.RSP, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
|
||||||
|
<!-- RBP -->
|
||||||
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="RBP"/>
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" x:Name="txt_RBP" Text="{Binding CurrentStep.RBP, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
|
||||||
|
<!-- RIP -->
|
||||||
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="RIP"/>
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="1" x:Name="txt_RIP" Text="{Binding CurrentStep.RIP, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Разделитель -->
|
||||||
|
<Separator Height="20" Background="Transparent"/>
|
||||||
|
|
||||||
|
<!-- Флаги (Flags) -->
|
||||||
|
<!-- Первая группа флагов (CF, PF, AF, ZF, SF) -->
|
||||||
|
<Grid Margin="0,10,0,0" HorizontalAlignment="Left">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Grid.Resources>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="FontFamily" Value="Consolas"/>
|
||||||
|
<Setter Property="FontSize" Value="13"/>
|
||||||
|
<Setter Property="FontWeight" Value="Bold"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Margin" Value="0,0,0,4"/>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="CheckBox">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Margin" Value="0,2,0,4"/>
|
||||||
|
<Setter Property="IsChecked" Value="{Binding CurrentStep.CF, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</Style>
|
||||||
|
</Grid.Resources>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="CF"/>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="1" Text="PF"/>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="2" Text="AF"/>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="3" Text="ZF"/>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="4" Text="SF"/>
|
||||||
|
|
||||||
|
<CheckBox Grid.Row="1" Grid.Column="0" x:Name="chk_CF"/>
|
||||||
|
<CheckBox Grid.Row="1" Grid.Column="1" x:Name="chk_PF" IsChecked="{Binding CurrentStep.PF, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<CheckBox Grid.Row="1" Grid.Column="2" x:Name="chk_AF" IsChecked="{Binding CurrentStep.AF, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<CheckBox Grid.Row="1" Grid.Column="3" x:Name="chk_ZF" IsChecked="{Binding CurrentStep.ZF, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<CheckBox Grid.Row="1" Grid.Column="4" x:Name="chk_SF" IsChecked="{Binding CurrentStep.SF, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Дополнительные флаги (TF, IF, DF, OF) -->
|
||||||
|
<Grid Margin="0,10,0,0" HorizontalAlignment="Left">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Grid.Resources>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="FontFamily" Value="Consolas"/>
|
||||||
|
<Setter Property="FontSize" Value="13"/>
|
||||||
|
<Setter Property="FontWeight" Value="Bold"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Margin" Value="0,0,0,4"/>
|
||||||
|
</Style>
|
||||||
|
<Style TargetType="CheckBox">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Margin" Value="0,2,0,4"/>
|
||||||
|
</Style>
|
||||||
|
</Grid.Resources>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="TF"/>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="1" Text="IF"/>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="2" Text="DF"/>
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="3" Text="OF"/>
|
||||||
|
|
||||||
|
<CheckBox Grid.Row="1" Grid.Column="0" x:Name="chk_TF" IsChecked="{Binding CurrentStep.TF, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<CheckBox Grid.Row="1" Grid.Column="1" x:Name="chk_IF" IsChecked="{Binding CurrentStep.IF, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<CheckBox Grid.Row="1" Grid.Column="2" x:Name="chk_DF" IsChecked="{Binding CurrentStep.DF, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
<CheckBox Grid.Row="1" Grid.Column="3" x:Name="chk_OF" IsChecked="{Binding CurrentStep.OF, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Разделитель -->
|
||||||
|
<Separator Height="20" Background="Transparent"/>
|
||||||
|
|
||||||
|
<!-- Комментарий к шагу -->
|
||||||
|
<Grid>
|
||||||
|
<Grid.Resources>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="FontFamily" Value="Consolas"/>
|
||||||
|
<Setter Property="FontSize" Value="13"/>
|
||||||
|
<Setter Property="FontWeight" Value="Bold"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
</Grid.Resources>
|
||||||
|
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="20"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="100"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="Комментарий"/>
|
||||||
|
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" Background="Transparent" x:Name="txt_Comment" Text="{Binding CurrentStep.Comment, UpdateSourceTrigger=PropertyChanged}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Кнопки управления -->
|
||||||
|
<Grid Margin="0,20,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="10"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="10"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Grid.Column="0" Content="Открыть Json" Height="30"
|
||||||
|
FontFamily="Segoe UI" FontSize="13" FontWeight="SemiBold"
|
||||||
|
Background="#888888" Foreground="White"
|
||||||
|
BorderBrush="#666666" BorderThickness="1"
|
||||||
|
Cursor="Hand"
|
||||||
|
x:Name="OpenJsonButton"
|
||||||
|
Click="OpenJsonButton_Click"/>
|
||||||
|
|
||||||
|
<Button Grid.Column="2" Content="Создать Json" Height="30"
|
||||||
|
FontFamily="Segoe UI" FontSize="13" FontWeight="SemiBold"
|
||||||
|
Background="#888888" Foreground="White"
|
||||||
|
BorderBrush="#666666" BorderThickness="1"
|
||||||
|
Cursor="Hand"
|
||||||
|
x:Name="CreateJsonButton"
|
||||||
|
Click="CreateJsonButton_Click"/>
|
||||||
|
|
||||||
|
<Button Grid.Column="4" Content="Следующий шаг" Height="30"
|
||||||
|
FontFamily="Segoe UI" FontSize="13" FontWeight="SemiBold"
|
||||||
|
Background="#888888" Foreground="White"
|
||||||
|
BorderBrush="#666666" BorderThickness="1"
|
||||||
|
Cursor="Hand"
|
||||||
|
x:Name="NextStepButton"
|
||||||
|
Click="NextStepButton_Click"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Правая колонка: История шагов -->
|
||||||
|
<Grid Grid.Column="1" Margin="15,0,0,0">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="0" Text="История шагов:" FontFamily="Consolas" FontSize="13" FontWeight="Bold" Margin="0,0,0,5" HorizontalAlignment="Left"/>
|
||||||
|
|
||||||
|
<ListBox Grid.Row="1"
|
||||||
|
x:Name="StepsListBox"
|
||||||
|
ItemsSource="{Binding Steps}"
|
||||||
|
Background="#F5F5F5"
|
||||||
|
BorderBrush="#DCDCDC"
|
||||||
|
SelectionChanged="StepsListBox_SelectionChanged">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="2">
|
||||||
|
<TextBlock Text="▶ " FontFamily="Consolas" Foreground="Gray"/>
|
||||||
|
<TextBlock Text="{Binding Comment}" FontFamily="Consolas" MaxWidth="160" TextTrimming="CharacterEllipsis"/>
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
|
||||||
|
<Button Grid.Row="2" Content="Удалить шаг" FontFamily="Consolas" Margin="0,8,0,4" Height="30" Click="DeleteStepButton_Click"/>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
<!-- Разделитель -->
|
|
||||||
<Separator Height="20" Background="Transparent"/>
|
|
||||||
|
|
||||||
<!-- Панель для списка шагов -->
|
|
||||||
<Grid Grid.Column="1" Margin="15,10,15,10">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
<RowDefinition Height="Auto"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<TextBlock Grid.Row="0" Text="История шагов:" FontFamily="Consolas" FontSize="13" FontWeight="Bold" Margin="0,0,0,5" HorizontalAlignment="Left"/>
|
|
||||||
|
|
||||||
<ListBox Grid.Row="1" ItemsSource="{Binding Steps}" SelectedItem="{Binding CurrentStep}" Background="#F5F5F5" BorderBrush="#DCDCDC">
|
|
||||||
<ListBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="2">
|
|
||||||
<TextBlock Text="▶ " FontFamily="Consolas" Foreground="Gray"/>
|
|
||||||
<TextBlock Text="{Binding Comment}" FontFamily="Consolas" MaxWidth="160" TextTrimming="CharacterEllipsis"/>
|
|
||||||
</StackPanel>
|
|
||||||
</DataTemplate>
|
|
||||||
</ListBox.ItemTemplate>
|
|
||||||
</ListBox>
|
|
||||||
|
|
||||||
<Button Grid.Row="2" Content="Удалить шаг" FontFamily="Consolas" Margin="0,8,0,4" Height="30" Click="DeleteStep_Click"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!-- Кнопки управления -->
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="10"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="10"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Button Grid.Column="0" Content="Открыть Json" Height="30"
|
|
||||||
FontFamily="Segoe UI" FontSize="13" FontWeight="SemiBold"
|
|
||||||
Background="#888888" Foreground="White"
|
|
||||||
BorderBrush="#666666" BorderThickness="1"
|
|
||||||
Cursor="Hand"
|
|
||||||
x:Name="OpenJsonButton"/>
|
|
||||||
|
|
||||||
<Button Grid.Column="2" Content="Создать Json" Height="30"
|
|
||||||
FontFamily="Segoe UI" FontSize="13" FontWeight="SemiBold"
|
|
||||||
Background="#888888" Foreground="White"
|
|
||||||
BorderBrush="#666666" BorderThickness="1"
|
|
||||||
Cursor="Hand"
|
|
||||||
x:Name="CreateJsonButton"/>
|
|
||||||
|
|
||||||
<Button Grid.Column="4" Content="Следующий шаг" Height="30"
|
|
||||||
FontFamily="Segoe UI" FontSize="13" FontWeight="SemiBold"
|
|
||||||
Background="#888888" Foreground="White"
|
|
||||||
BorderBrush="#666666" BorderThickness="1"
|
|
||||||
Cursor="Hand"
|
|
||||||
Click="ExitButtonClick"
|
|
||||||
x:Name="NextStepButton"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
@@ -1,15 +1,37 @@
|
|||||||
using System.Windows;
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
namespace TracePad
|
namespace TracePad
|
||||||
{
|
{
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
|
public MainView ViewModel { get; set; }
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
ViewModel = new MainView();
|
||||||
|
|
||||||
|
this.DataContext = ViewModel;
|
||||||
}
|
}
|
||||||
public void MinimizeButtonClick(object sender, EventArgs e) => this.WindowState = WindowState.Minimized; // Minimize Button
|
private void OpenJsonButton_Click(object sender, RoutedEventArgs e) => ViewModel.LoadSession(); // Открыть JSON
|
||||||
public void ExitButtonClick(object sender, EventArgs e) => Application.Current.Shutdown(); // Exit Button
|
private void CreateJsonButton_Click(object sender, RoutedEventArgs e) => ViewModel.SaveSession(); // Создать JSON
|
||||||
public void DeleteStep_Click(object sender, EventArgs e) { } // Delete Step :)
|
private void NextStepButton_Click(object sender, RoutedEventArgs e) => ViewModel.CreateNextStep(); // Следующий шаг
|
||||||
|
private void DeleteStepButton_Click(object sender, RoutedEventArgs e) => ViewModel.DeleteStep(); // Удалить шаг
|
||||||
|
|
||||||
|
// Выбор шага из списка
|
||||||
|
private void StepsListBox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
var listBox = sender as System.Windows.Controls.ListBox;
|
||||||
|
if (listBox != null && listBox.SelectedItem != null)
|
||||||
|
ViewModel.CurrentStep = listBox.SelectedItem as Step;
|
||||||
|
}
|
||||||
|
public void MinimizeButtonClick(object sender, EventArgs e) => this.WindowState = WindowState.Minimized; // Свернуть окно
|
||||||
|
public void ExitButtonClick(object sender, EventArgs e) => Application.Current.Shutdown(); // Закрыть окно
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ЧЕ НАДО ДОДЕЛАТЬ
|
||||||
|
// В json НЕ УДАЛЯЮТСЯ НОРМАЛЬНО ШАГИ НАДО ИСПРАВИТЬ
|
||||||
|
// НЕ ХОЧУ ВЕРНИТЕ МЕНЯ В РОДНОЙ АССЕМБЛЕР
|
||||||
+67
-38
@@ -1,46 +1,75 @@
|
|||||||
using System;
|
namespace TracePad
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace TracePad
|
|
||||||
{
|
{
|
||||||
class StepData
|
public class Step
|
||||||
{
|
{
|
||||||
// Основные регистры
|
// Основные регистры
|
||||||
public string RAX { get; set; } = "0000000000000000";
|
public string RAX { get; set; }
|
||||||
public string RBX { get; set; } = "0000000000000000";
|
public string EAX { get; set; }
|
||||||
public string RCX { get; set; } = "0000000000000000";
|
public string AX { get; set; }
|
||||||
public string RDX { get; set; } = "0000000000000000";
|
public string AH { get; set; }
|
||||||
|
public string AL { get; set; }
|
||||||
|
|
||||||
// Индексы и указатели
|
public string RBX { get; set; }
|
||||||
public string RSI { get; set; } = "0000000000000000";
|
public string EBX { get; set; }
|
||||||
public string RDI { get; set; } = "0000000000000000";
|
public string BX { get; set; }
|
||||||
public string RBP { get; set; } = "0000000000000000";
|
public string BH { get; set; }
|
||||||
public string RSP { get; set; } = "0000000000000000";
|
public string BL { get; set; }
|
||||||
public string RIP { get; set; } = "0000000000000000";
|
|
||||||
|
|
||||||
// Регистры R8-R15
|
public string RCX { get; set; }
|
||||||
public string R8 { get; set; } = "0000000000000000";
|
public string ECX { get; set; }
|
||||||
public string R9 { get; set; } = "0000000000000000";
|
public string CX { get; set; }
|
||||||
public string R10 { get; set; } = "0000000000000000";
|
public string CH { get; set; }
|
||||||
public string R11 { get; set; } = "0000000000000000";
|
public string CL { get; set; }
|
||||||
public string R12 { get; set; } = "0000000000000000";
|
|
||||||
public string R13 { get; set; } = "0000000000000000";
|
|
||||||
public string R14 { get; set; } = "0000000000000000";
|
|
||||||
public string R15 { get; set; } = "0000000000000000";
|
|
||||||
|
|
||||||
// Флаги состояния
|
public string RDX { get; set; }
|
||||||
public bool CF { get; set; } = false;
|
public string EDX { get; set; }
|
||||||
public bool PF { get; set; } = false;
|
public string DX { get; set; }
|
||||||
public bool AF { get; set; } = false;
|
public string DH { get; set; }
|
||||||
public bool ZF { get; set; } = false;
|
public string DL { get; set; }
|
||||||
public bool SF { get; set; } = false;
|
|
||||||
public bool TF { get; set; } = false;
|
|
||||||
public bool IF { get; set; } = false;
|
|
||||||
public bool DF { get; set; } = false;
|
|
||||||
public bool OF { get; set; } = false;
|
|
||||||
|
|
||||||
// Комментарий к шагу
|
// Регистры R8-R12
|
||||||
public string Comment { get; set; } = string.Empty;
|
public string R8 { get; set; }
|
||||||
|
public string R8D { get; set; }
|
||||||
|
public string R8W { get; set; }
|
||||||
|
public string R8B { get; set; }
|
||||||
|
|
||||||
|
public string R9 { get; set; }
|
||||||
|
public string R9D { get; set; }
|
||||||
|
public string R9W { get; set; }
|
||||||
|
public string R9B { get; set; }
|
||||||
|
|
||||||
|
public string R10 { get; set; }
|
||||||
|
public string R10D { get; set; }
|
||||||
|
public string R10W { get; set; }
|
||||||
|
public string R10B { get; set; }
|
||||||
|
|
||||||
|
public string R11 { get; set; }
|
||||||
|
public string R11D { get; set; }
|
||||||
|
public string R11W { get; set; }
|
||||||
|
public string R11B { get; set; }
|
||||||
|
|
||||||
|
public string R12 { get; set; }
|
||||||
|
public string R12D { get; set; }
|
||||||
|
public string R12W { get; set; }
|
||||||
|
public string R12B { get; set; }
|
||||||
|
|
||||||
|
// Указатели
|
||||||
|
public string RSP { get; set; }
|
||||||
|
public string RBP { get; set; }
|
||||||
|
public string RIP { get; set; }
|
||||||
|
|
||||||
|
// Флаги
|
||||||
|
public bool CF { get; set; }
|
||||||
|
public bool PF { get; set; }
|
||||||
|
public bool AF { get; set; }
|
||||||
|
public bool ZF { get; set; }
|
||||||
|
public bool SF { get; set; }
|
||||||
|
public bool TF { get; set; }
|
||||||
|
public bool IF { get; set; }
|
||||||
|
public bool DF { get; set; }
|
||||||
|
public bool OF { get; set; }
|
||||||
|
|
||||||
|
// Комментарий
|
||||||
|
public string Comment { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user