Skip to content

Commit d57a22c

Browse files
authored
Merge pull request #82 from tksh164/dev/small-refactor
Small refactoring
2 parents 07b7ff9 + a001b0d commit d57a22c

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/alter/ViewModels/Interfaces/IWindowClosing.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
{
33
internal interface IWindowClosing
44
{
5-
/// <summary>
6-
/// Implements logic to execute when the window is closing.
7-
/// </summary>
8-
/// <returns>true if the window closing should be canceled; otherwise, false.</returns>
95
public bool OnClosing();
106
}
117
}

src/alter/Views/MainWindow.xaml.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using System.Windows;
1+
using System;
2+
using System.ComponentModel;
3+
using System.Windows;
24
using Microsoft.Extensions.DependencyInjection;
35
using AlterApp.ViewModels.Interfaces;
46
using AlterApp.ViewModels;
@@ -16,15 +18,15 @@ public MainWindow()
1618
DataContext = App.Current.Services.GetService<MainWindowViewModel>();
1719
}
1820

19-
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
21+
private void Window_Closing(object sender, CancelEventArgs e)
2022
{
2123
if (DataContext is IWindowClosing dataContext)
2224
{
2325
e.Cancel = dataContext.OnClosing();
2426
}
2527
}
2628

27-
private void Window_ContentRendered(object sender, System.EventArgs e)
29+
private void Window_ContentRendered(object sender, EventArgs e)
2830
{
2931
if (DataContext is IWindowContentRendered dataContext)
3032
{

0 commit comments

Comments
 (0)