83 lines
3.7 KiB
XML
83 lines
3.7 KiB
XML
<Window x:Class="CodeMerger.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:avalon="http://icsharpcode.net/sharpdevelop/avalonedit"
|
|
xmlns:cmerger="clr-namespace:CodeMerger"
|
|
Title="Code Merger" Height="800" Width="1200">
|
|
<Grid Margin="10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- File Selection Controls -->
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,10">
|
|
<Button Content="Original File" Width="120" Margin="0,0,10,0"
|
|
Command="{Binding SelectOriginalFileCommand}"/>
|
|
<TextBlock Text="{Binding OriginalFileName}" VerticalAlignment="Center" Margin="0,0,20,0"/>
|
|
|
|
<Button Content="LLM File" Width="120" Margin="0,0,10,0"
|
|
Command="{Binding SelectLLMFileCommand}"/>
|
|
<TextBlock Text="{Binding LlmFileName}" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
|
<Button Content="Paste LLM" Width="120" Margin="0,0,10,0"
|
|
Command="{Binding PasteLLMCommand}"/>
|
|
|
|
<Button Content="Output File" Width="120" Margin="0,0,10,0"
|
|
Command="{Binding SelectOutputFileCommand}"/>
|
|
<TextBlock Text="{Binding OutputFileName}" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
|
|
<!-- Code Display Area -->
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<GroupBox Header="Original Code" Grid.Column="0" Margin="0,0,5,0">
|
|
<avalon:TextEditor
|
|
x:Name="txtOriginalCode"
|
|
ShowLineNumbers="True"
|
|
FontFamily="Consolas"
|
|
SyntaxHighlighting="C#"
|
|
Document="{Binding OriginalDocument}"
|
|
WordWrap="True"/>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="LLM Code" Grid.Column="1" Margin="5,0,5,0">
|
|
<avalon:TextEditor
|
|
x:Name="txtLLMCode"
|
|
ShowLineNumbers="True"
|
|
FontFamily="Consolas"
|
|
SyntaxHighlighting="C#"
|
|
Document="{Binding LLMDocument}"
|
|
WordWrap="True"/>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="Merged Code" Grid.Column="2" Margin="5,0,0,0">
|
|
<avalon:TextEditor
|
|
x:Name="txtMergedCode"
|
|
ShowLineNumbers="True"
|
|
FontFamily="Consolas"
|
|
SyntaxHighlighting="C#"
|
|
Document="{Binding MergedDocument}"
|
|
WordWrap="True"
|
|
Loaded="txtMergedCode_Loaded"
|
|
IsReadOnly="True"/>
|
|
</GroupBox>
|
|
</Grid>
|
|
|
|
<!-- Bottom Controls -->
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0,10,0,0" HorizontalAlignment="Right">
|
|
<Button Content="View Log" Width="120" Height="30" Margin="0,0,10,0"
|
|
Command="{Binding ShowLogCommand}"/>
|
|
<Button Content="Copy Merged" Width="120" Height="30" Margin="0,0,10,0"
|
|
Command="{Binding CopyMergedCommand}"/>
|
|
<Button Content="Merge Code" Width="120" Height="30"
|
|
Command="{Binding MergeCodeCommand}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|