Fix bugs and add event for export template

This commit is contained in:
Caeden Statia 2020-02-02 23:09:19 -08:00
parent 359f0a91cd
commit 8a680df028
2 changed files with 13 additions and 3 deletions

View file

@ -69,7 +69,7 @@
<TextBlock Grid.Row="13" Margin="5" HorizontalAlignment="Left" Text="Application Theme: " FontWeight="Bold" FontSize="16" />
<ComboBox Name="ApplicationThemeComboBox" Grid.Row="13" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" SelectionChanged="ApplicationThemeComboBox_SelectionChanged"></ComboBox>
<Button Name="ApplicationThemeExportTemplate" Grid.Row="13" Grid.Column="3" Margin="3" Height="30" Width="90" Content="Export Template"></Button>
<Button Name="ApplicationThemeExportTemplate" Grid.Row="13" Grid.Column="3" Margin="3" Height="30" Width="90" Content="Export Template" Click="ApplicationThemeExportTemplate_Click"></Button>
<TextBlock Grid.Row="14" Margin="15,5,5,5" Text="Diagnostics" FontSize="24" FontWeight="Bold" HorizontalAlignment="Left"/>
<StackPanel Grid.Row="15" Margin="0" Orientation="Horizontal" HorizontalAlignment="Left">

View file

@ -18,6 +18,7 @@ using Path = System.IO.Path;
using System.Net;
using System.Web.Script.Serialization;
using System.Web;
using System.ComponentModel;
namespace ModAssistant.Pages
{
@ -54,8 +55,12 @@ namespace ModAssistant.Pages
this.DataContext = this;
ApplicationThemeComboBox.ItemsSource = Themes.LoadedThemes;
ApplicationThemeComboBox.SelectedItem = Themes.LoadedTheme;
if (!DesignerProperties.GetIsInDesignMode(this))
{
if (!Themes.LoadedThemes.Any()) Themes.LoadThemes();
ApplicationThemeComboBox.ItemsSource = Themes.LoadedThemes;
ApplicationThemeComboBox.SelectedValue = Themes.LoadedTheme;
}
}
public void UpdateHandlerStatus()
@ -253,5 +258,10 @@ namespace ModAssistant.Pages
{
Themes.ApplyTheme((sender as ComboBox).SelectedItem.ToString());
}
private void ApplicationThemeExportTemplate_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("nice going laughShorts this is coming soon");
}
}
}