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")
|
||||
}
|
||||
|
||||
// Locator
|
||||
Locator Key="Locator" { }
|
||||
// Container
|
||||
Container Key="Container" { }
|
||||
}
|
||||
}
|
|
@ -6,12 +6,12 @@ namespace DiscordChatExporter
|
|||
{
|
||||
private void App_Startup(object sender, StartupEventArgs e)
|
||||
{
|
||||
Locator.Init();
|
||||
Container.Init();
|
||||
}
|
||||
|
||||
private void App_Exit(object sender, ExitEventArgs e)
|
||||
{
|
||||
Locator.Cleanup();
|
||||
Container.Cleanup();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ using Microsoft.Practices.ServiceLocation;
|
|||
|
||||
namespace DiscordChatExporter
|
||||
{
|
||||
public class Locator
|
||||
public class Container
|
||||
{
|
||||
public static void Init()
|
||||
{
|
|
@ -106,7 +106,7 @@
|
|||
<Compile Include="App.ammy.cs">
|
||||
<DependentUpon>App.ammy</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Locator.cs" />
|
||||
<Compile Include="Container.cs" />
|
||||
<Compile Include="Models\Attachment.cs" />
|
||||
<Compile Include="Models\Channel.cs" />
|
||||
<Compile Include="Models\Guild.cs" />
|
||||
|
|
|
@ -6,7 +6,7 @@ Window "DiscordChatExporter.Views.MainWindow" {
|
|||
Width: 600
|
||||
Height: 550
|
||||
Background: resource dyn "MaterialDesignPaper"
|
||||
DataContext: bind MainViewModel from $resource Locator
|
||||
DataContext: bind MainViewModel from $resource Container
|
||||
FocusManager.FocusedElement: bind from "TokenTextBox"
|
||||
FontFamily: resource dyn "MaterialDesignFont"
|
||||
SnapsToDevicePixels: true
|
||||
|
@ -128,7 +128,7 @@ Window "DiscordChatExporter.Views.MainWindow" {
|
|||
Cursor: CursorType.Hand
|
||||
|
||||
Image {
|
||||
Margin: 6
|
||||
Margin: "12 6 12 6"
|
||||
Width: 48
|
||||
Height: 48
|
||||
Source: bind IconUrl
|
||||
|
@ -167,12 +167,12 @@ Window "DiscordChatExporter.Views.MainWindow" {
|
|||
]
|
||||
|
||||
PackIcon {
|
||||
Margin: "4 7 0 6"
|
||||
Margin: "16 7 0 6"
|
||||
Kind: PackIconKind.Pound
|
||||
VerticalAlignment: Center
|
||||
}
|
||||
TextBlock {
|
||||
Margin: "3 6 6 6"
|
||||
Margin: "3 8 8 8"
|
||||
FontSize: 14
|
||||
Text: bind Name
|
||||
VerticalAlignment: Center
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using MaterialDesignThemes.Wpf
|
||||
|
||||
UserControl "DiscordChatExporter.Views.SettingsDialog" {
|
||||
DataContext: bind SettingsViewModel from $resource Locator
|
||||
DataContext: bind SettingsViewModel from $resource Container
|
||||
Width: 250
|
||||
|
||||
StackPanel {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue