Convert remaining files to file-scoped namespace
This commit is contained in:
@@ -4,16 +4,14 @@ using System.ComponentModel;
|
|||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace MayShow.Helpers
|
namespace MayShow.Helpers;
|
||||||
{
|
|
||||||
|
|
||||||
// https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.inotifypropertychanged?view=netframework-4.7.2
|
// https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.inotifypropertychanged?view=netframework-4.7.2
|
||||||
class ChangeNotifier : INotifyPropertyChanged
|
class ChangeNotifier : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
public event PropertyChangedEventHandler? PropertyChanged;
|
public event PropertyChangedEventHandler? PropertyChanged;
|
||||||
protected void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
|
protected void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
|
||||||
{
|
{
|
||||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace MayShow.ViewModels
|
namespace MayShow.ViewModels;
|
||||||
|
|
||||||
|
class BaseViewModel : ChangeNotifier
|
||||||
{
|
{
|
||||||
class BaseViewModel : ChangeNotifier
|
|
||||||
{
|
|
||||||
IChangeViewModel _viewModelChanger;
|
IChangeViewModel _viewModelChanger;
|
||||||
ITopLevelGrabber? _topLevelGrabber;
|
ITopLevelGrabber? _topLevelGrabber;
|
||||||
|
|
||||||
@@ -43,5 +43,4 @@ namespace MayShow.ViewModels
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace MayShow.ViewModels
|
namespace MayShow.ViewModels;
|
||||||
|
|
||||||
|
class MainWindowViewModel : ChangeNotifier, IChangeViewModel
|
||||||
{
|
{
|
||||||
class MainWindowViewModel : ChangeNotifier, IChangeViewModel
|
|
||||||
{
|
|
||||||
BaseViewModel _currentViewModel;
|
BaseViewModel _currentViewModel;
|
||||||
Stack<BaseViewModel> _viewModels;
|
Stack<BaseViewModel> _viewModels;
|
||||||
|
|
||||||
@@ -46,5 +46,4 @@ namespace MayShow.ViewModels
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
using MayShow.Helpers;
|
using MayShow.Helpers;
|
||||||
using MayShow.Models;
|
using MayShow.Models;
|
||||||
|
|
||||||
namespace MayShow.ViewModels
|
namespace MayShow.ViewModels;
|
||||||
|
|
||||||
|
class WarningDeleteItemViewModel : ChangeNotifier
|
||||||
{
|
{
|
||||||
class WarningDeleteItemViewModel : ChangeNotifier
|
|
||||||
{
|
|
||||||
ReportFile _file;
|
ReportFile _file;
|
||||||
|
|
||||||
public WarningDeleteItemViewModel(ReportFile file)
|
public WarningDeleteItemViewModel(ReportFile file)
|
||||||
@@ -27,5 +27,4 @@ namespace MayShow.ViewModels
|
|||||||
{
|
{
|
||||||
DialogHost.Close("DialogHost", true);
|
DialogHost.Close("DialogHost", true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ using Avalonia;
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace MayShow.Views
|
namespace MayShow.Views;
|
||||||
|
|
||||||
|
public partial class AboutView : UserControl
|
||||||
{
|
{
|
||||||
public partial class AboutView : UserControl
|
|
||||||
{
|
|
||||||
public AboutView()
|
public AboutView()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
@@ -35,5 +35,4 @@ namespace MayShow.Views
|
|||||||
}
|
}
|
||||||
LicenseTextBlock.Text = licenseText.Trim();
|
LicenseTextBlock.Text = licenseText.Trim();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,12 @@ using Avalonia;
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace MayShow.Views
|
namespace MayShow.Views;
|
||||||
|
|
||||||
|
public partial class EditFile : UserControl
|
||||||
{
|
{
|
||||||
public partial class EditFile : UserControl
|
|
||||||
{
|
|
||||||
public EditFile()
|
public EditFile()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ using Avalonia.Input;
|
|||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using MayShow.ViewModels;
|
using MayShow.ViewModels;
|
||||||
|
|
||||||
namespace MayShow.Views
|
namespace MayShow.Views;
|
||||||
|
|
||||||
|
public partial class MainView : UserControl
|
||||||
{
|
{
|
||||||
public partial class MainView : UserControl
|
|
||||||
{
|
|
||||||
public MainView()
|
public MainView()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
@@ -41,5 +41,4 @@ namespace MayShow.Views
|
|||||||
mvm?.HasUnsavedWork = true;
|
mvm?.HasUnsavedWork = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,12 @@ using Avalonia;
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace MayShow.Views
|
namespace MayShow.Views;
|
||||||
|
|
||||||
|
public partial class WarningDeleteItem : UserControl
|
||||||
{
|
{
|
||||||
public partial class WarningDeleteItem : UserControl
|
|
||||||
{
|
|
||||||
public WarningDeleteItem()
|
public WarningDeleteItem()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user