From 299829523ab0d3efce0c2b6f182f3caa62dfca76 Mon Sep 17 00:00:00 2001 From: tfreitasleal Date: Fri, 23 Feb 2018 13:34:37 +0000 Subject: [PATCH 01/15] Code cleanup. --- .../ErrorWarnInfoProvider.cs | 137 +++++++++--------- 1 file changed, 67 insertions(+), 70 deletions(-) diff --git a/trunk/Source/CslaContrib.Windows.Net45/ErrorWarnInfoProvider.cs b/trunk/Source/CslaContrib.Windows.Net45/ErrorWarnInfoProvider.cs index a43bdc6..078fe14 100644 --- a/trunk/Source/CslaContrib.Windows.Net45/ErrorWarnInfoProvider.cs +++ b/trunk/Source/CslaContrib.Windows.Net45/ErrorWarnInfoProvider.cs @@ -92,8 +92,8 @@ public class ErrorWarnInfoProvider : ErrorProvider, IExtenderProvider, ISupportI /// static ErrorWarnInfoProvider() { - DefaultIconInformation = CslaContrib.Windows.Properties.Resources.InformationIco16; - DefaultIconWarning = CslaContrib.Windows.Properties.Resources.WarningIco16; + DefaultIconInformation = Properties.Resources.InformationIco16; + DefaultIconWarning = Properties.Resources.WarningIco16; } /// @@ -101,9 +101,9 @@ static ErrorWarnInfoProvider() /// public ErrorWarnInfoProvider() { - this.components = new System.ComponentModel.Container(); - this._errorProviderInfo = new System.Windows.Forms.ErrorProvider(this.components); - this._errorProviderWarn = new System.Windows.Forms.ErrorProvider(this.components); + components = new Container(); + _errorProviderInfo = new ErrorProvider(components); + _errorProviderWarn = new ErrorProvider(components); BlinkRate = 0; _errorProviderInfo.BlinkRate = 0; @@ -129,9 +129,9 @@ public ErrorWarnInfoProvider(IContainer container) /// true to release both managed and unmanaged resources; false to release only unmanaged resources. protected override void Dispose(bool disposing) { - if (disposing && (components != null)) + if (disposing) { - components.Dispose(); + components?.Dispose(); } base.Dispose(disposing); } @@ -184,7 +184,7 @@ bool IExtenderProvider.CanExtend(object extendee) { if (value < 0) { - throw new ArgumentOutOfRangeException("BlinkRate", value, "Blink rate must be zero or more"); + throw new ArgumentOutOfRangeException(nameof(value), value, "Blink rate must be zero or more"); } base.BlinkRate = value; @@ -209,7 +209,7 @@ public int BlinkRateInformation set { if (value < 0) - throw new ArgumentOutOfRangeException("BlinkRateInformation", value, "Blink rate must be zero or more"); + throw new ArgumentOutOfRangeException(nameof(value), value, "Blink rate must be zero or more"); _errorProviderInfo.BlinkRate = value; @@ -233,7 +233,7 @@ public int BlinkRateWarning set { if (value < 0) - throw new ArgumentOutOfRangeException("BlinkRateWarning", value, "Blink rate must be zero or more"); + throw new ArgumentOutOfRangeException(nameof(value), value, "Blink rate must be zero or more"); _errorProviderWarn.BlinkRate = value; @@ -292,7 +292,7 @@ public ErrorBlinkStyle BlinkStyleWarning /// /// A data source based on the interface to be monitored for errors. Typically, this is a to be monitored for errors. /// - [DefaultValue((string) null)] + [DefaultValue(null)] public new object DataSource { get { return base.DataSource; } @@ -317,14 +317,14 @@ public ErrorBlinkStyle BlinkStyleWarning } } - private void UpdateBindingsAndProcessAllControls() + /*private void UpdateBindingsAndProcessAllControls() { if (ContainerControl != null) { InitializeAllControls(ContainerControl.Controls); } ProcessAllControls(); - } + }*/ /// /// Gets or sets the icon information. @@ -528,55 +528,52 @@ private void GetWarnInfoList() return; // we can only deal with CSLA BusinessBase objects - if (bs.Current is Csla.Core.BusinessBase) - { - // get the BusinessBase object - Csla.Core.BusinessBase bb = bs.Current as Csla.Core.BusinessBase; + // get the BusinessBase object + Csla.Core.BusinessBase bb = bs.Current as Csla.Core.BusinessBase; - if (bb != null) + if (bb != null) + { + foreach (Csla.Rules.BrokenRule br in bb.BrokenRulesCollection) { - foreach (Csla.Rules.BrokenRule br in bb.BrokenRulesCollection) + // we do not want to import result of object level broken rules + if (br.Property == null) + continue; + + switch (br.Severity) { - // we do not want to import result of object level broken rules - if (br.Property == null) - continue; - - switch (br.Severity) - { - case Csla.Rules.RuleSeverity.Error: - if (_errorList.ContainsKey(br.Property)) - { - _errorList[br.Property] = - String.Concat(_errorList[br.Property], Environment.NewLine, br.Description); - } - else - { - _errorList.Add(br.Property, br.Description); - } - break; - case Csla.Rules.RuleSeverity.Warning: - if (_warningList.ContainsKey(br.Property)) - { - _warningList[br.Property] = - String.Concat(_warningList[br.Property], Environment.NewLine, br.Description); - } - else - { - _warningList.Add(br.Property, br.Description); - } - break; - default: // consider it an Info - if (_infoList.ContainsKey(br.Property)) - { - _infoList[br.Property] = - String.Concat(_infoList[br.Property], Environment.NewLine, br.Description); - } - else - { - _infoList.Add(br.Property, br.Description); - } - break; - } + case Csla.Rules.RuleSeverity.Error: + if (_errorList.ContainsKey(br.Property)) + { + _errorList[br.Property] = + string.Concat(_errorList[br.Property], Environment.NewLine, br.Description); + } + else + { + _errorList.Add(br.Property, br.Description); + } + break; + case Csla.Rules.RuleSeverity.Warning: + if (_warningList.ContainsKey(br.Property)) + { + _warningList[br.Property] = + string.Concat(_warningList[br.Property], Environment.NewLine, br.Description); + } + else + { + _warningList.Add(br.Property, br.Description); + } + break; + default: // consider it an Info + if (_infoList.ContainsKey(br.Property)) + { + _infoList[br.Property] = + string.Concat(_infoList[br.Property], Environment.NewLine, br.Description); + } + else + { + _infoList.Add(br.Property, br.Description); + } + break; } } } @@ -597,7 +594,7 @@ private void ProcessControls() private void ProcessControl(Control control) { if (control == null) - throw new ArgumentNullException("control"); + throw new ArgumentNullException(nameof(control)); bool hasWarning = false; bool hasInfo = false; @@ -662,10 +659,10 @@ private void ProcessControl(Control control) { _errorProviderWarn.SetError(control, sbWarn.ToString()); _errorProviderWarn.SetIconPadding(control, - base.GetIconPadding(control) + + GetIconPadding(control) + offsetWarning); _errorProviderWarn.SetIconAlignment(control, - base.GetIconAlignment(control)); + GetIconAlignment(control)); hasWarning = true; } @@ -674,16 +671,16 @@ private void ProcessControl(Control control) { _errorProviderInfo.SetError(control, sbInfo.ToString()); _errorProviderInfo.SetIconPadding(control, - base.GetIconPadding(control) + + GetIconPadding(control) + offsetInformation); _errorProviderInfo.SetIconAlignment(control, - base.GetIconAlignment(control)); + GetIconAlignment(control)); hasInfo = true; } - if (!hasWarning) _errorProviderWarn.SetError((Control) control, string.Empty); - if (!hasInfo) _errorProviderInfo.SetError((Control) control, string.Empty); + if (!hasWarning) _errorProviderWarn.SetError(control, string.Empty); + if (!hasInfo) _errorProviderInfo.SetError(control, string.Empty); } private void ResetBlinkStyleInformation() @@ -710,7 +707,7 @@ private void ResetIconWarning() /// Sets the information description string for the specified control. /// /// The control to set the information description string for. - /// The information description string, or null or System.String.Empty to remove the information description. + /// The information description string, or null or System.string.Empty to remove the information description. public void SetInformation(Control control, string value) { _errorProviderInfo.SetError(control, value); @@ -720,7 +717,7 @@ public void SetInformation(Control control, string value) /// Sets the warning description string for the specified control. /// /// The control to set the warning description string for. - /// The warning description string, or null or System.String.Empty to remove the warning description. + /// The warning description string, or null or System.string.Empty to remove the warning description. public void SetWarning(Control control, string value) { _errorProviderWarn.SetError(control, value); @@ -769,9 +766,9 @@ void ISupportInitialize.BeginInit() void ISupportInitialize.EndInit() { _isInitializing = false; - if (this.ContainerControl != null) + if (ContainerControl != null) { - InitializeAllControls(this.ContainerControl.Controls); + InitializeAllControls(ContainerControl.Controls); } } From 3f210c2be44c3eaed0161292a21ecddd295e1fe0 Mon Sep 17 00:00:00 2001 From: tfreitasleal Date: Fri, 23 Feb 2018 17:01:24 +0000 Subject: [PATCH 02/15] Add ..editorconfig files --- trunk/samples/ActionExtenderSample/.editorconfig | 4 ++++ trunk/samples/MEFSamples/ObjectFactory/.editorconfig | 4 ++++ trunk/samples/MEFSamples/Repository/.editorconfig | 4 ++++ trunk/samples/ProjectTracker/.editorconfig | 4 ++++ trunk/samples/SmartDateExtendedParserSample/.editorconfig | 4 ++++ 5 files changed, 20 insertions(+) create mode 100644 trunk/samples/ActionExtenderSample/.editorconfig create mode 100644 trunk/samples/MEFSamples/ObjectFactory/.editorconfig create mode 100644 trunk/samples/MEFSamples/Repository/.editorconfig create mode 100644 trunk/samples/ProjectTracker/.editorconfig create mode 100644 trunk/samples/SmartDateExtendedParserSample/.editorconfig diff --git a/trunk/samples/ActionExtenderSample/.editorconfig b/trunk/samples/ActionExtenderSample/.editorconfig new file mode 100644 index 0000000..1aae7c6 --- /dev/null +++ b/trunk/samples/ActionExtenderSample/.editorconfig @@ -0,0 +1,4 @@ +[*] +end_of_line = crlf +indent_style = space +indent_size = 2 diff --git a/trunk/samples/MEFSamples/ObjectFactory/.editorconfig b/trunk/samples/MEFSamples/ObjectFactory/.editorconfig new file mode 100644 index 0000000..1aae7c6 --- /dev/null +++ b/trunk/samples/MEFSamples/ObjectFactory/.editorconfig @@ -0,0 +1,4 @@ +[*] +end_of_line = crlf +indent_style = space +indent_size = 2 diff --git a/trunk/samples/MEFSamples/Repository/.editorconfig b/trunk/samples/MEFSamples/Repository/.editorconfig new file mode 100644 index 0000000..1aae7c6 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/.editorconfig @@ -0,0 +1,4 @@ +[*] +end_of_line = crlf +indent_style = space +indent_size = 2 diff --git a/trunk/samples/ProjectTracker/.editorconfig b/trunk/samples/ProjectTracker/.editorconfig new file mode 100644 index 0000000..1aae7c6 --- /dev/null +++ b/trunk/samples/ProjectTracker/.editorconfig @@ -0,0 +1,4 @@ +[*] +end_of_line = crlf +indent_style = space +indent_size = 2 diff --git a/trunk/samples/SmartDateExtendedParserSample/.editorconfig b/trunk/samples/SmartDateExtendedParserSample/.editorconfig new file mode 100644 index 0000000..1aae7c6 --- /dev/null +++ b/trunk/samples/SmartDateExtendedParserSample/.editorconfig @@ -0,0 +1,4 @@ +[*] +end_of_line = crlf +indent_style = space +indent_size = 2 From 8b35d3e07b8ca0838e2ca659b86639fc7c423abc Mon Sep 17 00:00:00 2001 From: tfreitasleal Date: Fri, 23 Feb 2018 17:03:01 +0000 Subject: [PATCH 03/15] Add plain INotifyPropertyChanged sample. --- .../MEFSamples/Repository/MEFRepository.sln | 28 +++ .../Repository/MEFSample.UI.INPC/App.config | 14 ++ .../CustomerListForm.Designer.cs | 94 +++++++++ .../MEFSample.UI.INPC/CustomerListForm.cs | 40 ++++ .../MEFSample.UI.INPC/CustomerListForm.resx | 123 ++++++++++++ .../MEFSample.UI.INPC.csproj | 117 +++++++++++ .../MEFSample.UI.INPC/MenuForm.Designer.cs | 77 ++++++++ .../Repository/MEFSample.UI.INPC/MenuForm.cs | 34 ++++ .../MEFSample.UI.INPC/MenuForm.resx | 120 ++++++++++++ .../MEFSample.UI.INPC/MyRootForm.Designer.cs | 184 ++++++++++++++++++ .../MEFSample.UI.INPC/MyRootForm.cs | 33 ++++ .../MEFSample.UI.INPC/MyRootForm.resx | 151 ++++++++++++++ .../Repository/MEFSample.UI.INPC/Program.cs | 21 ++ .../Properties/AssemblyInfo.cs | 36 ++++ .../MEFSample.UI.INPC/packages.config | 6 + .../MEFSample.Business.MyRoot.datasource | 10 + 16 files changed, 1088 insertions(+) create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/App.config create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.Designer.cs create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.cs create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.resx create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MEFSample.UI.INPC.csproj create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.Designer.cs create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.cs create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.resx create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.Designer.cs create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.cs create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.resx create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Program.cs create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Properties/AssemblyInfo.cs create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/packages.config create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI/Properties/DataSources/MEFSample.Business.MyRoot.datasource diff --git a/trunk/samples/MEFSamples/Repository/MEFRepository.sln b/trunk/samples/MEFSamples/Repository/MEFRepository.sln index 10b22b1..b9b6ea0 100644 --- a/trunk/samples/MEFSamples/Repository/MEFRepository.sln +++ b/trunk/samples/MEFSamples/Repository/MEFRepository.sln @@ -19,6 +19,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "- Solution Items", "- Solut TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MEFSample.UI.INPC", "MEFSample.UI.INPC\MEFSample.UI.INPC.csproj", "{C6941E65-D72D-48D2-AF73-89DD24077979}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CslaContrib.Windows.Net45", "..\..\..\Source\CslaContrib.Windows.Net45\CslaContrib.Windows.Net45.csproj", "{0E0AA042-151E-4D59-A26D-4D262660E491}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -69,6 +73,30 @@ Global {AFF58DA2-C75C-4F48-BC4D-58F061AFBC8C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {AFF58DA2-C75C-4F48-BC4D-58F061AFBC8C}.Release|Mixed Platforms.Build.0 = Release|Any CPU {AFF58DA2-C75C-4F48-BC4D-58F061AFBC8C}.Release|x86.ActiveCfg = Release|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|x86.ActiveCfg = Debug|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|x86.Build.0 = Debug|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|Any CPU.Build.0 = Release|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|x86.ActiveCfg = Release|Any CPU + {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|x86.Build.0 = Release|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|x86.ActiveCfg = Debug|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|x86.Build.0 = Debug|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|Any CPU.Build.0 = Release|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|x86.ActiveCfg = Release|Any CPU + {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/App.config b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/App.config new file mode 100644 index 0000000..ae5761b --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/App.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.Designer.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.Designer.cs new file mode 100644 index 0000000..8ff04c7 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.Designer.cs @@ -0,0 +1,94 @@ +namespace MEFSample.UI +{ + partial class CustomerListForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.customerListBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.customerListDataGridView = new System.Windows.Forms.DataGridView(); + this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.customerListBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.customerListDataGridView)).BeginInit(); + this.SuspendLayout(); + // + // customerListBindingSource + // + this.customerListBindingSource.DataSource = typeof(MEFSample.Business.CustomerInfo); + // + // customerListDataGridView + // + this.customerListDataGridView.AutoGenerateColumns = false; + this.customerListDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.customerListDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.dataGridViewTextBoxColumn1, + this.dataGridViewTextBoxColumn2}); + this.customerListDataGridView.DataSource = this.customerListBindingSource; + this.customerListDataGridView.Location = new System.Drawing.Point(12, 12); + this.customerListDataGridView.Name = "customerListDataGridView"; + this.customerListDataGridView.Size = new System.Drawing.Size(581, 228); + this.customerListDataGridView.TabIndex = 1; + // + // dataGridViewTextBoxColumn1 + // + this.dataGridViewTextBoxColumn1.DataPropertyName = "Id"; + this.dataGridViewTextBoxColumn1.HeaderText = "Id"; + this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; + this.dataGridViewTextBoxColumn1.ReadOnly = true; + // + // dataGridViewTextBoxColumn2 + // + this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.dataGridViewTextBoxColumn2.DataPropertyName = "Name"; + this.dataGridViewTextBoxColumn2.HeaderText = "Name"; + this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; + this.dataGridViewTextBoxColumn2.ReadOnly = true; + // + // CustomerListForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(605, 252); + this.Controls.Add(this.customerListDataGridView); + this.Name = "CustomerListForm"; + this.Text = "CustomerListForm"; + this.Load += new System.EventHandler(this.CustomerListForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.customerListBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.customerListDataGridView)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.BindingSource customerListBindingSource; + private System.Windows.Forms.DataGridView customerListDataGridView; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; + } +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.cs new file mode 100644 index 0000000..e4686af --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using CslaContrib.Windows; +using MEFSample.Business; + +namespace MEFSample.UI +{ + public partial class CustomerListForm : Form + { + public CustomerListForm() + { + InitializeComponent(); + } + + private void CustomerListForm_Load(object sender, EventArgs e) + { + // fetch data async + CustomerList.BeginGetReadOnlyList(string.Empty, (o, ev) => + { + if (ev.Error != null) + { + MessageBox.Show(this, ev.Error.Message, "Error loading data", + MessageBoxButtons.OKCancel); + } + else + { + customerListBindingSource.Rebind(ev.Object); + } + + }); + } + + + } +} diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.resx b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.resx new file mode 100644 index 0000000..9475382 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/CustomerListForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MEFSample.UI.INPC.csproj b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MEFSample.UI.INPC.csproj new file mode 100644 index 0000000..7dec1eb --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MEFSample.UI.INPC.csproj @@ -0,0 +1,117 @@ + + + + + Debug + AnyCPU + {C6941E65-D72D-48D2-AF73-89DD24077979} + WinExe + Properties + MEFSample.UI + MEFSample.UI.INPC + v4.5 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\CSLA-Core.4.6.603\lib\net45\Csla.dll + True + + + ..\packages\CslaContrib-MEF.4.6.604\lib\net45\CslaContrib.MEF.dll + True + + + + + + + + + + + + + + + + Form + + + CustomerListForm.cs + + + Form + + + MenuForm.cs + + + Form + + + MyRootForm.cs + + + + + + + + + + + {0e0aa042-151e-4d59-a26d-4d262660e491} + CslaContrib.Windows.Net45 + + + {ae8e6f84-2f8f-4f9d-8d93-40b6c9fae18b} + MEFSample.Repository.Business + + + {d0be9790-ab6d-4d09-88bb-cc592071f4ae} + MEFSample.Repository.DAL + + + + + + + + CustomerListForm.cs + + + MenuForm.cs + + + MyRootForm.cs + + + + + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.Designer.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.Designer.cs new file mode 100644 index 0000000..84e6499 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.Designer.cs @@ -0,0 +1,77 @@ +namespace MEFSample.UI +{ + partial class MenuForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // button1 + // + this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button1.Location = new System.Drawing.Point(45, 35); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(189, 23); + this.button1.TabIndex = 0; + this.button1.Text = "Root data and validation"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button2.Location = new System.Drawing.Point(45, 100); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(189, 23); + this.button2.TabIndex = 1; + this.button2.Text = "Customer list"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // MenuForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(284, 161); + this.Controls.Add(this.button1); + this.Controls.Add(this.button2); + this.MinimumSize = new System.Drawing.Size(300, 200); + this.Name = "MenuForm"; + this.Text = "MenuForm"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + } +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.cs new file mode 100644 index 0000000..4b2d3f9 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace MEFSample.UI +{ + public partial class MenuForm : Form + { + public MenuForm() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + using (var form = new MyRootForm()) + { + form.ShowDialog(this); + } + } + + private void button2_Click(object sender, EventArgs e) + { + using (var form = new CustomerListForm()) + { + form.ShowDialog(this); + } + } + } +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.resx b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.Designer.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.Designer.cs new file mode 100644 index 0000000..18efe24 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.Designer.cs @@ -0,0 +1,184 @@ +namespace MEFSample.UI +{ + partial class MyRootForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.Label nameLabel; + System.Windows.Forms.Label num1Label; + System.Windows.Forms.Label num2Label; + System.Windows.Forms.Label sumLabel; + System.Windows.Forms.Label label1; + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MyRootForm)); + this.nameTextBox = new System.Windows.Forms.TextBox(); + this.num1TextBox = new System.Windows.Forms.TextBox(); + this.num2TextBox = new System.Windows.Forms.TextBox(); + this.sumTextBox = new System.Windows.Forms.TextBox(); + this.errorProvider1 = new CslaContrib.Windows.ErrorWarnInfoProvider(this.components); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + nameLabel = new System.Windows.Forms.Label(); + num1Label = new System.Windows.Forms.Label(); + num2Label = new System.Windows.Forms.Label(); + sumLabel = new System.Windows.Forms.Label(); + label1 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit(); + this.SuspendLayout(); + // + // nameLabel + // + nameLabel.AutoSize = true; + nameLabel.Location = new System.Drawing.Point(23, 61); + nameLabel.Name = "nameLabel"; + nameLabel.Size = new System.Drawing.Size(38, 13); + nameLabel.TabIndex = 3; + nameLabel.Text = "Name:"; + // + // num1Label + // + num1Label.AutoSize = true; + num1Label.Location = new System.Drawing.Point(23, 114); + num1Label.Name = "num1Label"; + num1Label.Size = new System.Drawing.Size(38, 13); + num1Label.TabIndex = 5; + num1Label.Text = "Num1:"; + // + // num2Label + // + num2Label.AutoSize = true; + num2Label.Location = new System.Drawing.Point(23, 140); + num2Label.Name = "num2Label"; + num2Label.Size = new System.Drawing.Size(38, 13); + num2Label.TabIndex = 7; + num2Label.Text = "Num2:"; + // + // sumLabel + // + sumLabel.AutoSize = true; + sumLabel.Location = new System.Drawing.Point(23, 166); + sumLabel.Name = "sumLabel"; + sumLabel.Size = new System.Drawing.Size(31, 13); + sumLabel.TabIndex = 9; + sumLabel.Text = "Sum:"; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(23, 35); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(19, 13); + label1.TabIndex = 12; + label1.Text = "Id:"; + // + // nameTextBox + // + this.nameTextBox.Location = new System.Drawing.Point(73, 58); + this.nameTextBox.Name = "nameTextBox"; + this.nameTextBox.Size = new System.Drawing.Size(104, 20); + this.nameTextBox.TabIndex = 4; + // + // num1TextBox + // + this.num1TextBox.Location = new System.Drawing.Point(73, 111); + this.num1TextBox.Name = "num1TextBox"; + this.num1TextBox.Size = new System.Drawing.Size(104, 20); + this.num1TextBox.TabIndex = 6; + // + // num2TextBox + // + this.num2TextBox.Location = new System.Drawing.Point(73, 137); + this.num2TextBox.Name = "num2TextBox"; + this.num2TextBox.Size = new System.Drawing.Size(104, 20); + this.num2TextBox.TabIndex = 8; + // + // sumTextBox + // + this.sumTextBox.Location = new System.Drawing.Point(73, 163); + this.sumTextBox.Name = "sumTextBox"; + this.sumTextBox.Size = new System.Drawing.Size(104, 20); + this.sumTextBox.TabIndex = 10; + // + // errorProvider1 + // + this.errorProvider1.ContainerControl = this; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(207, 34); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(262, 194); + this.textBox1.TabIndex = 11; + this.textBox1.Text = resources.GetString("textBox1.Text"); + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(73, 32); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(104, 20); + this.textBox2.TabIndex = 13; + // + // MyRootForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(490, 266); + this.Controls.Add(label1); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(nameLabel); + this.Controls.Add(this.nameTextBox); + this.Controls.Add(num1Label); + this.Controls.Add(this.num1TextBox); + this.Controls.Add(num2Label); + this.Controls.Add(this.num2TextBox); + this.Controls.Add(sumLabel); + this.Controls.Add(this.sumTextBox); + this.Name = "MyRootForm"; + this.Text = "Root Data"; + this.Load += new System.EventHandler(this.MyRootForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox nameTextBox; + private System.Windows.Forms.TextBox num1TextBox; + private System.Windows.Forms.TextBox num2TextBox; + private System.Windows.Forms.TextBox sumTextBox; + private CslaContrib.Windows.ErrorWarnInfoProvider errorProvider1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + + } +} + diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.cs new file mode 100644 index 0000000..97787a1 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.cs @@ -0,0 +1,33 @@ +using System; +using System.Windows.Forms; +using MEFSample.Business; + +namespace MEFSample.UI +{ + public partial class MyRootForm : Form + { + public MyRoot RootObject { get; set; } + + public MyRootForm() + { + InitializeComponent(); + } + + private void MyRootForm_Load(object sender, EventArgs e) + { + RootObject = MyRoot.GetRoot(5); + Rebind(); + } + + private void Rebind() + { + nameTextBox.DataBindings.Add(new Binding("Text", RootObject, "Name", true)); + num1TextBox.DataBindings.Add(new Binding("Text", RootObject, "Num1", true)); + num2TextBox.DataBindings.Add(new Binding("Text", RootObject, "Num2", true)); + sumTextBox.DataBindings.Add(new Binding("Text", RootObject, "Sum", true)); + textBox2.DataBindings.Add(new Binding("Text", RootObject, "Id", true)); + + errorProvider1.DataSource = RootObject; + } + } +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.resx b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.resx new file mode 100644 index 0000000..7c51009 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.resx @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + + False + + + False + + + False + + + False + + + 195, 17 + + + 17, 17 + + + 348, 17 + + + This sample show how you can combine DataAnnotations (Name Required) and BusinessRules (Name max 10 characters). + +The Sum field is automatically calculated in a custom rule and Dependency rules is used to automatically trigger the sum rule when one of the input fields is changed. + +There is also a custom general rule to check that Num1 is not larger than Num2 + + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Program.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Program.cs new file mode 100644 index 0000000..5a36afc --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace MEFSample.UI +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MenuForm()); + } + } +} diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Properties/AssemblyInfo.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..fd68f3d --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MEFSample.UI.INPC")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MEFSample.UI.INPC")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c6941e65-d72d-48d2-af73-89dd24077979")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/packages.config b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/packages.config new file mode 100644 index 0000000..d79a8d5 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/Properties/DataSources/MEFSample.Business.MyRoot.datasource b/trunk/samples/MEFSamples/Repository/MEFSample.UI/Properties/DataSources/MEFSample.Business.MyRoot.datasource new file mode 100644 index 0000000..ff69f1d --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/Properties/DataSources/MEFSample.Business.MyRoot.datasource @@ -0,0 +1,10 @@ + + + + MEFSample.Business.MyRoot, MEFSample.Business, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file From 646f53495a49888710c9e04bf2a532ee17c147a6 Mon Sep 17 00:00:00 2001 From: tfreitasleal Date: Fri, 23 Feb 2018 17:03:41 +0000 Subject: [PATCH 04/15] Change BusinessRules so they show Warning and Information also. --- .../Repository/MEFSample.Business/MyRoot.cs | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.Business/MyRoot.cs b/trunk/samples/MEFSamples/Repository/MEFSample.Business/MyRoot.cs index 8e363bc..70dadf0 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.Business/MyRoot.cs +++ b/trunk/samples/MEFSamples/Repository/MEFSample.Business/MyRoot.cs @@ -4,6 +4,7 @@ using System.ComponentModel.Composition.Hosting; using System.ComponentModel.DataAnnotations; using Csla; +using Csla.Rules; using Csla.Rules.CommonRules; using CslaContrib.MEF; using CslaContrib.Rules.CommonRules; @@ -18,6 +19,7 @@ public partial class MyRoot : MefBusinessBase #region Business Methods public static readonly PropertyInfo IdProperty = RegisterProperty(c => c.Id); + /// /// Gets or sets the Id value. /// @@ -28,7 +30,8 @@ public int Id } public static readonly PropertyInfo NameProperty = RegisterProperty(c => c.Name); - [Required] // Data Annotations rule for Required field + + [Required] // Data Annotations rule for Required field public string Name { get { return GetProperty(NameProperty); } @@ -36,14 +39,15 @@ public string Name } public static readonly PropertyInfo Num1Property = RegisterProperty(c => c.Num1); + public int Num1 { get { return GetProperty(Num1Property); } set { SetProperty(Num1Property, value); } } - [Range(1, 6000)] - public static readonly PropertyInfo Num2Property = RegisterProperty(c => c.Num2); + [Range(1, 6000)] public static readonly PropertyInfo Num2Property = RegisterProperty(c => c.Num2); + public int Num2 { get { return GetProperty(Num2Property); } @@ -51,6 +55,7 @@ public int Num2 } public static readonly PropertyInfo SumProperty = RegisterProperty(c => c.Sum); + public int Sum { get { return GetProperty(SumProperty); } @@ -66,15 +71,20 @@ protected override void AddBusinessRules() //// call base class implementation to add data annotation rules to BusinessRules base.AddBusinessRules(); - BusinessRules.AddRule(new MaxValue(Num1Property, 5000)); - BusinessRules.AddRule(new LessThan(Num1Property, Num2Property)); + BusinessRules.AddRule(new MaxValue(Num1Property, 5000) + { + Severity = RuleSeverity.Warning + }); + BusinessRules.AddRule(new GreaterThan(Num2Property, Num1Property) + { + Severity = RuleSeverity.Information + }); // calculates sum rule - must alwas un before MinValue with lower priority - BusinessRules.AddRule(new CalcSum(SumProperty, Num1Property, Num2Property) { Priority = -1 }); + BusinessRules.AddRule(new CalcSum(SumProperty, Num1Property, Num2Property) {Priority = -1}); BusinessRules.AddRule(new MinValue(SumProperty, 1)); // Name Property - //BusinessRules.AddRule(new Required(NameProperty)); BusinessRules.AddRule(new MaxLength(NameProperty, 10)); } @@ -92,14 +102,15 @@ public static MyRoot GetRoot(int id) return DataPortal.Fetch(id); } - public MyRoot() { } + public MyRoot() + { + } #endregion #region Injected properties - must have private field marked was NonSerialized and NotUndoable - [NonSerialized, NotUndoable] - private IRootDataAccess _myRootDataAccess; + [NonSerialized, NotUndoable] private IRootDataAccess _myRootDataAccess; [EditorBrowsable(EditorBrowsableState.Never)] [Import(typeof(IRootDataAccess))] @@ -112,6 +123,7 @@ private IRootDataAccess MyRootDataAccess #endregion #region Data Access + protected void DataPortal_Fetch(int criteria) { var data = MyRootDataAccess.Get(criteria); @@ -120,8 +132,10 @@ protected void DataPortal_Fetch(int criteria) Id = data.Id; Name = data.Name; } + MarkOld(); } + #endregion } -} +} \ No newline at end of file From 6ed87e0c84a470c56bef833c08cefa2c4d711c1d Mon Sep 17 00:00:00 2001 From: tfreitasleal Date: Fri, 23 Feb 2018 17:04:58 +0000 Subject: [PATCH 05/15] Use BindingSourceRefresh. --- .../Repository/MEFSample.UI/MEFSample.UI.csproj | 6 ++++++ .../Repository/MEFSample.UI/MyRootForm.Designer.cs | 13 +++++++++---- .../Repository/MEFSample.UI/MyRootForm.resx | 5 ++++- .../Repository/MEFSample.UI/packages.config | 1 + 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MEFSample.UI.csproj b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MEFSample.UI.csproj index 4fb8f37..470126c 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MEFSample.UI.csproj +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MEFSample.UI.csproj @@ -43,6 +43,10 @@ ..\packages\CSLA-Core.4.6.603\lib\net45\Csla.dll True + + ..\packages\CSLA-WindowsForms.4.6.603\lib\net45\Csla.Windows.dll + True + ..\packages\CslaContrib-MEF.4.6.604\lib\net45\CslaContrib.MEF.dll True @@ -92,6 +96,7 @@ + @@ -106,6 +111,7 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MEFSample.UI.INPC.csproj b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MEFSample.UI.INPC.csproj deleted file mode 100644 index 7dec1eb..0000000 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MEFSample.UI.INPC.csproj +++ /dev/null @@ -1,117 +0,0 @@ - - - - - Debug - AnyCPU - {C6941E65-D72D-48D2-AF73-89DD24077979} - WinExe - Properties - MEFSample.UI - MEFSample.UI.INPC - v4.5 - 512 - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\CSLA-Core.4.6.603\lib\net45\Csla.dll - True - - - ..\packages\CslaContrib-MEF.4.6.604\lib\net45\CslaContrib.MEF.dll - True - - - - - - - - - - - - - - - - Form - - - CustomerListForm.cs - - - Form - - - MenuForm.cs - - - Form - - - MyRootForm.cs - - - - - - - - - - - {0e0aa042-151e-4d59-a26d-4d262660e491} - CslaContrib.Windows.Net45 - - - {ae8e6f84-2f8f-4f9d-8d93-40b6c9fae18b} - MEFSample.Repository.Business - - - {d0be9790-ab6d-4d09-88bb-cc592071f4ae} - MEFSample.Repository.DAL - - - - - - - - CustomerListForm.cs - - - MenuForm.cs - - - MyRootForm.cs - - - - - \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.Designer.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.Designer.cs deleted file mode 100644 index 84e6499..0000000 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.Designer.cs +++ /dev/null @@ -1,77 +0,0 @@ -namespace MEFSample.UI -{ - partial class MenuForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // button1 - // - this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.button1.Location = new System.Drawing.Point(45, 35); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(189, 23); - this.button1.TabIndex = 0; - this.button1.Text = "Root data and validation"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // button2 - // - this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.button2.Location = new System.Drawing.Point(45, 100); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(189, 23); - this.button2.TabIndex = 1; - this.button2.Text = "Customer list"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // MenuForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(284, 161); - this.Controls.Add(this.button1); - this.Controls.Add(this.button2); - this.MinimumSize = new System.Drawing.Size(300, 200); - this.Name = "MenuForm"; - this.Text = "MenuForm"; - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button button2; - } -} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.cs deleted file mode 100644 index 4b2d3f9..0000000 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; - -namespace MEFSample.UI -{ - public partial class MenuForm : Form - { - public MenuForm() - { - InitializeComponent(); - } - - private void button1_Click(object sender, EventArgs e) - { - using (var form = new MyRootForm()) - { - form.ShowDialog(this); - } - } - - private void button2_Click(object sender, EventArgs e) - { - using (var form = new CustomerListForm()) - { - form.ShowDialog(this); - } - } - } -} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.resx b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.resx deleted file mode 100644 index 1af7de1..0000000 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MenuForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.Designer.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.Designer.cs deleted file mode 100644 index 18efe24..0000000 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.Designer.cs +++ /dev/null @@ -1,184 +0,0 @@ -namespace MEFSample.UI -{ - partial class MyRootForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.Windows.Forms.Label nameLabel; - System.Windows.Forms.Label num1Label; - System.Windows.Forms.Label num2Label; - System.Windows.Forms.Label sumLabel; - System.Windows.Forms.Label label1; - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MyRootForm)); - this.nameTextBox = new System.Windows.Forms.TextBox(); - this.num1TextBox = new System.Windows.Forms.TextBox(); - this.num2TextBox = new System.Windows.Forms.TextBox(); - this.sumTextBox = new System.Windows.Forms.TextBox(); - this.errorProvider1 = new CslaContrib.Windows.ErrorWarnInfoProvider(this.components); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.textBox2 = new System.Windows.Forms.TextBox(); - nameLabel = new System.Windows.Forms.Label(); - num1Label = new System.Windows.Forms.Label(); - num2Label = new System.Windows.Forms.Label(); - sumLabel = new System.Windows.Forms.Label(); - label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit(); - this.SuspendLayout(); - // - // nameLabel - // - nameLabel.AutoSize = true; - nameLabel.Location = new System.Drawing.Point(23, 61); - nameLabel.Name = "nameLabel"; - nameLabel.Size = new System.Drawing.Size(38, 13); - nameLabel.TabIndex = 3; - nameLabel.Text = "Name:"; - // - // num1Label - // - num1Label.AutoSize = true; - num1Label.Location = new System.Drawing.Point(23, 114); - num1Label.Name = "num1Label"; - num1Label.Size = new System.Drawing.Size(38, 13); - num1Label.TabIndex = 5; - num1Label.Text = "Num1:"; - // - // num2Label - // - num2Label.AutoSize = true; - num2Label.Location = new System.Drawing.Point(23, 140); - num2Label.Name = "num2Label"; - num2Label.Size = new System.Drawing.Size(38, 13); - num2Label.TabIndex = 7; - num2Label.Text = "Num2:"; - // - // sumLabel - // - sumLabel.AutoSize = true; - sumLabel.Location = new System.Drawing.Point(23, 166); - sumLabel.Name = "sumLabel"; - sumLabel.Size = new System.Drawing.Size(31, 13); - sumLabel.TabIndex = 9; - sumLabel.Text = "Sum:"; - // - // label1 - // - label1.AutoSize = true; - label1.Location = new System.Drawing.Point(23, 35); - label1.Name = "label1"; - label1.Size = new System.Drawing.Size(19, 13); - label1.TabIndex = 12; - label1.Text = "Id:"; - // - // nameTextBox - // - this.nameTextBox.Location = new System.Drawing.Point(73, 58); - this.nameTextBox.Name = "nameTextBox"; - this.nameTextBox.Size = new System.Drawing.Size(104, 20); - this.nameTextBox.TabIndex = 4; - // - // num1TextBox - // - this.num1TextBox.Location = new System.Drawing.Point(73, 111); - this.num1TextBox.Name = "num1TextBox"; - this.num1TextBox.Size = new System.Drawing.Size(104, 20); - this.num1TextBox.TabIndex = 6; - // - // num2TextBox - // - this.num2TextBox.Location = new System.Drawing.Point(73, 137); - this.num2TextBox.Name = "num2TextBox"; - this.num2TextBox.Size = new System.Drawing.Size(104, 20); - this.num2TextBox.TabIndex = 8; - // - // sumTextBox - // - this.sumTextBox.Location = new System.Drawing.Point(73, 163); - this.sumTextBox.Name = "sumTextBox"; - this.sumTextBox.Size = new System.Drawing.Size(104, 20); - this.sumTextBox.TabIndex = 10; - // - // errorProvider1 - // - this.errorProvider1.ContainerControl = this; - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(207, 34); - this.textBox1.Multiline = true; - this.textBox1.Name = "textBox1"; - this.textBox1.ReadOnly = true; - this.textBox1.Size = new System.Drawing.Size(262, 194); - this.textBox1.TabIndex = 11; - this.textBox1.Text = resources.GetString("textBox1.Text"); - // - // textBox2 - // - this.textBox2.Location = new System.Drawing.Point(73, 32); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(104, 20); - this.textBox2.TabIndex = 13; - // - // MyRootForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(490, 266); - this.Controls.Add(label1); - this.Controls.Add(this.textBox2); - this.Controls.Add(this.textBox1); - this.Controls.Add(nameLabel); - this.Controls.Add(this.nameTextBox); - this.Controls.Add(num1Label); - this.Controls.Add(this.num1TextBox); - this.Controls.Add(num2Label); - this.Controls.Add(this.num2TextBox); - this.Controls.Add(sumLabel); - this.Controls.Add(this.sumTextBox); - this.Name = "MyRootForm"; - this.Text = "Root Data"; - this.Load += new System.EventHandler(this.MyRootForm_Load); - ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox nameTextBox; - private System.Windows.Forms.TextBox num1TextBox; - private System.Windows.Forms.TextBox num2TextBox; - private System.Windows.Forms.TextBox sumTextBox; - private CslaContrib.Windows.ErrorWarnInfoProvider errorProvider1; - private System.Windows.Forms.TextBox textBox1; - private System.Windows.Forms.TextBox textBox2; - - } -} - diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.cs deleted file mode 100644 index 97787a1..0000000 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Windows.Forms; -using MEFSample.Business; - -namespace MEFSample.UI -{ - public partial class MyRootForm : Form - { - public MyRoot RootObject { get; set; } - - public MyRootForm() - { - InitializeComponent(); - } - - private void MyRootForm_Load(object sender, EventArgs e) - { - RootObject = MyRoot.GetRoot(5); - Rebind(); - } - - private void Rebind() - { - nameTextBox.DataBindings.Add(new Binding("Text", RootObject, "Name", true)); - num1TextBox.DataBindings.Add(new Binding("Text", RootObject, "Num1", true)); - num2TextBox.DataBindings.Add(new Binding("Text", RootObject, "Num2", true)); - sumTextBox.DataBindings.Add(new Binding("Text", RootObject, "Sum", true)); - textBox2.DataBindings.Add(new Binding("Text", RootObject, "Id", true)); - - errorProvider1.DataSource = RootObject; - } - } -} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.resx b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.resx deleted file mode 100644 index 7c51009..0000000 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/MyRootForm.resx +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - - False - - - False - - - False - - - False - - - 195, 17 - - - 17, 17 - - - 348, 17 - - - This sample show how you can combine DataAnnotations (Name Required) and BusinessRules (Name max 10 characters). - -The Sum field is automatically calculated in a custom rule and Dependency rules is used to automatically trigger the sum rule when one of the input fields is changed. - -There is also a custom general rule to check that Num1 is not larger than Num2 - - \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Program.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Program.cs deleted file mode 100644 index 5a36afc..0000000 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Program.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Forms; - -namespace MEFSample.UI -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new MenuForm()); - } - } -} diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Properties/AssemblyInfo.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Properties/AssemblyInfo.cs deleted file mode 100644 index fd68f3d..0000000 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MEFSample.UI.INPC")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MEFSample.UI.INPC")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c6941e65-d72d-48d2-af73-89dd24077979")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/packages.config b/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/packages.config deleted file mode 100644 index d79a8d5..0000000 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI.INPC/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From cdb8a65bbc8b9f5563c5cd7959f3027fe49a8c5f Mon Sep 17 00:00:00 2001 From: tfreitasleal Date: Sat, 24 Feb 2018 12:33:14 +0000 Subject: [PATCH 13/15] Reorganize samples: Rename BindingSource form. Add form for INPC. Update dependencies to version 4.6.605. --- .../MEFSample.Factory.Business.csproj | 4 +- .../MEFSample.Business/packages.config | 2 +- .../MEFSample.UI/CustomerListForm.cs | 32 ++- .../MEFSample.UI/MEFFactory.UI.csproj | 31 ++- .../MEFSample.UI/MenuForm.Designer.cs | 81 ++++---- .../ObjectFactory/MEFSample.UI/MenuForm.cs | 31 +-- .../MyRootBindingSource.Designer.cs} | 10 +- .../{MyRootForm.cs => MyRootBindingSource.cs} | 6 +- ...RootForm.resx => MyRootBindingSource.resx} | 0 .../MyRootNotifyPropertyChanged.Designer.cs | 184 ++++++++++++++++++ .../MyRootNotifyPropertyChanged.cs | 33 ++++ .../MyRootNotifyPropertyChanged.resx | 151 ++++++++++++++ .../MEFSample.UI/packages.config | 5 +- .../MEFSamples/Repository/MEFRepository.sln | 28 --- .../MEFSample.Repository.Business.csproj | 8 +- .../MEFSample.Business/packages.config | 4 +- ...MEFSample.Respository.Business.Test.csproj | 4 +- .../packages.config | 2 +- .../MEFSample.UI/CustomerListForm.cs | 32 ++- .../MEFSample.UI/MEFSample.UI.csproj | 27 ++- .../MEFSample.UI/MenuForm.Designer.cs | 74 ++++--- .../Repository/MEFSample.UI/MenuForm.cs | 31 +-- .../MyRootBindingSource.Designer.cs} | 21 +- .../{MyRootForm.cs => MyRootBindingSource.cs} | 6 +- ...RootForm.resx => MyRootBindingSource.resx} | 0 .../MyRootNotifyPropertyChanged.Designer.cs | 184 ++++++++++++++++++ .../MyRootNotifyPropertyChanged.cs | 33 ++++ .../MyRootNotifyPropertyChanged.resx | 151 ++++++++++++++ .../Repository/MEFSample.UI/packages.config | 4 +- 29 files changed, 971 insertions(+), 208 deletions(-) rename trunk/samples/MEFSamples/{Repository/MEFSample.UI/MyRootForm.Designer.cs => ObjectFactory/MEFSample.UI/MyRootBindingSource.Designer.cs} (97%) rename trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/{MyRootForm.cs => MyRootBindingSource.cs} (77%) rename trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/{MyRootForm.resx => MyRootBindingSource.resx} (100%) create mode 100644 trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.Designer.cs create mode 100644 trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.cs create mode 100644 trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.resx rename trunk/samples/MEFSamples/{ObjectFactory/MEFSample.UI/MyRootForm.Designer.cs => Repository/MEFSample.UI/MyRootBindingSource.Designer.cs} (90%) rename trunk/samples/MEFSamples/Repository/MEFSample.UI/{MyRootForm.cs => MyRootBindingSource.cs} (77%) rename trunk/samples/MEFSamples/Repository/MEFSample.UI/{MyRootForm.resx => MyRootBindingSource.resx} (100%) create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.Designer.cs create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.cs create mode 100644 trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.resx diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.Business/MEFSample.Factory.Business.csproj b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.Business/MEFSample.Factory.Business.csproj index aff6422..199e3c0 100644 --- a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.Business/MEFSample.Factory.Business.csproj +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.Business/MEFSample.Factory.Business.csproj @@ -41,8 +41,8 @@ ..\packages\CSLA-Core.4.6.603\lib\net45\Csla.dll True - - ..\packages\CslaContrib.4.6.604\lib\net45\CslaContrib.dll + + ..\packages\CslaContrib.4.6.605\lib\net45\CslaContrib.dll True diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.Business/packages.config b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.Business/packages.config index e4ac771..4726fc1 100644 --- a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.Business/packages.config +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.Business/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/CustomerListForm.cs b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/CustomerListForm.cs index e4686af..2082adf 100644 --- a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/CustomerListForm.cs +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/CustomerListForm.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; using CslaContrib.Windows; using MEFSample.Business; @@ -21,20 +16,17 @@ private void CustomerListForm_Load(object sender, EventArgs e) { // fetch data async CustomerList.BeginGetReadOnlyList(string.Empty, (o, ev) => - { - if (ev.Error != null) - { - MessageBox.Show(this, ev.Error.Message, "Error loading data", - MessageBoxButtons.OKCancel); - } - else - { - customerListBindingSource.Rebind(ev.Object); - } - - }); + { + if (ev.Error != null) + { + MessageBox.Show(this, ev.Error.Message, "Error loading data", + MessageBoxButtons.OKCancel); + } + else + { + customerListBindingSource.Rebind(ev.Object); + } + }); } - - } -} +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MEFFactory.UI.csproj b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MEFFactory.UI.csproj index 27c0e59..7c98851 100644 --- a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MEFFactory.UI.csproj +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MEFFactory.UI.csproj @@ -43,12 +43,16 @@ ..\packages\CSLA-Core.4.6.603\lib\net45\Csla.dll True - - ..\packages\CslaContrib-MEF.4.6.604\lib\net45\CslaContrib.MEF.dll + + ..\packages\CSLA-WindowsForms.4.6.603\lib\net45\Csla.Windows.dll True - - ..\packages\CslaContrib-Windows.4.6.604\lib\net45\CslaContrib.Windows.dll + + ..\packages\CslaContrib-MEF.4.6.605\lib\net45\CslaContrib.MEF.dll + True + + + ..\packages\CslaContrib-Windows.4.6.605\lib\net45\CslaContrib.Windows.dll True @@ -73,11 +77,17 @@ MenuForm.cs - + + Form + + + MyRootBindingSource.cs + + Form - - MyRootForm.cs + + MyRootNotifyPropertyChanged.cs @@ -87,8 +97,11 @@ MenuForm.cs - - MyRootForm.cs + + MyRootBindingSource.cs + + + MyRootNotifyPropertyChanged.cs ResXFileCodeGenerator diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MenuForm.Designer.cs b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MenuForm.Designer.cs index 4478548..c5f6fe3 100644 --- a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MenuForm.Designer.cs +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MenuForm.Designer.cs @@ -28,60 +28,69 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.flowLayoutPanel1.SuspendLayout(); + this.myRootBindingSource = new System.Windows.Forms.Button(); + this.myRootNotifyPropertyChanged = new System.Windows.Forms.Button(); + this.customerList = new System.Windows.Forms.Button(); this.SuspendLayout(); // - // flowLayoutPanel1 + // myRootBindingSource // - this.flowLayoutPanel1.Controls.Add(this.button1); - this.flowLayoutPanel1.Controls.Add(this.button2); - this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(192, 643); - this.flowLayoutPanel1.TabIndex = 0; + this.myRootBindingSource.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.myRootBindingSource.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.myRootBindingSource.Location = new System.Drawing.Point(45, 35); + this.myRootBindingSource.Name = "myRootBindingSource"; + this.myRootBindingSource.Size = new System.Drawing.Size(289, 50); + this.myRootBindingSource.TabIndex = 0; + this.myRootBindingSource.Text = "Root data and validation\r\nBinding Source"; + this.myRootBindingSource.UseVisualStyleBackColor = true; + this.myRootBindingSource.Click += new System.EventHandler(this.myRootBindingSource_Click); // - // button1 + // myRootNotifyPropertyChanged // - this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.button1.Location = new System.Drawing.Point(3, 3); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(189, 23); - this.button1.TabIndex = 0; - this.button1.Text = "Root data and validation"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); + this.myRootNotifyPropertyChanged.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.myRootNotifyPropertyChanged.Location = new System.Drawing.Point(45, 124); + this.myRootNotifyPropertyChanged.Name = "myRootNotifyPropertyChanged"; + this.myRootNotifyPropertyChanged.Size = new System.Drawing.Size(289, 50); + this.myRootNotifyPropertyChanged.TabIndex = 1; + this.myRootNotifyPropertyChanged.Text = "Root data and validation\r\nINotifyPropertyChanged"; + this.myRootNotifyPropertyChanged.UseVisualStyleBackColor = true; + this.myRootNotifyPropertyChanged.Click += new System.EventHandler(this.myRootNotifyPropertyChanged_Click); // - // button2 + // customerList // - this.button2.Location = new System.Drawing.Point(3, 32); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(189, 23); - this.button2.TabIndex = 1; - this.button2.Text = "Customer list"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); + this.customerList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.customerList.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.customerList.Location = new System.Drawing.Point(45, 213); + this.customerList.Name = "customerList"; + this.customerList.Size = new System.Drawing.Size(289, 50); + this.customerList.TabIndex = 2; + this.customerList.Text = "Customer List"; + this.customerList.UseVisualStyleBackColor = true; + this.customerList.Click += new System.EventHandler(this.customerList_Click); // // MenuForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(192, 643); - this.Controls.Add(this.flowLayoutPanel1); + this.ClientSize = new System.Drawing.Size(384, 309); + this.Controls.Add(this.customerList); + this.Controls.Add(this.myRootBindingSource); + this.Controls.Add(this.myRootNotifyPropertyChanged); + this.MinimumSize = new System.Drawing.Size(300, 200); this.Name = "MenuForm"; - this.Text = "MenuForm"; - this.flowLayoutPanel1.ResumeLayout(false); + this.Text = "Menu Form MEF Object Factory"; this.ResumeLayout(false); } #endregion - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button myRootBindingSource; + private System.Windows.Forms.Button myRootNotifyPropertyChanged; + private System.Windows.Forms.Button customerList; + } } \ No newline at end of file diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MenuForm.cs b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MenuForm.cs index 4bc2c01..c7e2fc3 100644 --- a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MenuForm.cs +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MenuForm.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace MEFSample.UI @@ -15,16 +10,28 @@ public MenuForm() InitializeComponent(); } - private void button1_Click(object sender, EventArgs e) + private void myRootBindingSource_Click(object sender, EventArgs e) { - var form = new MyRootForm(); - form.ShowDialog(this); + using (var form = new MyRootBindingSource()) + { + form.ShowDialog(this); + } } - private void button2_Click(object sender, EventArgs e) + private void myRootNotifyPropertyChanged_Click(object sender, EventArgs e) { - var form = new CustomerListForm(); - form.ShowDialog(this); + using (var form = new MyRootNotifyPropertyChanged()) + { + form.ShowDialog(this); + } + } + + private void customerList_Click(object sender, EventArgs e) + { + using (var form = new CustomerListForm()) + { + form.ShowDialog(this); + } } } -} +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootForm.Designer.cs b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootBindingSource.Designer.cs similarity index 97% rename from trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootForm.Designer.cs rename to trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootBindingSource.Designer.cs index 600806f..0a0b3a2 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootForm.Designer.cs +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootBindingSource.Designer.cs @@ -1,6 +1,6 @@ namespace MEFSample.UI { - partial class MyRootForm + partial class MyRootBindingSource { /// /// Required designer variable. @@ -34,7 +34,7 @@ private void InitializeComponent() System.Windows.Forms.Label num2Label; System.Windows.Forms.Label sumLabel; System.Windows.Forms.Label label1; - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MyRootForm)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MyRootBindingSource)); this.nameTextBox = new System.Windows.Forms.TextBox(); this.rootBindingSource = new System.Windows.Forms.BindingSource(this.components); this.num1TextBox = new System.Windows.Forms.TextBox(); @@ -159,7 +159,7 @@ private void InitializeComponent() this.textBox2.Size = new System.Drawing.Size(104, 20); this.textBox2.TabIndex = 13; // - // MyRootForm + // MyRootBindingSource // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; @@ -175,8 +175,8 @@ private void InitializeComponent() this.Controls.Add(this.num2TextBox); this.Controls.Add(sumLabel); this.Controls.Add(this.sumTextBox); - this.Name = "MyRootForm"; - this.Text = "Root Data"; + this.Name = "MyRootBindingSource"; + this.Text = "Root Data BindingSource"; this.Load += new System.EventHandler(this.MyRootForm_Load); ((System.ComponentModel.ISupportInitialize)(this.rootBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit(); diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootForm.cs b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootBindingSource.cs similarity index 77% rename from trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootForm.cs rename to trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootBindingSource.cs index 67bc08a..59cc629 100644 --- a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootForm.cs +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootBindingSource.cs @@ -4,9 +4,9 @@ namespace MEFSample.UI { - public partial class MyRootForm : Form + public partial class MyRootBindingSource : Form { - public MyRootForm() + public MyRootBindingSource() { InitializeComponent(); } @@ -16,4 +16,4 @@ private void MyRootForm_Load(object sender, System.EventArgs e) rootBindingSource.Rebind(MyRoot.GetRoot()); } } -} +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootForm.resx b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootBindingSource.resx similarity index 100% rename from trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootForm.resx rename to trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootBindingSource.resx diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.Designer.cs b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.Designer.cs new file mode 100644 index 0000000..c599e4b --- /dev/null +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.Designer.cs @@ -0,0 +1,184 @@ +namespace MEFSample.UI +{ + partial class MyRootNotifyPropertyChanged + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.Label nameLabel; + System.Windows.Forms.Label num1Label; + System.Windows.Forms.Label num2Label; + System.Windows.Forms.Label sumLabel; + System.Windows.Forms.Label label1; + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MyRootNotifyPropertyChanged)); + this.nameTextBox = new System.Windows.Forms.TextBox(); + this.num1TextBox = new System.Windows.Forms.TextBox(); + this.num2TextBox = new System.Windows.Forms.TextBox(); + this.sumTextBox = new System.Windows.Forms.TextBox(); + this.errorProvider1 = new CslaContrib.Windows.ErrorWarnInfoProvider(this.components); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + nameLabel = new System.Windows.Forms.Label(); + num1Label = new System.Windows.Forms.Label(); + num2Label = new System.Windows.Forms.Label(); + sumLabel = new System.Windows.Forms.Label(); + label1 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit(); + this.SuspendLayout(); + // + // nameLabel + // + nameLabel.AutoSize = true; + nameLabel.Location = new System.Drawing.Point(23, 61); + nameLabel.Name = "nameLabel"; + nameLabel.Size = new System.Drawing.Size(38, 13); + nameLabel.TabIndex = 3; + nameLabel.Text = "Name:"; + // + // num1Label + // + num1Label.AutoSize = true; + num1Label.Location = new System.Drawing.Point(23, 114); + num1Label.Name = "num1Label"; + num1Label.Size = new System.Drawing.Size(38, 13); + num1Label.TabIndex = 5; + num1Label.Text = "Num1:"; + // + // num2Label + // + num2Label.AutoSize = true; + num2Label.Location = new System.Drawing.Point(23, 140); + num2Label.Name = "num2Label"; + num2Label.Size = new System.Drawing.Size(38, 13); + num2Label.TabIndex = 7; + num2Label.Text = "Num2:"; + // + // sumLabel + // + sumLabel.AutoSize = true; + sumLabel.Location = new System.Drawing.Point(23, 166); + sumLabel.Name = "sumLabel"; + sumLabel.Size = new System.Drawing.Size(31, 13); + sumLabel.TabIndex = 9; + sumLabel.Text = "Sum:"; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(23, 35); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(19, 13); + label1.TabIndex = 12; + label1.Text = "Id:"; + // + // nameTextBox + // + this.nameTextBox.Location = new System.Drawing.Point(73, 58); + this.nameTextBox.Name = "nameTextBox"; + this.nameTextBox.Size = new System.Drawing.Size(104, 20); + this.nameTextBox.TabIndex = 4; + // + // num1TextBox + // + this.num1TextBox.Location = new System.Drawing.Point(73, 111); + this.num1TextBox.Name = "num1TextBox"; + this.num1TextBox.Size = new System.Drawing.Size(104, 20); + this.num1TextBox.TabIndex = 6; + // + // num2TextBox + // + this.num2TextBox.Location = new System.Drawing.Point(73, 137); + this.num2TextBox.Name = "num2TextBox"; + this.num2TextBox.Size = new System.Drawing.Size(104, 20); + this.num2TextBox.TabIndex = 8; + // + // sumTextBox + // + this.sumTextBox.Location = new System.Drawing.Point(73, 163); + this.sumTextBox.Name = "sumTextBox"; + this.sumTextBox.Size = new System.Drawing.Size(104, 20); + this.sumTextBox.TabIndex = 10; + // + // errorProvider1 + // + this.errorProvider1.ContainerControl = this; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(207, 34); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(262, 194); + this.textBox1.TabIndex = 11; + this.textBox1.Text = resources.GetString("textBox1.Text"); + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(73, 32); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(104, 20); + this.textBox2.TabIndex = 13; + // + // MyRootNotifyPropertyChanged + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(490, 266); + this.Controls.Add(label1); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(nameLabel); + this.Controls.Add(this.nameTextBox); + this.Controls.Add(num1Label); + this.Controls.Add(this.num1TextBox); + this.Controls.Add(num2Label); + this.Controls.Add(this.num2TextBox); + this.Controls.Add(sumLabel); + this.Controls.Add(this.sumTextBox); + this.Name = "MyRootNotifyPropertyChanged"; + this.Text = "Root Data INotifyPropertyChanged"; + this.Load += new System.EventHandler(this.MyRootForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox nameTextBox; + private System.Windows.Forms.TextBox num1TextBox; + private System.Windows.Forms.TextBox num2TextBox; + private System.Windows.Forms.TextBox sumTextBox; + private CslaContrib.Windows.ErrorWarnInfoProvider errorProvider1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + + } +} + diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.cs b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.cs new file mode 100644 index 0000000..8f9974c --- /dev/null +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.cs @@ -0,0 +1,33 @@ +using System; +using System.Windows.Forms; +using MEFSample.Business; + +namespace MEFSample.UI +{ + public partial class MyRootNotifyPropertyChanged : Form + { + public MyRoot RootObject { get; set; } + + public MyRootNotifyPropertyChanged() + { + InitializeComponent(); + } + + private void MyRootForm_Load(object sender, EventArgs e) + { + RootObject = MyRoot.GetRoot(); + Rebind(); + } + + private void Rebind() + { + nameTextBox.DataBindings.Add(new Binding("Text", RootObject, "Name", true)); + num1TextBox.DataBindings.Add(new Binding("Text", RootObject, "Num1", true)); + num2TextBox.DataBindings.Add(new Binding("Text", RootObject, "Num2", true)); + sumTextBox.DataBindings.Add(new Binding("Text", RootObject, "Sum", true)); + textBox2.DataBindings.Add(new Binding("Text", RootObject, "Id", true)); + + errorProvider1.DataSource = RootObject; + } + } +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.resx b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.resx new file mode 100644 index 0000000..7c51009 --- /dev/null +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootNotifyPropertyChanged.resx @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + + False + + + False + + + False + + + False + + + 195, 17 + + + 17, 17 + + + 348, 17 + + + This sample show how you can combine DataAnnotations (Name Required) and BusinessRules (Name max 10 characters). + +The Sum field is automatically calculated in a custom rule and Dependency rules is used to automatically trigger the sum rule when one of the input fields is changed. + +There is also a custom general rule to check that Num1 is not larger than Num2 + + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/packages.config b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/packages.config index d79a8d5..dc708ee 100644 --- a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/packages.config +++ b/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/packages.config @@ -1,6 +1,7 @@  - - + + + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFRepository.sln b/trunk/samples/MEFSamples/Repository/MEFRepository.sln index b9b6ea0..10b22b1 100644 --- a/trunk/samples/MEFSamples/Repository/MEFRepository.sln +++ b/trunk/samples/MEFSamples/Repository/MEFRepository.sln @@ -19,10 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "- Solution Items", "- Solut TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MEFSample.UI.INPC", "MEFSample.UI.INPC\MEFSample.UI.INPC.csproj", "{C6941E65-D72D-48D2-AF73-89DD24077979}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CslaContrib.Windows.Net45", "..\..\..\Source\CslaContrib.Windows.Net45\CslaContrib.Windows.Net45.csproj", "{0E0AA042-151E-4D59-A26D-4D262660E491}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -73,30 +69,6 @@ Global {AFF58DA2-C75C-4F48-BC4D-58F061AFBC8C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {AFF58DA2-C75C-4F48-BC4D-58F061AFBC8C}.Release|Mixed Platforms.Build.0 = Release|Any CPU {AFF58DA2-C75C-4F48-BC4D-58F061AFBC8C}.Release|x86.ActiveCfg = Release|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|x86.ActiveCfg = Debug|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Debug|x86.Build.0 = Debug|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|Any CPU.Build.0 = Release|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|x86.ActiveCfg = Release|Any CPU - {C6941E65-D72D-48D2-AF73-89DD24077979}.Release|x86.Build.0 = Release|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|x86.ActiveCfg = Debug|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Debug|x86.Build.0 = Debug|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|Any CPU.Build.0 = Release|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|x86.ActiveCfg = Release|Any CPU - {0E0AA042-151E-4D59-A26D-4D262660E491}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.Business/MEFSample.Repository.Business.csproj b/trunk/samples/MEFSamples/Repository/MEFSample.Business/MEFSample.Repository.Business.csproj index 7a70615..291ea2a 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.Business/MEFSample.Repository.Business.csproj +++ b/trunk/samples/MEFSamples/Repository/MEFSample.Business/MEFSample.Repository.Business.csproj @@ -41,12 +41,12 @@ ..\packages\CSLA-Core.4.6.603\lib\net45\Csla.dll True - - ..\packages\CslaContrib.4.6.604\lib\net45\CslaContrib.dll + + ..\packages\CslaContrib.4.6.605\lib\net45\CslaContrib.dll True - - ..\packages\CslaContrib-MEF.4.6.604\lib\net45\CslaContrib.MEF.dll + + ..\packages\CslaContrib-MEF.4.6.605\lib\net45\CslaContrib.MEF.dll True diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.Business/packages.config b/trunk/samples/MEFSamples/Repository/MEFSample.Business/packages.config index c564e30..42b13e3 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.Business/packages.config +++ b/trunk/samples/MEFSamples/Repository/MEFSample.Business/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.Respository.Business.Test/MEFSample.Respository.Business.Test.csproj b/trunk/samples/MEFSamples/Repository/MEFSample.Respository.Business.Test/MEFSample.Respository.Business.Test.csproj index 5873bd4..792deae 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.Respository.Business.Test/MEFSample.Respository.Business.Test.csproj +++ b/trunk/samples/MEFSamples/Repository/MEFSample.Respository.Business.Test/MEFSample.Respository.Business.Test.csproj @@ -43,8 +43,8 @@ ..\packages\CSLA-Core.4.6.603\lib\net45\Csla.dll True - - ..\packages\CslaContrib-MEF.4.6.604\lib\net45\CslaContrib.MEF.dll + + ..\packages\CslaContrib-MEF.4.6.605\lib\net45\CslaContrib.MEF.dll True diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.Respository.Business.Test/packages.config b/trunk/samples/MEFSamples/Repository/MEFSample.Respository.Business.Test/packages.config index 523176c..52cd836 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.Respository.Business.Test/packages.config +++ b/trunk/samples/MEFSamples/Repository/MEFSample.Respository.Business.Test/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/CustomerListForm.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI/CustomerListForm.cs index e4686af..2082adf 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI/CustomerListForm.cs +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/CustomerListForm.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; using CslaContrib.Windows; using MEFSample.Business; @@ -21,20 +16,17 @@ private void CustomerListForm_Load(object sender, EventArgs e) { // fetch data async CustomerList.BeginGetReadOnlyList(string.Empty, (o, ev) => - { - if (ev.Error != null) - { - MessageBox.Show(this, ev.Error.Message, "Error loading data", - MessageBoxButtons.OKCancel); - } - else - { - customerListBindingSource.Rebind(ev.Object); - } - - }); + { + if (ev.Error != null) + { + MessageBox.Show(this, ev.Error.Message, "Error loading data", + MessageBoxButtons.OKCancel); + } + else + { + customerListBindingSource.Rebind(ev.Object); + } + }); } - - } -} +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MEFSample.UI.csproj b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MEFSample.UI.csproj index 470126c..4d15f2d 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MEFSample.UI.csproj +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MEFSample.UI.csproj @@ -47,12 +47,12 @@ ..\packages\CSLA-WindowsForms.4.6.603\lib\net45\Csla.Windows.dll True - - ..\packages\CslaContrib-MEF.4.6.604\lib\net45\CslaContrib.MEF.dll + + ..\packages\CslaContrib-MEF.4.6.605\lib\net45\CslaContrib.MEF.dll True - - ..\packages\CslaContrib-Windows.4.6.604\lib\net45\CslaContrib.Windows.dll + + ..\packages\CslaContrib-Windows.4.6.605\lib\net45\CslaContrib.Windows.dll True @@ -70,11 +70,11 @@ CustomerListForm.cs - + Form - - MyRootForm.cs + + MyRootBindingSource.cs Form @@ -82,17 +82,26 @@ MenuForm.cs + + Form + + + MyRootNotifyPropertyChanged.cs + CustomerListForm.cs - - MyRootForm.cs + + MyRootBindingSource.cs MenuForm.cs + + MyRootNotifyPropertyChanged.cs + diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MenuForm.Designer.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MenuForm.Designer.cs index a0ff98b..8662a67 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MenuForm.Designer.cs +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MenuForm.Designer.cs @@ -28,49 +28,69 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); + this.myRootBindingSource = new System.Windows.Forms.Button(); + this.myRootNotifyPropertyChanged = new System.Windows.Forms.Button(); + this.customerList = new System.Windows.Forms.Button(); this.SuspendLayout(); // - // button1 + // myRootBindingSource // - this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.button1.Location = new System.Drawing.Point(45, 35); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(189, 23); - this.button1.TabIndex = 0; - this.button1.Text = "Root data and validation"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); + this.myRootBindingSource.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.myRootBindingSource.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.myRootBindingSource.Location = new System.Drawing.Point(45, 35); + this.myRootBindingSource.Name = "myRootBindingSource"; + this.myRootBindingSource.Size = new System.Drawing.Size(289, 50); + this.myRootBindingSource.TabIndex = 0; + this.myRootBindingSource.Text = "Root data and validation\r\nBinding Source"; + this.myRootBindingSource.UseVisualStyleBackColor = true; + this.myRootBindingSource.Click += new System.EventHandler(this.myRootBindingSource_Click); // - // button2 + // myRootNotifyPropertyChanged // - this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.button2.Location = new System.Drawing.Point(45, 100); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(189, 23); - this.button2.TabIndex = 1; - this.button2.Text = "Customer list"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); + this.myRootNotifyPropertyChanged.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.myRootNotifyPropertyChanged.Location = new System.Drawing.Point(45, 124); + this.myRootNotifyPropertyChanged.Name = "myRootNotifyPropertyChanged"; + this.myRootNotifyPropertyChanged.Size = new System.Drawing.Size(289, 50); + this.myRootNotifyPropertyChanged.TabIndex = 1; + this.myRootNotifyPropertyChanged.Text = "Root data and validation\r\nINotifyPropertyChanged"; + this.myRootNotifyPropertyChanged.UseVisualStyleBackColor = true; + this.myRootNotifyPropertyChanged.Click += new System.EventHandler(this.myRootNotifyPropertyChanged_Click); + // + // customerList + // + this.customerList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.customerList.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.customerList.Location = new System.Drawing.Point(45, 213); + this.customerList.Name = "customerList"; + this.customerList.Size = new System.Drawing.Size(289, 50); + this.customerList.TabIndex = 2; + this.customerList.Text = "Customer List"; + this.customerList.UseVisualStyleBackColor = true; + this.customerList.Click += new System.EventHandler(this.customerList_Click); // // MenuForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(284, 161); - this.Controls.Add(this.button1); - this.Controls.Add(this.button2); + this.ClientSize = new System.Drawing.Size(384, 309); + this.Controls.Add(this.customerList); + this.Controls.Add(this.myRootBindingSource); + this.Controls.Add(this.myRootNotifyPropertyChanged); this.MinimumSize = new System.Drawing.Size(300, 200); this.Name = "MenuForm"; - this.Text = "MenuForm"; + this.Text = "Menu Form MEF Repository"; this.ResumeLayout(false); } #endregion - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button button2; + + private System.Windows.Forms.Button myRootBindingSource; + private System.Windows.Forms.Button myRootNotifyPropertyChanged; + private System.Windows.Forms.Button customerList; + } } \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MenuForm.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MenuForm.cs index 4bc2c01..c7e2fc3 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MenuForm.cs +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MenuForm.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace MEFSample.UI @@ -15,16 +10,28 @@ public MenuForm() InitializeComponent(); } - private void button1_Click(object sender, EventArgs e) + private void myRootBindingSource_Click(object sender, EventArgs e) { - var form = new MyRootForm(); - form.ShowDialog(this); + using (var form = new MyRootBindingSource()) + { + form.ShowDialog(this); + } } - private void button2_Click(object sender, EventArgs e) + private void myRootNotifyPropertyChanged_Click(object sender, EventArgs e) { - var form = new CustomerListForm(); - form.ShowDialog(this); + using (var form = new MyRootNotifyPropertyChanged()) + { + form.ShowDialog(this); + } + } + + private void customerList_Click(object sender, EventArgs e) + { + using (var form = new CustomerListForm()) + { + form.ShowDialog(this); + } } } -} +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootForm.Designer.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootBindingSource.Designer.cs similarity index 90% rename from trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootForm.Designer.cs rename to trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootBindingSource.Designer.cs index 350db71..0a0b3a2 100644 --- a/trunk/samples/MEFSamples/ObjectFactory/MEFSample.UI/MyRootForm.Designer.cs +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootBindingSource.Designer.cs @@ -1,6 +1,6 @@ namespace MEFSample.UI { - partial class MyRootForm + partial class MyRootBindingSource { /// /// Required designer variable. @@ -34,15 +34,16 @@ private void InitializeComponent() System.Windows.Forms.Label num2Label; System.Windows.Forms.Label sumLabel; System.Windows.Forms.Label label1; - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MyRootForm)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MyRootBindingSource)); this.nameTextBox = new System.Windows.Forms.TextBox(); this.rootBindingSource = new System.Windows.Forms.BindingSource(this.components); this.num1TextBox = new System.Windows.Forms.TextBox(); this.num2TextBox = new System.Windows.Forms.TextBox(); this.sumTextBox = new System.Windows.Forms.TextBox(); - this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components); + this.errorProvider1 = new CslaContrib.Windows.ErrorWarnInfoProvider(this.components); this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); + this.bindingSourceRefresh1 = new Csla.Windows.BindingSourceRefresh(this.components); nameLabel = new System.Windows.Forms.Label(); num1Label = new System.Windows.Forms.Label(); num2Label = new System.Windows.Forms.Label(); @@ -50,6 +51,7 @@ private void InitializeComponent() label1 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.rootBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSourceRefresh1)).BeginInit(); this.SuspendLayout(); // // nameLabel @@ -108,6 +110,7 @@ private void InitializeComponent() // rootBindingSource // this.rootBindingSource.DataSource = typeof(MEFSample.Business.MyRoot); + this.bindingSourceRefresh1.SetReadValuesOnChange(this.rootBindingSource, true); // // num1TextBox // @@ -135,7 +138,6 @@ private void InitializeComponent() // // errorProvider1 // - this.errorProvider1.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink; this.errorProvider1.ContainerControl = this; this.errorProvider1.DataSource = this.rootBindingSource; // @@ -157,7 +159,7 @@ private void InitializeComponent() this.textBox2.Size = new System.Drawing.Size(104, 20); this.textBox2.TabIndex = 13; // - // MyRootForm + // MyRootBindingSource // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; @@ -173,11 +175,12 @@ private void InitializeComponent() this.Controls.Add(this.num2TextBox); this.Controls.Add(sumLabel); this.Controls.Add(this.sumTextBox); - this.Name = "MyRootForm"; - this.Text = "Form1"; + this.Name = "MyRootBindingSource"; + this.Text = "Root Data BindingSource"; this.Load += new System.EventHandler(this.MyRootForm_Load); ((System.ComponentModel.ISupportInitialize)(this.rootBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSourceRefresh1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -190,9 +193,11 @@ private void InitializeComponent() private System.Windows.Forms.TextBox num1TextBox; private System.Windows.Forms.TextBox num2TextBox; private System.Windows.Forms.TextBox sumTextBox; - private System.Windows.Forms.ErrorProvider errorProvider1; + private CslaContrib.Windows.ErrorWarnInfoProvider errorProvider1; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox textBox2; + private Csla.Windows.BindingSourceRefresh bindingSourceRefresh1; + } } diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootForm.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootBindingSource.cs similarity index 77% rename from trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootForm.cs rename to trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootBindingSource.cs index 286c928..d5a0c2f 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootForm.cs +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootBindingSource.cs @@ -4,9 +4,9 @@ namespace MEFSample.UI { - public partial class MyRootForm : Form + public partial class MyRootBindingSource : Form { - public MyRootForm() + public MyRootBindingSource() { InitializeComponent(); } @@ -16,4 +16,4 @@ private void MyRootForm_Load(object sender, System.EventArgs e) rootBindingSource.Rebind(MyRoot.GetRoot(5)); } } -} +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootForm.resx b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootBindingSource.resx similarity index 100% rename from trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootForm.resx rename to trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootBindingSource.resx diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.Designer.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.Designer.cs new file mode 100644 index 0000000..c599e4b --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.Designer.cs @@ -0,0 +1,184 @@ +namespace MEFSample.UI +{ + partial class MyRootNotifyPropertyChanged + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.Label nameLabel; + System.Windows.Forms.Label num1Label; + System.Windows.Forms.Label num2Label; + System.Windows.Forms.Label sumLabel; + System.Windows.Forms.Label label1; + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MyRootNotifyPropertyChanged)); + this.nameTextBox = new System.Windows.Forms.TextBox(); + this.num1TextBox = new System.Windows.Forms.TextBox(); + this.num2TextBox = new System.Windows.Forms.TextBox(); + this.sumTextBox = new System.Windows.Forms.TextBox(); + this.errorProvider1 = new CslaContrib.Windows.ErrorWarnInfoProvider(this.components); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + nameLabel = new System.Windows.Forms.Label(); + num1Label = new System.Windows.Forms.Label(); + num2Label = new System.Windows.Forms.Label(); + sumLabel = new System.Windows.Forms.Label(); + label1 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit(); + this.SuspendLayout(); + // + // nameLabel + // + nameLabel.AutoSize = true; + nameLabel.Location = new System.Drawing.Point(23, 61); + nameLabel.Name = "nameLabel"; + nameLabel.Size = new System.Drawing.Size(38, 13); + nameLabel.TabIndex = 3; + nameLabel.Text = "Name:"; + // + // num1Label + // + num1Label.AutoSize = true; + num1Label.Location = new System.Drawing.Point(23, 114); + num1Label.Name = "num1Label"; + num1Label.Size = new System.Drawing.Size(38, 13); + num1Label.TabIndex = 5; + num1Label.Text = "Num1:"; + // + // num2Label + // + num2Label.AutoSize = true; + num2Label.Location = new System.Drawing.Point(23, 140); + num2Label.Name = "num2Label"; + num2Label.Size = new System.Drawing.Size(38, 13); + num2Label.TabIndex = 7; + num2Label.Text = "Num2:"; + // + // sumLabel + // + sumLabel.AutoSize = true; + sumLabel.Location = new System.Drawing.Point(23, 166); + sumLabel.Name = "sumLabel"; + sumLabel.Size = new System.Drawing.Size(31, 13); + sumLabel.TabIndex = 9; + sumLabel.Text = "Sum:"; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(23, 35); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(19, 13); + label1.TabIndex = 12; + label1.Text = "Id:"; + // + // nameTextBox + // + this.nameTextBox.Location = new System.Drawing.Point(73, 58); + this.nameTextBox.Name = "nameTextBox"; + this.nameTextBox.Size = new System.Drawing.Size(104, 20); + this.nameTextBox.TabIndex = 4; + // + // num1TextBox + // + this.num1TextBox.Location = new System.Drawing.Point(73, 111); + this.num1TextBox.Name = "num1TextBox"; + this.num1TextBox.Size = new System.Drawing.Size(104, 20); + this.num1TextBox.TabIndex = 6; + // + // num2TextBox + // + this.num2TextBox.Location = new System.Drawing.Point(73, 137); + this.num2TextBox.Name = "num2TextBox"; + this.num2TextBox.Size = new System.Drawing.Size(104, 20); + this.num2TextBox.TabIndex = 8; + // + // sumTextBox + // + this.sumTextBox.Location = new System.Drawing.Point(73, 163); + this.sumTextBox.Name = "sumTextBox"; + this.sumTextBox.Size = new System.Drawing.Size(104, 20); + this.sumTextBox.TabIndex = 10; + // + // errorProvider1 + // + this.errorProvider1.ContainerControl = this; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(207, 34); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(262, 194); + this.textBox1.TabIndex = 11; + this.textBox1.Text = resources.GetString("textBox1.Text"); + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(73, 32); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(104, 20); + this.textBox2.TabIndex = 13; + // + // MyRootNotifyPropertyChanged + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(490, 266); + this.Controls.Add(label1); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(nameLabel); + this.Controls.Add(this.nameTextBox); + this.Controls.Add(num1Label); + this.Controls.Add(this.num1TextBox); + this.Controls.Add(num2Label); + this.Controls.Add(this.num2TextBox); + this.Controls.Add(sumLabel); + this.Controls.Add(this.sumTextBox); + this.Name = "MyRootNotifyPropertyChanged"; + this.Text = "Root Data INotifyPropertyChanged"; + this.Load += new System.EventHandler(this.MyRootForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox nameTextBox; + private System.Windows.Forms.TextBox num1TextBox; + private System.Windows.Forms.TextBox num2TextBox; + private System.Windows.Forms.TextBox sumTextBox; + private CslaContrib.Windows.ErrorWarnInfoProvider errorProvider1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + + } +} + diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.cs b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.cs new file mode 100644 index 0000000..1ae7649 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.cs @@ -0,0 +1,33 @@ +using System; +using System.Windows.Forms; +using MEFSample.Business; + +namespace MEFSample.UI +{ + public partial class MyRootNotifyPropertyChanged : Form + { + public MyRoot RootObject { get; set; } + + public MyRootNotifyPropertyChanged() + { + InitializeComponent(); + } + + private void MyRootForm_Load(object sender, EventArgs e) + { + RootObject = MyRoot.GetRoot(5); + Rebind(); + } + + private void Rebind() + { + nameTextBox.DataBindings.Add(new Binding("Text", RootObject, "Name", true)); + num1TextBox.DataBindings.Add(new Binding("Text", RootObject, "Num1", true)); + num2TextBox.DataBindings.Add(new Binding("Text", RootObject, "Num2", true)); + sumTextBox.DataBindings.Add(new Binding("Text", RootObject, "Sum", true)); + textBox2.DataBindings.Add(new Binding("Text", RootObject, "Id", true)); + + errorProvider1.DataSource = RootObject; + } + } +} \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.resx b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.resx new file mode 100644 index 0000000..7c51009 --- /dev/null +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/MyRootNotifyPropertyChanged.resx @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + + False + + + False + + + False + + + False + + + 195, 17 + + + 17, 17 + + + 348, 17 + + + This sample show how you can combine DataAnnotations (Name Required) and BusinessRules (Name max 10 characters). + +The Sum field is automatically calculated in a custom rule and Dependency rules is used to automatically trigger the sum rule when one of the input fields is changed. + +There is also a custom general rule to check that Num1 is not larger than Num2 + + \ No newline at end of file diff --git a/trunk/samples/MEFSamples/Repository/MEFSample.UI/packages.config b/trunk/samples/MEFSamples/Repository/MEFSample.UI/packages.config index 9db93c7..dc708ee 100644 --- a/trunk/samples/MEFSamples/Repository/MEFSample.UI/packages.config +++ b/trunk/samples/MEFSamples/Repository/MEFSample.UI/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file From f1953e78a9c132e85b5f60790f34cdb6da1cc117 Mon Sep 17 00:00:00 2001 From: tfreitasleal Date: Sat, 24 Feb 2018 12:33:37 +0000 Subject: [PATCH 14/15] Update dependencies to version 4.6.605. --- .../ActionExtenderSample.WisejWeb.csproj | 4 ++-- .../ActionExtenderSample.WisejWeb/packages.config | 2 +- .../ProjectTracker.Ui.WisejWeb.csproj | 4 ++-- .../ProjectTracker/ProjectTracker.Ui.WisejWeb/packages.config | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/trunk/samples/ActionExtenderSample/ActionExtenderSample.WisejWeb/ActionExtenderSample.WisejWeb.csproj b/trunk/samples/ActionExtenderSample/ActionExtenderSample.WisejWeb/ActionExtenderSample.WisejWeb.csproj index 23627cd..16b19fd 100644 --- a/trunk/samples/ActionExtenderSample/ActionExtenderSample.WisejWeb/ActionExtenderSample.WisejWeb.csproj +++ b/trunk/samples/ActionExtenderSample/ActionExtenderSample.WisejWeb/ActionExtenderSample.WisejWeb.csproj @@ -95,8 +95,8 @@ ..\packages\CSLA-Core.4.6.603\lib\net45\Csla.dll True - - ..\packages\CslaContrib-Wisej.4.6.604\lib\net45\CslaContrib.WisejWeb.dll + + ..\packages\CslaContrib-Wisej.4.6.605\lib\net45\CslaContrib.WisejWeb.dll True diff --git a/trunk/samples/ActionExtenderSample/ActionExtenderSample.WisejWeb/packages.config b/trunk/samples/ActionExtenderSample/ActionExtenderSample.WisejWeb/packages.config index c34d5f7..b25198d 100644 --- a/trunk/samples/ActionExtenderSample/ActionExtenderSample.WisejWeb/packages.config +++ b/trunk/samples/ActionExtenderSample/ActionExtenderSample.WisejWeb/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/trunk/samples/ProjectTracker/ProjectTracker.Ui.WisejWeb/ProjectTracker.Ui.WisejWeb.csproj b/trunk/samples/ProjectTracker/ProjectTracker.Ui.WisejWeb/ProjectTracker.Ui.WisejWeb.csproj index ea9a78c..18649e4 100644 --- a/trunk/samples/ProjectTracker/ProjectTracker.Ui.WisejWeb/ProjectTracker.Ui.WisejWeb.csproj +++ b/trunk/samples/ProjectTracker/ProjectTracker.Ui.WisejWeb/ProjectTracker.Ui.WisejWeb.csproj @@ -146,8 +146,8 @@ ..\packages\CSLA-Core.4.6.500\lib\net45\Csla.dll True - - ..\packages\CslaContrib-Wisej.4.6.604\lib\net45\CslaContrib.WisejWeb.dll + + ..\packages\CslaContrib-Wisej.4.6.605\lib\net45\CslaContrib.WisejWeb.dll True diff --git a/trunk/samples/ProjectTracker/ProjectTracker.Ui.WisejWeb/packages.config b/trunk/samples/ProjectTracker/ProjectTracker.Ui.WisejWeb/packages.config index 206e4fb..6548cd4 100644 --- a/trunk/samples/ProjectTracker/ProjectTracker.Ui.WisejWeb/packages.config +++ b/trunk/samples/ProjectTracker/ProjectTracker.Ui.WisejWeb/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file From bb4e1258af791fb9d14751148c63a3a6ce3e32c9 Mon Sep 17 00:00:00 2001 From: tfreitasleal Date: Sat, 24 Feb 2018 12:43:06 +0000 Subject: [PATCH 15/15] Change version to 4.6.605 (#93) --- trunk/NuGet/Definition/Caliburn.Micro WPF.NuSpec | 2 +- trunk/NuGet/Definition/Caliburn.Micro WPF.V2.NuSpec | 2 +- trunk/NuGet/Definition/CslaContrib.NuSpec | 2 +- trunk/NuGet/Definition/CustomFieldData.NuSpec | 2 +- trunk/NuGet/Definition/MEF.NuSpec | 2 +- trunk/NuGet/Definition/ObjectCaching AppFabric.NuSpec | 2 +- trunk/NuGet/Definition/WPF.NuSpec | 2 +- trunk/NuGet/Definition/Windows.NuSpec | 2 +- trunk/NuGet/Definition/Wisej.NuSpec | 2 +- trunk/Source/GlobalAssemblyInfo.cs | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/trunk/NuGet/Definition/Caliburn.Micro WPF.NuSpec b/trunk/NuGet/Definition/Caliburn.Micro WPF.NuSpec index fab2bc3..5f577f4 100644 --- a/trunk/NuGet/Definition/Caliburn.Micro WPF.NuSpec +++ b/trunk/NuGet/Definition/Caliburn.Micro WPF.NuSpec @@ -4,7 +4,7 @@ CslaContrib-Caliburn.Micro.WPF CSLA .NET Contrib - Caliburn.Micro.WPF CSLA CslaContrib WPF Caliburn.Micro MVVM Model-View-ViewModel Presentation UI ViewModel - 4.6.604 + 4.6.605 CslaContrib https://github.com/MarimerLLC/cslacontrib/blob/master/LICENSE.md https://github.com/MarimerLLC/cslacontrib diff --git a/trunk/NuGet/Definition/Caliburn.Micro WPF.V2.NuSpec b/trunk/NuGet/Definition/Caliburn.Micro WPF.V2.NuSpec index 6295ff9..f7b776f 100644 --- a/trunk/NuGet/Definition/Caliburn.Micro WPF.V2.NuSpec +++ b/trunk/NuGet/Definition/Caliburn.Micro WPF.V2.NuSpec @@ -4,7 +4,7 @@ CslaContrib-Caliburn.Micro.V2.WPF CSLA .NET Contrib - Caliburn.Micro.WPF v.2 CSLA CslaContrib WPF Caliburn.Micro v.2 MVVM Model-View-ViewModel Presentation UI ViewModel - 4.6.604 + 4.6.605 CslaContrib https://github.com/MarimerLLC/cslacontrib/blob/master/LICENSE.md https://github.com/MarimerLLC/cslacontrib diff --git a/trunk/NuGet/Definition/CslaContrib.NuSpec b/trunk/NuGet/Definition/CslaContrib.NuSpec index e53052f..db6d413 100644 --- a/trunk/NuGet/Definition/CslaContrib.NuSpec +++ b/trunk/NuGet/Definition/CslaContrib.NuSpec @@ -4,7 +4,7 @@ CslaContrib CSLA .NET Contrib CSLA CslaContrib ObjectCaching and Generic Rules - 4.6.604 + 4.6.605 CslaContrib https://github.com/MarimerLLC/cslacontrib/blob/master/LICENSE.md https://github.com/MarimerLLC/cslacontrib diff --git a/trunk/NuGet/Definition/CustomFieldData.NuSpec b/trunk/NuGet/Definition/CustomFieldData.NuSpec index d97e608..2ace1c1 100644 --- a/trunk/NuGet/Definition/CustomFieldData.NuSpec +++ b/trunk/NuGet/Definition/CustomFieldData.NuSpec @@ -4,7 +4,7 @@ CslaContrib-CustomFieldData CSLA .NET Contrib - CustomFieldData CSLA CslaContrib Custom Field Data - 4.6.604 + 4.6.605 CslaContrib https://github.com/MarimerLLC/cslacontrib/blob/master/LICENSE.md https://github.com/MarimerLLC/cslacontrib diff --git a/trunk/NuGet/Definition/MEF.NuSpec b/trunk/NuGet/Definition/MEF.NuSpec index b93760a..ebac088 100644 --- a/trunk/NuGet/Definition/MEF.NuSpec +++ b/trunk/NuGet/Definition/MEF.NuSpec @@ -4,7 +4,7 @@ CslaContrib-MEF CSLA .NET Contrib - MEF CSLA CslaContrib MEF - 4.6.604 + 4.6.605 CslaContrib https://github.com/MarimerLLC/cslacontrib/blob/master/LICENSE.md https://github.com/MarimerLLC/cslacontrib diff --git a/trunk/NuGet/Definition/ObjectCaching AppFabric.NuSpec b/trunk/NuGet/Definition/ObjectCaching AppFabric.NuSpec index e1bda21..fd16f89 100644 --- a/trunk/NuGet/Definition/ObjectCaching AppFabric.NuSpec +++ b/trunk/NuGet/Definition/ObjectCaching AppFabric.NuSpec @@ -4,7 +4,7 @@ CslaContrib-ObjectCaching.AppFabric CSLA .NET Contrib - ObjectCaching.AppFabric CSLA CslaContrib ObjectCaching AppFabric - 4.6.604 + 4.6.605 CslaContrib https://github.com/MarimerLLC/cslacontrib/blob/master/LICENSE.md https://github.com/MarimerLLC/cslacontrib diff --git a/trunk/NuGet/Definition/WPF.NuSpec b/trunk/NuGet/Definition/WPF.NuSpec index 27ec797..ba82524 100644 --- a/trunk/NuGet/Definition/WPF.NuSpec +++ b/trunk/NuGet/Definition/WPF.NuSpec @@ -4,7 +4,7 @@ CslaContrib-WPF CSLA .NET Contrib - WPF CSLA CslaContrib WPF UI - 4.6.604 + 4.6.605 CslaContrib https://github.com/MarimerLLC/cslacontrib/blob/master/LICENSE.md https://github.com/MarimerLLC/cslacontrib diff --git a/trunk/NuGet/Definition/Windows.NuSpec b/trunk/NuGet/Definition/Windows.NuSpec index c6f1b11..db9a3e4 100644 --- a/trunk/NuGet/Definition/Windows.NuSpec +++ b/trunk/NuGet/Definition/Windows.NuSpec @@ -4,7 +4,7 @@ CslaContrib-Windows CSLA .NET Contrib - Windows CSLA CslaContrib WindowsForms WinForms UI - 4.6.604 + 4.6.605 CslaContrib https://github.com/MarimerLLC/cslacontrib/blob/master/LICENSE.md https://github.com/MarimerLLC/cslacontrib diff --git a/trunk/NuGet/Definition/Wisej.NuSpec b/trunk/NuGet/Definition/Wisej.NuSpec index 4d94d9b..ac02cc3 100644 --- a/trunk/NuGet/Definition/Wisej.NuSpec +++ b/trunk/NuGet/Definition/Wisej.NuSpec @@ -4,7 +4,7 @@ CslaContrib-Wisej CSLA .NET Contrib - Wisej CSLA CslaContrib Wisej UI - 4.6.604 + 4.6.605 CslaContrib https://github.com/MarimerLLC/cslacontrib/blob/master/LICENSE.md https://github.com/MarimerLLC/cslacontrib diff --git a/trunk/Source/GlobalAssemblyInfo.cs b/trunk/Source/GlobalAssemblyInfo.cs index 1538e72..c58dcfa 100644 --- a/trunk/Source/GlobalAssemblyInfo.cs +++ b/trunk/Source/GlobalAssemblyInfo.cs @@ -5,5 +5,5 @@ [assembly: AssemblyCopyright("Copyright © 2009-2018 Marimer LLC")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("4.6.604")] -[assembly: AssemblyFileVersion("4.6.604")] +[assembly: AssemblyVersion("4.6.605")] +[assembly: AssemblyFileVersion("4.6.605")]