From 857917aad5e4791ddebbeb58afcc0bde07b45c6e Mon Sep 17 00:00:00 2001 From: Markus Ewald Date: Tue, 3 Oct 2023 12:35:14 +0000 Subject: [PATCH] Added alternative .NET 4.6.2 project; MultiPageViewForm now has a default constructor just so it doesn't upset the Windows Forms designer git-svn-id: file:///srv/devel/repo-conversion/nuwi@57 d2e56fa2-650e-0410-a79f-9358c0239efd --- Nuclex.Windows.Forms (net-4.6).csproj | 186 ++++++++++++++++++++++++++ Source/Views/MultiPageViewForm.cs | 5 + Source/Views/ViewForm.cs | 24 ++-- 3 files changed, 203 insertions(+), 12 deletions(-) create mode 100644 Nuclex.Windows.Forms (net-4.6).csproj diff --git a/Nuclex.Windows.Forms (net-4.6).csproj b/Nuclex.Windows.Forms (net-4.6).csproj new file mode 100644 index 0000000..2c5fcb8 --- /dev/null +++ b/Nuclex.Windows.Forms (net-4.6).csproj @@ -0,0 +1,186 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {B2BFA3EC-3B7B-4EE0-8395-8426B5C7A8B8} + Library + Properties + Nuclex.Windows.Forms + Nuclex.Windows.Forms + v4.6.2 + 512 + + + + true + full + false + bin\net-4.0\Debug\ + TRACE;DEBUG;UNITTEST + prompt + 4 + bin\net-4.0\Debug\Nuclex.Windows.Forms.xml + false + + + pdbonly + true + bin\net-4.6\Release\ + TRACE;UNITTEST + prompt + 4 + bin\net-4.6\Release\Nuclex.Windows.Forms.xml + false + + + true + + + ..\Foundation.snk + + + + False + ..\References\nunit\net-4.0\framework\nunit.framework.dll + + + + + + + + + + + + + + + + + + + UserControl + + + ProgressSpinner.cs + + + + + + MessageEventArgs.cs + + + + + MessageText.cs + + + + + + DialogViewModel.cs + + + + + + ThreadedAction.cs + + + + ThreadedDialogViewModel.cs + + + + ThreadedViewModel.cs + + + + + + Form + + + UserControl + + + Form + + + + WindowManager.cs + + + ProgressSpinner.cs + + + ProgressReporterForm.cs + Designer + + + Component + + + AsyncProgressBar.cs + + + AsyncProgressBar.cs + + + Component + + + ContainerListView.cs + + + ContainerListView.cs + + + + Form + + + ProgressReporterForm.cs + + + Component + + + Component + + + TrackingBar.cs + + + + + Foundation.snk + + + + + + + + {2f487c4d-8e06-496f-bcd5-7119b18c78d8} + Nuclex.Support.Transactions %28net-4.6%29 + + + {00567408-4f44-4c00-866e-b04a99e482f2} + Nuclex.Support %28net-4.6%29 + + + + + \ No newline at end of file diff --git a/Source/Views/MultiPageViewForm.cs b/Source/Views/MultiPageViewForm.cs index a0ebf1f..611c833 100644 --- a/Source/Views/MultiPageViewForm.cs +++ b/Source/Views/MultiPageViewForm.cs @@ -59,6 +59,11 @@ namespace Nuclex.Windows.Forms.Views { #endregion // struct RedrawLockScope + /// Initializes a new multi page view window for the windows forms designer + public MultiPageViewForm() { + this.createViewMethod = typeof(IWindowManager).GetMethod(nameof(IWindowManager.CreateView)); + } + /// Initializes a new multi page view window /// /// Window manager that is used to set up the child views diff --git a/Source/Views/ViewForm.cs b/Source/Views/ViewForm.cs index 33daa65..88a3578 100644 --- a/Source/Views/ViewForm.cs +++ b/Source/Views/ViewForm.cs @@ -36,6 +36,18 @@ namespace Nuclex.Windows.Forms.Views { this.onViewModelPropertyChangedDelegate = OnViewModelPropertyChanged; } + /// Provides the data binding target for the view + public object DataContext { + get { return this.dataContext; } + set { + if(value != this.dataContext) { + object oldDataContext = this.dataContext; + this.dataContext = value; + OnDataContextChanged(this, oldDataContext, value); + } + } + } + /// Called when the window's data context is changed /// Window whose data context was changed /// Data context that was previously used @@ -67,18 +79,6 @@ namespace Nuclex.Windows.Forms.Views { object sender, PropertyChangedEventArgs arguments ) { } - /// Provides the data binding target for the view - public object DataContext { - get { return this.dataContext; } - set { - if(value != this.dataContext) { - object oldDataContext = this.dataContext; - this.dataContext = value; - OnDataContextChanged(this, oldDataContext, value); - } - } - } - /// Active data binding target, can be null private object dataContext; /// Delegate for the OnViewModelPropertyChanged() method