botw-toolset/Dashboard.xaml.cs
Chev 335d7bedf1 Update Dashboard
TabSelect is now a single method, dashboard entries are centered and wrap properly
2021-01-21 01:25:10 -08:00

40 lines
1.3 KiB
C#

using BOTWToolset.Debugging;
using System;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
namespace BOTWToolset
{
/// <summary>
/// Interaction logic for Dashboard.xaml
/// </summary>
public partial class Dashboard : Window
{
public static string VERSION = System.Diagnostics.FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion;
public static string UserDesktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
public Dashboard()
{
InitializeComponent();
BOTWConsole.Log($"Breath of the Wild Toolkit - Version {VERSION}");
LabelVersion.Content = $"Version v{VERSION}";
}
private void TabSelect(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
var sender_border = (Border)sender;
switch (sender_border.Name)
{
case "DashboardButtonTSCB": tabItemTSCB.IsSelected = true; break;
case "DashboardButtonYaz0": tabItemYaz0.IsSelected = true; break;
case "DashboardButtonSARC": tabItemSARC.IsSelected = true; break;
case "DashboardButtonRSTB": tabItemRSTB.IsSelected = true; break;
}
}
}
}