mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-28 13:44:12 -04:00
Refactor
This commit is contained in:
parent
c01b9d0e5f
commit
f2178a0445
6 changed files with 11 additions and 11 deletions
|
@ -63,7 +63,7 @@
|
||||||
#Setter("Foreground", resource dyn "PrimaryTextBrush")
|
#Setter("Foreground", resource dyn "PrimaryTextBrush")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Locator
|
// Container
|
||||||
Locator Key="Locator" { }
|
Container Key="Container" { }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,12 +6,12 @@ namespace DiscordChatExporter
|
||||||
{
|
{
|
||||||
private void App_Startup(object sender, StartupEventArgs e)
|
private void App_Startup(object sender, StartupEventArgs e)
|
||||||
{
|
{
|
||||||
Locator.Init();
|
Container.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void App_Exit(object sender, ExitEventArgs e)
|
private void App_Exit(object sender, ExitEventArgs e)
|
||||||
{
|
{
|
||||||
Locator.Cleanup();
|
Container.Cleanup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -5,7 +5,7 @@ using Microsoft.Practices.ServiceLocation;
|
||||||
|
|
||||||
namespace DiscordChatExporter
|
namespace DiscordChatExporter
|
||||||
{
|
{
|
||||||
public class Locator
|
public class Container
|
||||||
{
|
{
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
|
@ -106,7 +106,7 @@
|
||||||
<Compile Include="App.ammy.cs">
|
<Compile Include="App.ammy.cs">
|
||||||
<DependentUpon>App.ammy</DependentUpon>
|
<DependentUpon>App.ammy</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Locator.cs" />
|
<Compile Include="Container.cs" />
|
||||||
<Compile Include="Models\Attachment.cs" />
|
<Compile Include="Models\Attachment.cs" />
|
||||||
<Compile Include="Models\Channel.cs" />
|
<Compile Include="Models\Channel.cs" />
|
||||||
<Compile Include="Models\Guild.cs" />
|
<Compile Include="Models\Guild.cs" />
|
||||||
|
|
|
@ -6,7 +6,7 @@ Window "DiscordChatExporter.Views.MainWindow" {
|
||||||
Width: 600
|
Width: 600
|
||||||
Height: 550
|
Height: 550
|
||||||
Background: resource dyn "MaterialDesignPaper"
|
Background: resource dyn "MaterialDesignPaper"
|
||||||
DataContext: bind MainViewModel from $resource Locator
|
DataContext: bind MainViewModel from $resource Container
|
||||||
FocusManager.FocusedElement: bind from "TokenTextBox"
|
FocusManager.FocusedElement: bind from "TokenTextBox"
|
||||||
FontFamily: resource dyn "MaterialDesignFont"
|
FontFamily: resource dyn "MaterialDesignFont"
|
||||||
SnapsToDevicePixels: true
|
SnapsToDevicePixels: true
|
||||||
|
@ -128,7 +128,7 @@ Window "DiscordChatExporter.Views.MainWindow" {
|
||||||
Cursor: CursorType.Hand
|
Cursor: CursorType.Hand
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
Margin: 6
|
Margin: "12 6 12 6"
|
||||||
Width: 48
|
Width: 48
|
||||||
Height: 48
|
Height: 48
|
||||||
Source: bind IconUrl
|
Source: bind IconUrl
|
||||||
|
@ -167,12 +167,12 @@ Window "DiscordChatExporter.Views.MainWindow" {
|
||||||
]
|
]
|
||||||
|
|
||||||
PackIcon {
|
PackIcon {
|
||||||
Margin: "4 7 0 6"
|
Margin: "16 7 0 6"
|
||||||
Kind: PackIconKind.Pound
|
Kind: PackIconKind.Pound
|
||||||
VerticalAlignment: Center
|
VerticalAlignment: Center
|
||||||
}
|
}
|
||||||
TextBlock {
|
TextBlock {
|
||||||
Margin: "3 6 6 6"
|
Margin: "3 8 8 8"
|
||||||
FontSize: 14
|
FontSize: 14
|
||||||
Text: bind Name
|
Text: bind Name
|
||||||
VerticalAlignment: Center
|
VerticalAlignment: Center
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using MaterialDesignThemes.Wpf
|
using MaterialDesignThemes.Wpf
|
||||||
|
|
||||||
UserControl "DiscordChatExporter.Views.SettingsDialog" {
|
UserControl "DiscordChatExporter.Views.SettingsDialog" {
|
||||||
DataContext: bind SettingsViewModel from $resource Locator
|
DataContext: bind SettingsViewModel from $resource Container
|
||||||
Width: 250
|
Width: 250
|
||||||
|
|
||||||
StackPanel {
|
StackPanel {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue