diff --git a/GUI/App.xaml b/GUI/App.xaml
index cc57d885..0bd0ff22 100644
--- a/GUI/App.xaml
+++ b/GUI/App.xaml
@@ -6,6 +6,7 @@
ShutdownMode="OnMainWindowClose" Exit="ApplicationExit">
https://github.com/morkt/GARbro#readme
+ https://github.com/morkt/GARbro/issues
https://morkt.github.io/GARbro/version.xml
diff --git a/GUI/GARbro.GUI.csproj b/GUI/GARbro.GUI.csproj
index 996c47b3..1e4bf6b6 100644
--- a/GUI/GARbro.GUI.csproj
+++ b/GUI/GARbro.GUI.csproj
@@ -188,6 +188,9 @@
TextViewer.xaml
+
+ TroubleShootingDialog.xaml
+
UpdateDialog.xaml
@@ -249,6 +252,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/GUI/MainWindow.xaml b/GUI/MainWindow.xaml
index 2eb645b5..b3b24bff 100644
--- a/GUI/MainWindow.xaml
+++ b/GUI/MainWindow.xaml
@@ -154,6 +154,7 @@
@@ -292,6 +293,8 @@
+
+
@@ -417,6 +420,9 @@
+
+
+
diff --git a/GUI/MainWindow.xaml.cs b/GUI/MainWindow.xaml.cs
index 9380b602..868e7050 100644
--- a/GUI/MainWindow.xaml.cs
+++ b/GUI/MainWindow.xaml.cs
@@ -901,6 +901,21 @@ namespace GARbro.GUI
OpenDirectoryEntry (ViewModel, entry);
}
+ private void DescendExec (object control, ExecutedRoutedEventArgs e)
+ {
+ var entry = CurrentDirectory.SelectedItem as EntryViewModel;
+ if (entry != null)
+ OpenDirectoryEntry (ViewModel, entry);
+ }
+
+ private void AscendExec (object control, ExecutedRoutedEventArgs e)
+ {
+ var vm = ViewModel;
+ var parent_dir = vm.FirstOrDefault (entry => entry.Name == "..");
+ if (parent_dir != null)
+ OpenDirectoryEntry (vm, parent_dir);
+ }
+
private void OpenDirectoryEntry (DirectoryViewModel vm, EntryViewModel entry)
{
string old_dir = null == vm ? "" : vm.Path.Last();
@@ -1296,6 +1311,13 @@ namespace GARbro.GUI
settings.ShowDialog();
}
+ private void TroubleShootingExec (object sender, ExecutedRoutedEventArgs e)
+ {
+ var dialog = new TroubleShootingDialog();
+ dialog.Owner = this;
+ dialog.ShowDialog();
+ }
+
private void CanExecuteAlways (object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = true;
@@ -1525,5 +1547,8 @@ namespace GARbro.GUI
public static readonly RoutedCommand CopyNames = new RoutedCommand();
public static readonly RoutedCommand StopPlayback = new RoutedCommand();
public static readonly RoutedCommand Preferences = new RoutedCommand();
+ public static readonly RoutedCommand TroubleShooting = new RoutedCommand();
+ public static readonly RoutedCommand Descend = new RoutedCommand();
+ public static readonly RoutedCommand Ascend = new RoutedCommand();
}
}
diff --git a/GUI/Strings/guiStrings.ru-RU.resx b/GUI/Strings/guiStrings.ru-RU.resx
index 89c130ab..5a29f3ac 100644
--- a/GUI/Strings/guiStrings.ru-RU.resx
+++ b/GUI/Strings/guiStrings.ru-RU.resx
@@ -511,7 +511,7 @@
Что делать?
- Не удадось конвертировать файл
+ Не удалось конвертировать файл
{0}
{1}
diff --git a/GUI/TroubleShootingDialog.xaml b/GUI/TroubleShootingDialog.xaml
new file mode 100644
index 00000000..de2e14a5
--- /dev/null
+++ b/GUI/TroubleShootingDialog.xaml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+ If you experience troubles you may open an issue at the developer's site (use English please).
+ Following information might be useful in your report:
+
+
+
+
diff --git a/GUI/TroubleShootingDialog.xaml.cs b/GUI/TroubleShootingDialog.xaml.cs
new file mode 100644
index 00000000..bc764b52
--- /dev/null
+++ b/GUI/TroubleShootingDialog.xaml.cs
@@ -0,0 +1,118 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Windows;
+using System.Windows.Navigation;
+using GameRes;
+using Microsoft.Win32;
+
+namespace GARbro.GUI
+{
+ ///
+ /// Interaction logic for TroubleShooting.xaml
+ ///
+ public partial class TroubleShootingDialog : Window
+ {
+ public TroubleShootingDialog ()
+ {
+ InitializeComponent();
+
+ this.EnvironmentInfo.Text = GetEnvironmentReportText();
+ }
+
+ private void Hyperlink_RequestNavigate (object sender, RequestNavigateEventArgs e)
+ {
+ if (App.NavigateUri (e.Uri))
+ e.Handled = true;
+ }
+
+ private void Button_Copy (object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ Clipboard.SetText (this.EnvironmentInfo.Text);
+ }
+ catch (Exception X)
+ {
+ System.Diagnostics.Trace.WriteLine (X.Message, "Clipboard error");
+ }
+ }
+
+ internal static string GetEnvironmentReportText ()
+ {
+ var gui = Assembly.GetExecutingAssembly();
+ var gui_path = Path.GetDirectoryName (gui.Location);
+ var report = new StringBuilder();
+ report.AppendFormat ("OS: {0}\n", GetOSVersion());
+ report.AppendFormat ("Framework version: {0}\n", Environment.Version);
+ report.AppendFormat ("Framework release: {0}\n", GetFrameWorkReleaseInfo());
+ report.AppendFormat ("{0}: {1}\n", App.Name, gui.GetName().Version);
+ report.AppendFormat ("Formats database version: {0}\n", FormatCatalog.Instance.CurrentSchemeVersion);
+ try
+ {
+ report.Append ("\nLoaded assemblies:\n");
+ var local_assemblies = AppDomain.CurrentDomain.GetAssemblies().Where (a => !a.IsDynamic && a.Location.StartsWith (gui_path));
+ foreach (var assembly in local_assemblies.Select (a => a.GetName()))
+ {
+ report.AppendFormat ("{0} {1}\n", assembly.Name, assembly.Version);
+ }
+ }
+ catch (Exception X)
+ {
+ report.AppendFormat ("Assemblies enumeration failed:\n{0}", X.Message);
+ }
+ return report.ToString();
+ }
+
+ internal static string GetOSVersion ()
+ {
+ string id = Registry.GetValue (@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ReleaseId", "").ToString();
+ if (string.IsNullOrEmpty (id))
+ {
+ id = Registry.GetValue (@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName", "").ToString();
+ if (string.IsNullOrEmpty (id))
+ id = Environment.OSVersion.VersionString;
+ else
+ {
+ string sp = Environment.OSVersion.ServicePack;
+ if (!string.IsNullOrEmpty (sp))
+ id += ' '+sp;
+ }
+ }
+ return id;
+ }
+
+ static readonly SortedDictionary FrameworkReleases = new SortedDictionary {
+ { 378389, "4.5" },
+ { 378675, "4.5.1 from Windows 8.1" },
+ { 378758, "4.5.1" },
+ { 379893, "4.5.2" },
+ { 393295, "4.6 from Windows 10" },
+ { 393297, "4.6" },
+ { 394254, "4.6.1 from Windows 10" },
+ { 394271, "4.6.1" },
+ { 394802, "4.6.2 from Windows 10 Anniversary Update" },
+ { 394806, "4.6.2" },
+ { 460798, "4.7 from Windows 10 Creators Update" },
+ { 460805, "4.7" },
+ { 461308, "4.7.1 from Windows 10 Fall Creators Update" },
+ { 461310, "4.7.1+" },
+ };
+
+ internal static string GetFrameWorkReleaseInfo ()
+ {
+ int release = Convert.ToInt32 (Registry.GetValue (@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full", "Release", 0));
+ if (0 == release)
+ return "Unknown";
+ var version = FrameworkReleases.Reverse().Where (r => release >= r.Key).Select (r => r.Value).FirstOrDefault();
+ if (string.IsNullOrEmpty (version))
+ version = release.ToString();
+ else
+ version = string.Format ("{0} ({1})", release, version);
+ return version;
+ }
+ }
+}