-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
77 lines (76 loc) · 8.71 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<Window x:Class="MSGEdit.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:MSGEdit"
mc:Ignorable="d"
Title="MSGEdit" Height="570" Width="730" ResizeMode="CanMinimize" PreviewKeyDown="MyWindow_PreviewKeyDown" Name="MyWindow">
<Window.Background>
<ImageBrush ImageSource="Images\background_new.png"/>
</Window.Background>
<Grid>
<!--AlternationCount="{Binding Path=Items.Count}"-->
<ListBox Height="269" HorizontalAlignment="Left" Margin="20,34,0,0" Name="FileContentListBox" VerticalAlignment="Top" Width="358" SelectionMode="Single" SelectionChanged="FileContentListBox_SelectionChanged" Visibility="Hidden">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock>
<TextBlock.Inlines>
<Run FontWeight="DemiBold" Text="{Binding Index}"/>
<Run Text=" "/>
</TextBlock.Inlines>
</TextBlock>
<TextBlock Text="{Binding Message}"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<!--<ComboBox Height="23" HorizontalAlignment="Left" Margin="279,67,0,0" Name="comboBox1" VerticalAlignment="Top" Width="120" IsEditable="True" IsReadOnly="False" /> -->
<Button Content="Load _TXT..." Height="30" HorizontalAlignment="Left" Margin="169,134,0,0" Name="LoadTXTButton" VerticalAlignment="Top" Width="100" Click="LoadTXTButton_Click" Visibility="Visible" />
<Button Content="Load _MSG..." Height="30" HorizontalAlignment="Left" Margin="461,134,0,0" Name="LoadMSGButton" VerticalAlignment="Top" Width="100" Click="LoadMSGButton_Click" Visibility="Visible" />
<Button Content="Save_TXT As..." Height="23" HorizontalAlignment="Left" Margin="60,397,0,0" Name="SaveTXTButton" VerticalAlignment="Top" Width="94" Click="SaveTXTButton_Click" Visibility="Hidden" />
<Button Content="Save_MSG As..." Height="23" HorizontalAlignment="Left" Margin="60,426,0,0" Name="SaveMSGButton" VerticalAlignment="Top" Width="94" Click="SaveMSGButton_Click" Visibility="Hidden" />
<Button Content="Stop e_diting" Height="23" HorizontalAlignment="Left" Margin="60,463,0,0" Name="StopEditingButton" VerticalAlignment="Top" Width="94" Click="StopEditingButton_Click" Visibility="Hidden" />
<Button Content="_Resume editing" Height="30" HorizontalAlignment="Center" Margin="0,402,0,0" Name="ResumeEditingButton" VerticalAlignment="Top" Width="100" Click="ResumeEditingButton_Click" Visibility="Hidden" />
<TextBox HorizontalAlignment="Left" Margin="448,158,0,0" Name="InsertIndexTextBox" VerticalAlignment="Top" Width="80" Text="0" PreviewKeyDown="FilterInput" Visibility="Hidden" />
<TextBox HorizontalAlignment="Left" Margin="483,317,0,0" Name="EntryIndexTextBox" Width="38" Text="" TextChanged="EntryIndexTextBox_TextChanged" VerticalAlignment="Top" PreviewKeyDown="FilterInput" Visibility="Hidden" />
<TextBox HorizontalAlignment="Left" Margin="483,66,0,0" Name="EraseCountTextBox" VerticalAlignment="Top" Width="45" Text="1" PreviewKeyDown="FilterInput" TextChanged="EraseCountTextBox_TextChanged" Visibility="Hidden" />
<TextBox HorizontalAlignment="Left" Margin="483,38,0,0" Name="EraseStartTextBox" VerticalAlignment="Top" Width="45" Text="0" PreviewKeyDown="FilterInput" TextChanged="EraseStartTextBox_TextChanged" Visibility="Hidden" />
<TextBox HorizontalAlignment="Left" Margin="139,356,0,0" Name="MagicValueTextBox" VerticalAlignment="Top" Text="7" LostFocus="MagicValueTextBox_LostFocus" TextChanged="MagicValueTextBox_TextChanged" PreviewKeyDown="FilterInput" PreviewTextInput="MagicValueTextBox_PreviewTextInput" MaxLength="10" Visibility="Hidden" />
<Button Content="_Erase" Height="23" HorizontalAlignment="Left" Margin="558,52,0,0" Name="EraseButton" VerticalAlignment="Top" Width="75" Click="EraseButton_Click" Visibility="Hidden" />
<Button Content="_Insert" Height="23" HorizontalAlignment="Left" Margin="547,155,0,0" Name="InsertButton" VerticalAlignment="Top" Width="75" Click="InsertButton_Click" Visibility="Hidden" />
<Button Content="_Save entry" Height="23" HorizontalAlignment="Left" Margin="547,313,0,0" Name="SaveEntryButton" VerticalAlignment="Top" Width="75" Click="SaveEntryButton_Click" Visibility="Hidden" />
<TextBox Height="55" HorizontalAlignment="Left" Margin="392,199,0,0" Name="InsertStringTextBox" VerticalAlignment="Top" Width="282" Text="String to be inserted" Visibility="Hidden" />
<TextBox Height="127" HorizontalAlignment="Left" Margin="392,340,0,0" Name="EntryStringTextBox" VerticalAlignment="Top" Width="282" Text="" TextWrapping="Wrap" Visibility="Hidden" />
<Rectangle Height="155" HorizontalAlignment="Left" Margin="169,186,0,0" Name="DragAndDropRectangle" Stroke="Black" VerticalAlignment="Top" Width="392" AllowDrop="True" Drop="DragAndDropRectangle_Drop" Fill="#FFC6C6C6" Visibility="Visible">
<Rectangle.ToolTip>
<ToolTip HasDropShadow="True">
Drop file here
</ToolTip>
</Rectangle.ToolTip>
</Rectangle>
<Label Content="Start index :" Height="28" HorizontalAlignment="Left" Margin="408,34,0,0" Name="EraseStartLabel" VerticalAlignment="Top" Visibility="Hidden" />
<Label Content="Count :" Height="28" HorizontalAlignment="Left" Margin="432,61,0,0" Name="EraseCountLabel" VerticalAlignment="Top" Visibility="Hidden" />
<Label Content="Index :" Height="28" HorizontalAlignment="Left" Margin="402,153,0,0" Name="InsertIndexLabel" VerticalAlignment="Top" Visibility="Hidden" />
<Label Content="Index :" Height="28" HorizontalAlignment="Left" Margin="433,311,0,0" Name="EntryIndexLabel" VerticalAlignment="Top" Visibility="Hidden" />
<Label Content="Magic value:" Height="28" HorizontalAlignment="Left" Margin="60,351,0,0" Name="MagicValueLabel" VerticalAlignment="Top" Visibility="Hidden" />
<Label Content="Made by Nemoumbra © 2022" Height="28" HorizontalAlignment="Left" Margin="269,496,0,0" Name="AuthorLabel" VerticalAlignment="Top" FontWeight="Bold" FontSize="13" Visibility="Visible" />
<Button Content="_New file" Height="30" HorizontalAlignment="Left" Margin="315,134,0,0" Name="NewFileButton" VerticalAlignment="Top" Width="100" Click="NewFileButton_Click" Visibility="Visible" />
<Button Content="_Randomize" Height="23" HorizontalAlignment="Left" Margin="589,472,0,0" Name="RandomizeButton" VerticalAlignment="Top" Width="75" Click="RandomizeButton_Click" Visibility="Hidden" />
<TextBox HorizontalAlignment="Left" Margin="620,500,0,0" Name="RandomizeSeedTextbox" VerticalAlignment="Top" Width="51" PreviewKeyDown="FilterInput" Visibility="Hidden" />
<Label Content="Seed:" Height="28" HorizontalAlignment="Left" Margin="578,495,0,0" Name="RandomizeLabel" VerticalAlignment="Top" Visibility="Hidden" />
<TextBox x:Name="CurrentFilePathTextBox" HorizontalAlignment="Left" Margin="0,70,0,0" VerticalAlignment="Top" Background="Transparent" BorderThickness="0" AllowDrop="False" MaxWidth="500" TextWrapping="Wrap" IsReadOnly="True" Visibility="Hidden" SizeChanged="CurrentFilePathTextBox_SizeChanged"/>
<!--
<Label x:Name="CurrentFilePathLabel" Content="Current file path:" HorizontalAlignment="Center" Margin="0,46,0,0" VerticalAlignment="Top" Visibility="Visible"/>
-->
<WrapPanel x:Name="MsgCountWrapPanel" HorizontalAlignment="Left" Margin="63,336,0,0" VerticalAlignment="Top" Width="115" Visibility="Hidden">
<TextBox x:Name="MsgCountTextBox" HorizontalAlignment="Left" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Background="Transparent" BorderThickness="0" IsReadOnly="True" AllowDrop="False"/>
<TextBlock x:Name="MsgCountTextBlock" HorizontalAlignment="Left" TextWrapping="Wrap" Text=" entries" VerticalAlignment="Top"/>
</WrapPanel>
<TextBlock x:Name="CurrentFilePathTextBlock" HorizontalAlignment="Left" Margin="313.8,50,0,0" Text="Current file path:" VerticalAlignment="Top" FontStyle="Italic" Visibility="Hidden" TextWrapping="Wrap" FontSize="14"/>
<!--
<Label Content="entries" HorizontalAlignment="Left" x:Name="EntriesCountLabel" VerticalAlignment="Top" Margin="198,406,0,0" />
-->
</Grid>
</Window>