mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-28 09:25:26 +00:00
Add a dialog that shows when export completes
This commit is contained in:
@@ -7,18 +7,18 @@ UserControl "DiscordChatExporter.Views.ErrorDialog" {
|
||||
StackPanel {
|
||||
// Message
|
||||
TextBlock {
|
||||
Margin: 8
|
||||
Margin: 16
|
||||
FontSize: 16
|
||||
HorizontalAlignment: Center
|
||||
TextWrapping: WrapWithOverflow
|
||||
Text: bind Message
|
||||
}
|
||||
|
||||
// OK
|
||||
Button {
|
||||
Margin: 8
|
||||
Command: DialogHost.CloseDialogCommand
|
||||
Content: "OK"
|
||||
Margin: 8
|
||||
HorizontalAlignment: Right
|
||||
Style: resource dyn "MaterialDesignFlatButton"
|
||||
}
|
||||
}
|
||||
|
||||
37
DiscordChatExporter/Views/ExportDoneDialog.ammy
Normal file
37
DiscordChatExporter/Views/ExportDoneDialog.ammy
Normal file
@@ -0,0 +1,37 @@
|
||||
using MaterialDesignThemes.Wpf
|
||||
|
||||
UserControl "DiscordChatExporter.Views.ExportDoneDialog" {
|
||||
DataContext: bind ExportDoneViewModel from $resource Container
|
||||
Width: 250
|
||||
|
||||
StackPanel {
|
||||
// Message
|
||||
TextBlock {
|
||||
Margin: 16
|
||||
FontSize: 16
|
||||
TextWrapping: WrapWithOverflow
|
||||
Text: "Finished exporting chat log"
|
||||
}
|
||||
|
||||
// Buttons
|
||||
@StackPanelHorizontal {
|
||||
HorizontalAlignment: Right
|
||||
|
||||
// Open
|
||||
Button {
|
||||
Command: bind OpenCommand
|
||||
Content: "OPEN IT"
|
||||
Margin: 8
|
||||
Style: resource dyn "MaterialDesignFlatButton"
|
||||
}
|
||||
|
||||
// Dismiss
|
||||
Button {
|
||||
Command: DialogHost.CloseDialogCommand
|
||||
Content: "DISMISS"
|
||||
Margin: 8
|
||||
Style: resource dyn "MaterialDesignFlatButton"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
16
DiscordChatExporter/Views/ExportDoneDialog.ammy.cs
Normal file
16
DiscordChatExporter/Views/ExportDoneDialog.ammy.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DiscordChatExporter.Views
|
||||
{
|
||||
public partial class ExportDoneDialog
|
||||
{
|
||||
public ExportDoneDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ namespace DiscordChatExporter.Views
|
||||
|
||||
Messenger.Default.Register<ShowErrorMessage>(this, m => DialogHost.Show(new ErrorDialog()).Forget());
|
||||
Messenger.Default.Register<ShowSettingsMessage>(this, m => DialogHost.Show(new SettingsDialog()).Forget());
|
||||
Messenger.Default.Register<ShowExportDoneMessage>(this, m => DialogHost.Show(new ExportDoneDialog()).Forget());
|
||||
}
|
||||
|
||||
public void TokenTextBox_KeyDown(object sender, KeyEventArgs e)
|
||||
|
||||
@@ -7,9 +7,9 @@ UserControl "DiscordChatExporter.Views.SettingsDialog" {
|
||||
StackPanel {
|
||||
// Theme
|
||||
ComboBox {
|
||||
Margin: 16
|
||||
HintAssist.Hint: "Theme"
|
||||
HintAssist.IsFloating: true
|
||||
Margin: 8
|
||||
IsReadOnly: true
|
||||
ItemsSource: bind AvailableThemes
|
||||
SelectedItem: bind Theme
|
||||
@@ -17,9 +17,10 @@ UserControl "DiscordChatExporter.Views.SettingsDialog" {
|
||||
|
||||
// Save
|
||||
Button {
|
||||
Margin: 8
|
||||
Command: DialogHost.CloseDialogCommand
|
||||
Content: "SAVE"
|
||||
Margin: 8
|
||||
HorizontalAlignment: Right
|
||||
Style: resource dyn "MaterialDesignFlatButton"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user