-
Notifications
You must be signed in to change notification settings - Fork 21
/
MainWindow.xaml
141 lines (141 loc) · 11.4 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<Window x:Class="RemnantSaveManager.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:RemnantSaveManager"
mc:Ignorable="d"
Title="Remnant Save Manager" Height="450" Width="800" Loaded="Window_Loaded" Icon="Resources/SaveAll_32x.png" Closing="Window_Closing" Closed="Window_Closed" Deactivated="Window_Deactivated" MinHeight="200" MinWidth="300">
<Window.Resources>
<Image x:Key="Play" Height="22" Width="22" Source="Resources/Play_32x.png"/>
<Image x:Key="PlayGrey" Height="22" Width="22" Source="Resources/Play_grey_32x.png"/>
<Image x:Key="Save" Height="22" Width="22" Source="Resources/Save_32x.png"/>
<Image x:Key="SaveGrey" Height="22" Width="22" Source="Resources/Save_grey_32x.png"/>
<Image x:Key="Restore" Height="22" Width="22" Source="Resources/Undo_32x.png"/>
<Image x:Key="RestoreGrey" Height="22" Width="22" Source="Resources/Undo_grey_32x.png"/>
<Image x:Key="StatusOK" Height="16" Width="16" Source="Resources/StatusOK_32x.png"/>
<Image x:Key="StatusNo" Height="16" Width="16" Source="Resources/StatusNo_32x.png"/>
<Style x:Key="VerticalSeparatorStyle"
TargetType="{x:Type Separator}"
BasedOn="{StaticResource {x:Type Separator}}">
<Setter Property="Margin" Value="6,0,6,0"/>
<Setter Property="LayoutTransform">
<Setter.Value>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<RotateTransform Angle="90"/>
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Background="#FF4B4B4B">
<Grid.RowDefinitions>
<RowDefinition x:Name="ForToolbar" Height="Auto" />
<RowDefinition x:Name="ForBackups" Height="*" />
<RowDefinition x:Name="ForStatusbar" Height="Auto" />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="46"/>
</Grid.ColumnDefinitions>
<Button x:Name="btnAnalyzeCurrent" Click="BtnAnalyzeCurrent_Click" ToolTip="Analyze active save" Margin="10,5" TabIndex="3" Grid.Column="3">
<Image Height="22" Width="22" Source="Resources/SearchMember_32x.png"/>
</Button>
<Separator Style="{DynamicResource VerticalSeparatorStyle}" Grid.Column="4" />
<Button x:Name="btnOpenFolder" IsCancel="True" Foreground="Black" Click="BtnOpenFolder_Click" ToolTip="Open backups folder" Margin="10,5" TabIndex="4" Grid.Column="5">
<Image Height="22" Width="22" Source="Resources/OpenFolder_32x.png" ToolTip="Open backups folder"/>
</Button>
<Button x:Name="btnStartGame" Foreground="Black" Click="BtnStartGame_Click" ToolTip="Launch the game" Margin="10,5" TabIndex="5" Grid.Column="7">
<Image Height="22" Width="22" ToolTip="Launch the game" Source="Resources/Play_32x.png"/>
</Button>
</Grid>
<TabControl Background="#FFB9B9B9" Grid.Row="1" TabIndex="5">
<TabItem x:Name="tabBackups" Header="Backups">
<DataGrid x:Name="dataBackups" BeginningEdit="DataBackups_BeginningEdit" SelectionMode="Single" CellEditEnding="DataBackups_CellEditEnding" SelectionChanged="DataBackups_SelectionChanged" AutoGeneratingColumn="DataBackups_AutoGeneratingColumn">
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="Restore Backup" Click="BtnRestore_Click">
<MenuItem.Icon>
<Image Source="Resources/Undo_32x.png"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Name="backupCMStart" Header="Restore Backup And Start Game" Click="BtnRestoreStart_Click">
<MenuItem.Icon>
<Image Source="Resources/Play_32x.png"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Analyze World" Click="analyzeMenuItem_Click">
<MenuItem.Icon>
<Image Source="Resources/SearchMember_32x.png"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Open in Explorer" Click="openFolderMenuItem_Click">
<MenuItem.Icon>
<Image Source="Resources/OpenFolder_32x.png"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Delete" Click="deleteMenuItem_Click">
<MenuItem.Icon>
<Image Source="Resources/Trash_32x.png"/>
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</DataGrid.ContextMenu>
</DataGrid>
</TabItem>
<TabItem x:Name="tabSettings" Header="Settings">
<Grid Background="#FFE5E5E5">
<CheckBox x:Name="chkAutoBackup" Content="Automatically backup save files" ToolTip="Monitor Remnant save files and back them up when they're changed" HorizontalAlignment="Left" Margin="10,13,0,0" VerticalAlignment="Top" Click="ChkAutoBackup_Click" TabIndex="101"/>
<TextBox x:Name="txtBackupMins" HorizontalAlignment="Left" Height="23" Margin="10,33,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="64" LostFocus="TxtBackupMins_LostFocus" KeyUp="TxtBackupMins_KeyUp" TabIndex="102"/>
<Label Content="Minutes between backups" ToolTip="Minimum amount of time that must have passed since last backup before a new backup is made" HorizontalAlignment="Left" Margin="90,33,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="txtBackupLimit" HorizontalAlignment="Left" Height="23" Margin="10,61,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="64" KeyUp="TxtBackupLimit_KeyUp" LostFocus="TxtBackupLimit_LostFocus" TabIndex="103"/>
<Label Content="Backups to keep (0 for unlimited)" ToolTip="When your number of backups reaches this number, backups will automatically be deleted starting with the oldest" HorizontalAlignment="Left" Margin="90,61,0,0" VerticalAlignment="Top" />
<TextBox x:Name="txtBackupFolder" ToolTip="Where your save backups are stored" Height="23" Margin="105,156,10,0" TextWrapping="Wrap" VerticalAlignment="Top" IsReadOnly="True" TabIndex="-1" IsTabStop="False"/>
<Button x:Name="btnBackupFolder" Content="Backup Folder" HorizontalAlignment="Left" Margin="10,156,0,0" VerticalAlignment="Top" Click="BtnBackupFolder_Click" MinWidth="75" MinHeight="20" TabIndex="104" Height="23" Width="90"/>
<Button x:Name="btnGameInfoUpdate" Content="Check for update" ToolTip="Check to see if there's a new version of this program available" HorizontalAlignment="Left" Margin="10,251,0,0" VerticalAlignment="Top" Click="btnGameInfoUpdate_Click" MinWidth="113" MinHeight="20" TabIndex="106" Height="23"/>
<CheckBox x:Name="chkCreateLogFile" Content="Create log file" ToolTip="Whether a log.txt file should be created" HorizontalAlignment="Left" Margin="10,184,0,0" VerticalAlignment="Top" Click="chkCreateLogFile_Click" TabIndex="105"/>
<ComboBox x:Name="cmbMissingItemColor" HorizontalAlignment="Left" Margin="10,204,0,0" VerticalAlignment="Top" Width="113"/>
<Label Content="World analzyer missing item color" HorizontalAlignment="Left" Margin="128,200,0,0" VerticalAlignment="Top"/>
<CheckBox x:Name="chkShowPossibleItems" Content="Show all items column in analyzer" HorizontalAlignment="Left" Margin="322,206,0,0" VerticalAlignment="Top" Click="chkShowPossibleItems_Click"/>
<CheckBox x:Name="chkAutoCheckUpdate" Content="Automatically check for program update" HorizontalAlignment="Left" Margin="10,231,0,0" VerticalAlignment="Top" Click="chkAutoCheckUpdate_Click"/>
<Button x:Name="btnSaveFolder" Content="Save Folder" HorizontalAlignment="Left" Margin="10,93,0,0" VerticalAlignment="Top" Width="90" Height="23" ToolTip="Only change if you know what you're doing!" Click="btnSaveFolder_Click"/>
<TextBox x:Name="txtSaveFolder" Height="23" Margin="105,93,10,0" TextWrapping="Wrap" VerticalAlignment="Top" TabIndex="6" IsTabStop="False" IsReadOnly="True" ToolTip="Where your Remnant saves are located"/>
<Button x:Name="btnGameFolder" Content="Game Folder" HorizontalAlignment="Left" Margin="10,126,0,0" VerticalAlignment="Top" Width="90" Height="23" Click="btnGameFolder_Click"/>
<TextBox x:Name="txtGameFolder" Height="23" Margin="105,126,60,0" TextWrapping="Wrap" VerticalAlignment="Top" TabIndex="6" IsTabStop="False" IsReadOnly="True" ToolTip="Where your Remnant game is located"/>
<Button x:Name="btnFindGameFolder" Content="Auto" HorizontalAlignment="Right" Margin="10,126,10,0" VerticalAlignment="Top" Width="45" Height="23" Click="btnFindGameFolder_Click"/>
</Grid>
</TabItem>
<TabItem x:Name="tabLog" Header="Log">
<Grid>
<TextBox x:Name="txtLog" TextWrapping="Wrap" Background="White" VerticalScrollBarVisibility="Auto" Grid.ColumnSpan="2"/>
</Grid>
</TabItem>
</TabControl>
<StatusBar Background="{x:Null}" Grid.Row="2">
<StatusBarItem HorizontalAlignment="Left">
<Label x:Name="lblStatus" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="White" ToolTip="Not backed up" Margin="5">
<DynamicResource ResourceKey="StatusNo"/>
</Label>
</StatusBarItem>
<StatusBarItem HorizontalAlignment="Left">
<Button x:Name="btnBackup" HorizontalAlignment="Left" VerticalAlignment="Center" Click="BtnBackup_Click" ToolTip="Backup current save" Margin="10,5" TabIndex="1" Grid.Column="0">
<DynamicResource ResourceKey="Save"/>
</Button>
</StatusBarItem>
<StatusBarItem HorizontalAlignment="Right">
<Label x:Name="lblLastMessage" Content="" HorizontalAlignment="Left" VerticalAlignment="Center" Background="{x:Null}" Foreground="White" Margin="5"/>
</StatusBarItem>
</StatusBar>
</Grid>
</Window>