style: expand one-line summaries and run dotnet format solution-wide
This commit is contained in:
1 parent
9ea551b600
commit
8b7e50a955
95 files changed
+970
-1424
No files matched your search
@@ -1,50 +1,46 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
using YKanBan.ViewModels;
|
||||
using YKanBan.ViewModels.Dialogs;
|
||||
using YKanBan.Views.Dialogs;
|
||||
|
||||
namespace YKanBan.Views;
|
||||
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public partial class MainWindow : Window {
|
||||
private bool _interactionsRegistered;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
public MainWindow() {
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnDataContextChanged(EventArgs e)
|
||||
{
|
||||
protected override void OnDataContextChanged(EventArgs e) {
|
||||
base.OnDataContextChanged(e);
|
||||
if (DataContext is MainWindowViewModel viewModel && !_interactionsRegistered)
|
||||
{
|
||||
if (DataContext is MainWindowViewModel viewModel && !_interactionsRegistered) {
|
||||
_interactionsRegistered = true;
|
||||
viewModel.ShowSettings.RegisterHandler(ShowSettingsAsync);
|
||||
viewModel.ShowAbout.RegisterHandler(ShowAboutAsync);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Shows the settings dialog centered on this window.</summary>
|
||||
private async Task ShowSettingsAsync(Unit input)
|
||||
{
|
||||
if (App.Services is null)
|
||||
{
|
||||
/// <summary>
|
||||
/// Shows the settings dialog centered on this window.
|
||||
/// </summary>
|
||||
private async Task ShowSettingsAsync(Unit input) {
|
||||
if (App.Services is null) {
|
||||
return;
|
||||
}
|
||||
|
||||
var dialog = new SettingsDialog
|
||||
{
|
||||
var dialog = new SettingsDialog {
|
||||
DataContext = new SettingsDialogViewModel(App.Services.Config, App.StartupLanguage),
|
||||
};
|
||||
await dialog.ShowDialog(this);
|
||||
}
|
||||
|
||||
/// <summary>Shows the about dialog centered on this window.</summary>
|
||||
private async Task ShowAboutAsync(Unit input)
|
||||
{
|
||||
var dialog = new AboutDialog
|
||||
{
|
||||
/// <summary>
|
||||
/// Shows the about dialog centered on this window.
|
||||
/// </summary>
|
||||
private async Task ShowAboutAsync(Unit input) {
|
||||
var dialog = new AboutDialog {
|
||||
DataContext = new AboutDialogViewModel(),
|
||||
};
|
||||
await dialog.ShowDialog(this);
|
||||
|
||||
Reference in new issue
Block a user