├── validation.png
├── validation-grid.png
├── validation-details.png
├── src
├── WindowsForms.DataAnnotationsValidation
│ ├── App.config
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── Settings.Designer.cs
│ │ ├── DataSources
│ │ │ └── SampleModel.datasource
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── SampleModel.cs
│ ├── Program.cs
│ ├── Form1.cs
│ ├── Form2.cs
│ ├── BaseModel.cs
│ ├── WindowsForms.DataAnnotationsValidation.csproj
│ ├── Form2.resx
│ ├── Form1.resx
│ ├── Form2.Designer.cs
│ └── Form1.Designer.cs
└── WindowsForms.DataAnnotationsValidation.sln
├── README.md
├── .gitattributes
└── .gitignore
/validation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/r-aghaei/WindowsForms.DataAnnotationsValidation/HEAD/validation.png
--------------------------------------------------------------------------------
/validation-grid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/r-aghaei/WindowsForms.DataAnnotationsValidation/HEAD/validation-grid.png
--------------------------------------------------------------------------------
/validation-details.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/r-aghaei/WindowsForms.DataAnnotationsValidation/HEAD/validation-details.png
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/SampleModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel.DataAnnotations;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace WindowsForms.DataAnnotationsValidation
9 | {
10 | public class SampleModel : BaseModel
11 | {
12 | [Required]
13 | [Range(1, 100)]
14 | public int? Id { get; set; }
15 |
16 | [Required]
17 | [StringLength(10)]
18 | [RegularExpression("w+")]
19 | public string Name { get; set; }
20 |
21 | [Required]
22 | [StringLength(500, MinimumLength = 10)]
23 | public string Description { get; set; }
24 |
25 | [Required]
26 | [Range(1, 100000)]
27 | public int Price { get; set; }
28 |
29 | [Required]
30 | [Url]
31 | public string Url { get; set; }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 |
8 | namespace WindowsForms.DataAnnotationsValidation
9 | {
10 | static class Program
11 | {
12 | [DllImport("user32.dll", SetLastError = true)]
13 | static extern bool SetProcessDPIAware();
14 |
15 | ///
16 | /// The main entry point for the application.
17 | ///
18 | [STAThread]
19 | static void Main()
20 | {
21 | if (Environment.OSVersion.Version.Major >= 6)
22 | SetProcessDPIAware();
23 |
24 | Application.EnableVisualStyles();
25 | Application.SetCompatibleTextRenderingDefault(true);
26 | Application.Run(new Form1());
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace WindowsForms.DataAnnotationsValidation
12 | {
13 | public partial class Form1 : Form
14 | {
15 | public Form1()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void Form1_Load(object sender, EventArgs e)
21 | {
22 | var list = new List()
23 | {
24 | new SampleModel(){
25 | Name ="Some long name",
26 | Price = -1,
27 | Description = "something",
28 | Url = "www.site.com"
29 | }
30 | };
31 | this.sampleModelBindingSource.DataSource = list;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Form2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace WindowsForms.DataAnnotationsValidation
12 | {
13 | public partial class Form2 : Form
14 | {
15 | public Form2()
16 | {
17 | InitializeComponent();
18 | }
19 |
20 | private void Form2_Load(object sender, EventArgs e)
21 | {
22 | var list = new List()
23 | {
24 | new SampleModel(){
25 | Name ="Some long name",
26 | Price = -1,
27 | Description = "something",
28 | Url = "www.site.com"
29 | }
30 | };
31 | this.sampleModelBindingSource.DataSource = list;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WindowsForms.DataAnnotationsValidation.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Properties/DataSources/SampleModel.datasource:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 | WindowsForms.DataAnnotationsValidation.SampleModel, WindowsForms.DataAnnotationsValidation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("WindowsForms.DataAnnotationsValidation")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("WindowsForms.DataAnnotationsValidation")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("d0aeead6-f563-407f-85c0-2b2ed5cb6389")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27703.2000
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsForms.DataAnnotationsValidation", "WindowsForms.DataAnnotationsValidation\WindowsForms.DataAnnotationsValidation.csproj", "{D0AEEAD6-F563-407F-85C0-2B2ED5CB6389}"
7 | EndProject
8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{9A86FA1F-45D0-4EA3-B6CF-32349261858B}"
9 | ProjectSection(SolutionItems) = preProject
10 | ..\README.md = ..\README.md
11 | ..\validation-details.png = ..\validation-details.png
12 | ..\validation-grid.png = ..\validation-grid.png
13 | ..\validation.png = ..\validation.png
14 | EndProjectSection
15 | EndProject
16 | Global
17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
18 | Debug|Any CPU = Debug|Any CPU
19 | Release|Any CPU = Release|Any CPU
20 | EndGlobalSection
21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 | {D0AEEAD6-F563-407F-85C0-2B2ED5CB6389}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {D0AEEAD6-F563-407F-85C0-2B2ED5CB6389}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {D0AEEAD6-F563-407F-85C0-2B2ED5CB6389}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {D0AEEAD6-F563-407F-85C0-2B2ED5CB6389}.Release|Any CPU.Build.0 = Release|Any CPU
26 | EndGlobalSection
27 | GlobalSection(SolutionProperties) = preSolution
28 | HideSolutionNode = FALSE
29 | EndGlobalSection
30 | GlobalSection(ExtensibilityGlobals) = postSolution
31 | SolutionGuid = {82898CD9-F342-4333-86B5-D3ED168722EC}
32 | EndGlobalSection
33 | EndGlobal
34 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/BaseModel.cs:
--------------------------------------------------------------------------------
1 | namespace WindowsForms.DataAnnotationsValidation
2 | {
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.ComponentModel.DataAnnotations;
6 | using System.Linq;
7 | public class BaseModel : IDataErrorInfo
8 | {
9 | [Browsable(false)]
10 | public string this[string property]
11 | {
12 | get
13 | {
14 | var propertyDescriptor = TypeDescriptor.GetProperties(this)[property];
15 | if (propertyDescriptor == null)
16 | return string.Empty;
17 |
18 | var results = new List();
19 | var result = Validator.TryValidateProperty(
20 | propertyDescriptor.GetValue(this),
21 | new ValidationContext(this, null, null)
22 | { MemberName = property },
23 | results);
24 | if (!result)
25 | return results.First().ErrorMessage;
26 | return string.Empty;
27 | }
28 | }
29 |
30 | [Browsable(false)]
31 | public string Error
32 | {
33 | get
34 | {
35 | var results = new List();
36 | var result = Validator.TryValidateObject(this,
37 | new ValidationContext(this, null, null), results, true);
38 | if (!result)
39 | return string.Join("\n", results.Select(x => x.ErrorMessage));
40 | else
41 | return null;
42 | }
43 | }
44 | }
45 | }
46 |
47 |
48 | public interface IDataErrorInfo
49 | {
50 | string this[string columnName] { get; }
51 | string Error { get; }
52 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DataAnnotations Validation Attributes in Windows Forms
2 |
3 | This example shows how to use DataAnnotations Validation Attributes in Windows Forms.
4 |
5 | Data Annotation Validation attributes enable you to perform model validation simply decorating class properties with validation attributes such as the `Required`, `StringLength`, `RegularExpression`, `Range`, `Url`, etc.
6 |
7 | To bring validation attributes support to our model classes, we need to implement `IDataErrorInfo`. There is a [`Validator`](https://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.validator%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396) class in `System.ComponentModel.DataAnnotations.dll` which has a couple of methods which allows us to validate an object or a property of an object using validation attributes.
8 |
9 | After implemting `IDataErrorInfo` if create a sample model and decorate its properties with validation attributes:
10 |
11 | public class SampleModel : BaseModel
12 | {
13 | [Required]
14 | [Range(1, 100)]
15 | public int? Id { get; set; }
16 |
17 | [Required]
18 | [StringLength(10)]
19 | [RegularExpression("w+")]
20 | public string Name { get; set; }
21 |
22 | [Required]
23 | [StringLength(500, MinimumLength = 10)]
24 | public string Description { get; set; }
25 |
26 | [Required]
27 | [Range(1, 100000)]
28 | public int Price { get; set; }
29 |
30 | [Required]
31 | [Url]
32 | public string Url { get; set; }
33 | }
34 |
35 | Then if you setup data binding using to `SampleModel` using a `BindingSource` and use an `ErrorProvider`, then you can see error icon near the controls and if you hover on the error icon, you can see error message in tooltip:
36 |
37 | 
38 |
39 | Also if you use a `DataGridView`, errors will be shown on cells and rows:
40 |
41 | 
42 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WindowsForms.DataAnnotationsValidation.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsForms.DataAnnotationsValidation.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/WindowsForms.DataAnnotationsValidation.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {D0AEEAD6-F563-407F-85C0-2B2ED5CB6389}
8 | WinExe
9 | WindowsForms.DataAnnotationsValidation
10 | WindowsForms.DataAnnotationsValidation
11 | v4.6.1
12 | 512
13 | true
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | Form
52 |
53 |
54 | Form1.cs
55 |
56 |
57 | Form
58 |
59 |
60 | Form2.cs
61 |
62 |
63 |
64 |
65 |
66 | Form1.cs
67 |
68 |
69 | Form2.cs
70 |
71 |
72 | ResXFileCodeGenerator
73 | Resources.Designer.cs
74 | Designer
75 |
76 |
77 | True
78 | Resources.resx
79 |
80 |
81 |
82 | SettingsSingleFileGenerator
83 | Settings.Designer.cs
84 |
85 |
86 | True
87 | Settings.settings
88 | True
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 | [Ll]og/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | project.fragment.lock.json
46 | artifacts/
47 |
48 | *_i.c
49 | *_p.c
50 | *_i.h
51 | *.ilk
52 | *.meta
53 | *.obj
54 | *.pch
55 | *.pdb
56 | *.pgc
57 | *.pgd
58 | *.rsp
59 | *.sbr
60 | *.tlb
61 | *.tli
62 | *.tlh
63 | *.tmp
64 | *.tmp_proj
65 | *.log
66 | *.vspscc
67 | *.vssscc
68 | .builds
69 | *.pidb
70 | *.svclog
71 | *.scc
72 |
73 | # Chutzpah Test files
74 | _Chutzpah*
75 |
76 | # Visual C++ cache files
77 | ipch/
78 | *.aps
79 | *.ncb
80 | *.opendb
81 | *.opensdf
82 | *.sdf
83 | *.cachefile
84 | *.VC.db
85 | *.VC.VC.opendb
86 |
87 | # Visual Studio profiler
88 | *.psess
89 | *.vsp
90 | *.vspx
91 | *.sap
92 |
93 | # TFS 2012 Local Workspace
94 | $tf/
95 |
96 | # Guidance Automation Toolkit
97 | *.gpState
98 |
99 | # ReSharper is a .NET coding add-in
100 | _ReSharper*/
101 | *.[Rr]e[Ss]harper
102 | *.DotSettings.user
103 |
104 | # JustCode is a .NET coding add-in
105 | .JustCode
106 |
107 | # TeamCity is a build add-in
108 | _TeamCity*
109 |
110 | # DotCover is a Code Coverage Tool
111 | *.dotCover
112 |
113 | # NCrunch
114 | _NCrunch_*
115 | .*crunch*.local.xml
116 | nCrunchTemp_*
117 |
118 | # MightyMoose
119 | *.mm.*
120 | AutoTest.Net/
121 |
122 | # Web workbench (sass)
123 | .sass-cache/
124 |
125 | # Installshield output folder
126 | [Ee]xpress/
127 |
128 | # DocProject is a documentation generator add-in
129 | DocProject/buildhelp/
130 | DocProject/Help/*.HxT
131 | DocProject/Help/*.HxC
132 | DocProject/Help/*.hhc
133 | DocProject/Help/*.hhk
134 | DocProject/Help/*.hhp
135 | DocProject/Help/Html2
136 | DocProject/Help/html
137 |
138 | # Click-Once directory
139 | publish/
140 |
141 | # Publish Web Output
142 | *.[Pp]ublish.xml
143 | *.azurePubxml
144 | # TODO: Comment the next line if you want to checkin your web deploy settings
145 | # but database connection strings (with potential passwords) will be unencrypted
146 | #*.pubxml
147 | *.publishproj
148 |
149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
150 | # checkin your Azure Web App publish settings, but sensitive information contained
151 | # in these scripts will be unencrypted
152 | PublishScripts/
153 |
154 | # NuGet Packages
155 | *.nupkg
156 | # The packages folder can be ignored because of Package Restore
157 | **/packages/*
158 | # except build/, which is used as an MSBuild target.
159 | !**/packages/build/
160 | # Uncomment if necessary however generally it will be regenerated when needed
161 | #!**/packages/repositories.config
162 | # NuGet v3's project.json files produces more ignoreable files
163 | *.nuget.props
164 | *.nuget.targets
165 |
166 | # Microsoft Azure Build Output
167 | csx/
168 | *.build.csdef
169 |
170 | # Microsoft Azure Emulator
171 | ecf/
172 | rcf/
173 |
174 | # Windows Store app package directories and files
175 | AppPackages/
176 | BundleArtifacts/
177 | Package.StoreAssociation.xml
178 | _pkginfo.txt
179 |
180 | # Visual Studio cache files
181 | # files ending in .cache can be ignored
182 | *.[Cc]ache
183 | # but keep track of directories ending in .cache
184 | !*.[Cc]ache/
185 |
186 | # Others
187 | ClientBin/
188 | ~$*
189 | *~
190 | *.dbmdl
191 | *.dbproj.schemaview
192 | *.jfm
193 | *.pfx
194 | *.publishsettings
195 | node_modules/
196 | orleans.codegen.cs
197 |
198 | # Since there are multiple workflows, uncomment next line to ignore bower_components
199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
200 | #bower_components/
201 |
202 | # RIA/Silverlight projects
203 | Generated_Code/
204 |
205 | # Backup & report files from converting an old project file
206 | # to a newer Visual Studio version. Backup files are not needed,
207 | # because we have git ;-)
208 | _UpgradeReport_Files/
209 | Backup*/
210 | UpgradeLog*.XML
211 | UpgradeLog*.htm
212 |
213 | # SQL Server files
214 | *.mdf
215 | *.ldf
216 |
217 | # Business Intelligence projects
218 | *.rdl.data
219 | *.bim.layout
220 | *.bim_*.settings
221 |
222 | # Microsoft Fakes
223 | FakesAssemblies/
224 |
225 | # GhostDoc plugin setting file
226 | *.GhostDoc.xml
227 |
228 | # Node.js Tools for Visual Studio
229 | .ntvs_analysis.dat
230 |
231 | # Visual Studio 6 build log
232 | *.plg
233 |
234 | # Visual Studio 6 workspace options file
235 | *.opt
236 |
237 | # Visual Studio LightSwitch build output
238 | **/*.HTMLClient/GeneratedArtifacts
239 | **/*.DesktopClient/GeneratedArtifacts
240 | **/*.DesktopClient/ModelManifest.xml
241 | **/*.Server/GeneratedArtifacts
242 | **/*.Server/ModelManifest.xml
243 | _Pvt_Extensions
244 |
245 | # Paket dependency manager
246 | .paket/paket.exe
247 | paket-files/
248 |
249 | # FAKE - F# Make
250 | .fake/
251 |
252 | # JetBrains Rider
253 | .idea/
254 | *.sln.iml
255 |
256 | # CodeRush
257 | .cr/
258 |
259 | # Python Tools for Visual Studio (PTVS)
260 | __pycache__/
261 | *.pyc
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Form2.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 308, 17
122 |
123 |
124 |
125 |
126 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
127 | JQAAFiUBSVIk8AAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC
128 | pBtwfjov3ICDPSKkG3B8kiBQc93/Pw+q/u9oFydswKWZPP/PTuX7fxKo8Ui/0P993SJAzeX//94r+r++
129 | Qeb/qhq5/0srFf/PL1X+P6tIFdPAU0B//nlYD9RUC8SV///cKwHivP9/72b+/3sn+f/f23H//92MAOKQ
130 | /5NyNDENONQrDHbu3/ulQI0FQI3ZQI2pQI0J///digZqDPv/70bQ/3/X/f53peliGrCzXeL/lmap/+vA
131 | zpX/v6RC8f/fWzFAjeH/p+Zp/J+QpfW/O0P3f3uq/v/mREPCYTIb6E+Qc//dCPjfk6FDWAM6APnz3w1/
132 | IPb735qsT7oB3em6YP+CcH2cEekGtCQZ/G+IN/xfE2v8vzLahHQD6AQYGAAkI9iedfyIaQAAAABJRU5E
133 | rkJggg==
134 |
135 |
136 |
137 | 17, 17
138 |
139 |
140 |
141 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
142 | JQAAFiUBSVIk8AAAAW9JREFUOE+1kE0ow2Ecx3dV3krt4oJaOSCTvIRkMqSxyITIzCQHDouEdnFwIOVC
143 | DrhIDiQl5UTiNG/z2ppafy1S2gX/uDwfY6i1v7Hie3nqeb7fz+/7/FR/Ilwn0G0Exw4fV5GJlXlEZxXC
144 | rIet9bAQvB5Ymgn2sLYAvSZEux7RUQFzE4qQt4bCXAYjPaHvnDoCkLpsRGMB2JqCTGLIijDlwqQ9bEMV
145 | i9OIytR3EMNWcJ/BWH8A6j8/bOGFxwXNxYEvGbMQ9XnQ1/K78KfY3/VXzkMY0qFGG2H4RoLGQshJQNbG
146 | 86CNhdrsX9a/uQZTPhQl4rMY4OLofbl3aX7I8uwPC7y/g1YdjyVJuEvT8e1tfwUYteHUxCCfHChDeHmG
147 | QQvokjlOU+PbWA0x3pZnILVVI3uvQyHsbiLnqnGmRCF1NYD8pDhpRxOH7HQoAKZGkFKjceszQbpSrumX
148 | bO+G80MFwKUTxgfgcO/b8D9IpXoFiiMDHIQm0skAAAAASUVORK5CYII=
149 |
150 |
151 |
152 |
153 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
154 | JQAAFiUBSVIk8AAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77
155 | wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0
156 | v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg
157 | UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA
158 | Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu
159 | lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII=
160 |
161 |
162 |
163 |
164 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
165 | JQAAFiUBSVIk8AAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w
166 | 5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f
167 | Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+
168 | 08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC
169 |
170 |
171 |
172 |
173 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
174 | JQAAFiUBSVIk8AAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78
175 | n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI
176 | N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f
177 | oAc0QjgAAAAASUVORK5CYII=
178 |
179 |
180 |
181 |
182 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
183 | JQAAFiUBSVIk8AAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+//
184 | h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B
185 | twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA
186 | kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG
187 | WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9
188 | 8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg==
189 |
190 |
191 |
192 |
193 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
194 | JQAAFiUBSVIk8AAAAExJREFUOE9joAr49u3bf1IxVCsEgAWC58Dxh/cf4RhZDETHTNiHaQgpBoAwzBCo
195 | dtINAGGiDUDGyGpoawAxeNSAQWkAORiqnRLAwAAA9EMMU8Daa3MAAAAASUVORK5CYII=
196 |
197 |
198 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Form1.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | False
122 |
123 |
124 | False
125 |
126 |
127 | False
128 |
129 |
130 | False
131 |
132 |
133 | False
134 |
135 |
136 | 308, 17
137 |
138 |
139 |
140 |
141 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
142 | JQAAFiUBSVIk8AAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC
143 | pBtwfjov3ICDPSKkG3B8kiBQc93/Pw+q/u9oFydswKWZPP/PTuX7fxKo8Ui/0P993SJAzeX//94r+r++
144 | Qeb/qhq5/0srFf/PL1X+P6tIFdPAU0B//nlYD9RUC8SV///cKwHivP9/72b+/3sn+f/f23H//92MAOKQ
145 | /5NyNDENONQrDHbu3/ulQI0FQI3ZQI2pQI0J///digZqDPv/70bQ/3/X/f53peliGrCzXeL/lmap/+vA
146 | zpX/v6RC8f/fWzFAjeH/p+Zp/J+QpfW/O0P3f3uq/v/mREPCYTIb6E+Qc//dCPjfk6FDWAM6APnz3w1/
147 | IPb735qsT7oB3em6YP+CcH2cEekGtCQZ/G+IN/xfE2v8vzLahHQD6AQYGAAkI9iedfyIaQAAAABJRU5E
148 | rkJggg==
149 |
150 |
151 |
152 | 17, 17
153 |
154 |
155 |
156 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
157 | JQAAFiUBSVIk8AAAAW9JREFUOE+1kE0ow2Ecx3dV3krt4oJaOSCTvIRkMqSxyITIzCQHDouEdnFwIOVC
158 | DrhIDiQl5UTiNG/z2ppafy1S2gX/uDwfY6i1v7Hie3nqeb7fz+/7/FR/Ilwn0G0Exw4fV5GJlXlEZxXC
159 | rIet9bAQvB5Ymgn2sLYAvSZEux7RUQFzE4qQt4bCXAYjPaHvnDoCkLpsRGMB2JqCTGLIijDlwqQ9bEMV
160 | i9OIytR3EMNWcJ/BWH8A6j8/bOGFxwXNxYEvGbMQ9XnQ1/K78KfY3/VXzkMY0qFGG2H4RoLGQshJQNbG
161 | 86CNhdrsX9a/uQZTPhQl4rMY4OLofbl3aX7I8uwPC7y/g1YdjyVJuEvT8e1tfwUYteHUxCCfHChDeHmG
162 | QQvokjlOU+PbWA0x3pZnILVVI3uvQyHsbiLnqnGmRCF1NYD8pDhpRxOH7HQoAKZGkFKjceszQbpSrumX
163 | bO+G80MFwKUTxgfgcO/b8D9IpXoFiiMDHIQm0skAAAAASUVORK5CYII=
164 |
165 |
166 |
167 |
168 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
169 | JQAAFiUBSVIk8AAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77
170 | wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0
171 | v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg
172 | UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA
173 | Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu
174 | lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII=
175 |
176 |
177 |
178 |
179 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
180 | JQAAFiUBSVIk8AAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w
181 | 5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f
182 | Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+
183 | 08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC
184 |
185 |
186 |
187 |
188 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
189 | JQAAFiUBSVIk8AAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78
190 | n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI
191 | N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f
192 | oAc0QjgAAAAASUVORK5CYII=
193 |
194 |
195 |
196 |
197 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
198 | JQAAFiUBSVIk8AAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+//
199 | h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B
200 | twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA
201 | kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG
202 | WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9
203 | 8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg==
204 |
205 |
206 |
207 |
208 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAW
209 | JQAAFiUBSVIk8AAAAExJREFUOE9joAr49u3bf1IxVCsEgAWC58Dxh/cf4RhZDETHTNiHaQgpBoAwzBCo
210 | dtINAGGiDUDGyGpoawAxeNSAQWkAORiqnRLAwAAA9EMMU8Daa3MAAAAASUVORK5CYII=
211 |
212 |
213 |
214 | 623, 17
215 |
216 |
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Form2.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WindowsForms.DataAnnotationsValidation
2 | {
3 | partial class Form2
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form2));
33 | this.sampleModelBindingNavigator = new System.Windows.Forms.BindingNavigator(this.components);
34 | this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
35 | this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
36 | this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
37 | this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox();
38 | this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
39 | this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator();
40 | this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
41 | this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
42 | this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
43 | this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
44 | this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
45 | this.sampleModelBindingNavigatorSaveItem = new System.Windows.Forms.ToolStripButton();
46 | this.sampleModelDataGridView = new System.Windows.Forms.DataGridView();
47 | this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
48 | this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
49 | this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
50 | this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
51 | this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
52 | this.sampleModelBindingSource = new System.Windows.Forms.BindingSource(this.components);
53 | ((System.ComponentModel.ISupportInitialize)(this.sampleModelBindingNavigator)).BeginInit();
54 | this.sampleModelBindingNavigator.SuspendLayout();
55 | ((System.ComponentModel.ISupportInitialize)(this.sampleModelDataGridView)).BeginInit();
56 | ((System.ComponentModel.ISupportInitialize)(this.sampleModelBindingSource)).BeginInit();
57 | this.SuspendLayout();
58 | //
59 | // sampleModelBindingNavigator
60 | //
61 | this.sampleModelBindingNavigator.AddNewItem = this.bindingNavigatorAddNewItem;
62 | this.sampleModelBindingNavigator.BindingSource = this.sampleModelBindingSource;
63 | this.sampleModelBindingNavigator.CountItem = this.bindingNavigatorCountItem;
64 | this.sampleModelBindingNavigator.DeleteItem = this.bindingNavigatorDeleteItem;
65 | this.sampleModelBindingNavigator.ImageScalingSize = new System.Drawing.Size(24, 24);
66 | this.sampleModelBindingNavigator.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
67 | this.bindingNavigatorMoveFirstItem,
68 | this.bindingNavigatorMovePreviousItem,
69 | this.bindingNavigatorSeparator,
70 | this.bindingNavigatorPositionItem,
71 | this.bindingNavigatorCountItem,
72 | this.bindingNavigatorSeparator1,
73 | this.bindingNavigatorMoveNextItem,
74 | this.bindingNavigatorMoveLastItem,
75 | this.bindingNavigatorSeparator2,
76 | this.bindingNavigatorAddNewItem,
77 | this.bindingNavigatorDeleteItem,
78 | this.sampleModelBindingNavigatorSaveItem});
79 | this.sampleModelBindingNavigator.Location = new System.Drawing.Point(0, 0);
80 | this.sampleModelBindingNavigator.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
81 | this.sampleModelBindingNavigator.MoveLastItem = this.bindingNavigatorMoveLastItem;
82 | this.sampleModelBindingNavigator.MoveNextItem = this.bindingNavigatorMoveNextItem;
83 | this.sampleModelBindingNavigator.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
84 | this.sampleModelBindingNavigator.Name = "sampleModelBindingNavigator";
85 | this.sampleModelBindingNavigator.PositionItem = this.bindingNavigatorPositionItem;
86 | this.sampleModelBindingNavigator.Size = new System.Drawing.Size(665, 31);
87 | this.sampleModelBindingNavigator.TabIndex = 0;
88 | this.sampleModelBindingNavigator.Text = "bindingNavigator1";
89 | //
90 | // bindingNavigatorMoveFirstItem
91 | //
92 | this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
93 | this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image")));
94 | this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
95 | this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
96 | this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(28, 28);
97 | this.bindingNavigatorMoveFirstItem.Text = "Move first";
98 | //
99 | // bindingNavigatorMovePreviousItem
100 | //
101 | this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
102 | this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image")));
103 | this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
104 | this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
105 | this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(28, 28);
106 | this.bindingNavigatorMovePreviousItem.Text = "Move previous";
107 | //
108 | // bindingNavigatorSeparator
109 | //
110 | this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
111 | this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 31);
112 | //
113 | // bindingNavigatorPositionItem
114 | //
115 | this.bindingNavigatorPositionItem.AccessibleName = "Position";
116 | this.bindingNavigatorPositionItem.AutoSize = false;
117 | this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
118 | this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 31);
119 | this.bindingNavigatorPositionItem.Text = "0";
120 | this.bindingNavigatorPositionItem.ToolTipText = "Current position";
121 | //
122 | // bindingNavigatorCountItem
123 | //
124 | this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
125 | this.bindingNavigatorCountItem.Size = new System.Drawing.Size(54, 28);
126 | this.bindingNavigatorCountItem.Text = "of {0}";
127 | this.bindingNavigatorCountItem.ToolTipText = "Total number of items";
128 | //
129 | // bindingNavigatorSeparator1
130 | //
131 | this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator";
132 | this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 31);
133 | //
134 | // bindingNavigatorMoveNextItem
135 | //
136 | this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
137 | this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image")));
138 | this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
139 | this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
140 | this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(28, 28);
141 | this.bindingNavigatorMoveNextItem.Text = "Move next";
142 | //
143 | // bindingNavigatorMoveLastItem
144 | //
145 | this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
146 | this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image")));
147 | this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
148 | this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
149 | this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(28, 28);
150 | this.bindingNavigatorMoveLastItem.Text = "Move last";
151 | //
152 | // bindingNavigatorSeparator2
153 | //
154 | this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator";
155 | this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 31);
156 | //
157 | // bindingNavigatorAddNewItem
158 | //
159 | this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
160 | this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
161 | this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
162 | this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
163 | this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(28, 28);
164 | this.bindingNavigatorAddNewItem.Text = "Add new";
165 | //
166 | // bindingNavigatorDeleteItem
167 | //
168 | this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
169 | this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
170 | this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
171 | this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
172 | this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(28, 28);
173 | this.bindingNavigatorDeleteItem.Text = "Delete";
174 | //
175 | // sampleModelBindingNavigatorSaveItem
176 | //
177 | this.sampleModelBindingNavigatorSaveItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
178 | this.sampleModelBindingNavigatorSaveItem.Image = ((System.Drawing.Image)(resources.GetObject("sampleModelBindingNavigatorSaveItem.Image")));
179 | this.sampleModelBindingNavigatorSaveItem.Name = "sampleModelBindingNavigatorSaveItem";
180 | this.sampleModelBindingNavigatorSaveItem.Size = new System.Drawing.Size(28, 28);
181 | this.sampleModelBindingNavigatorSaveItem.Text = "Save Data";
182 | //
183 | // sampleModelDataGridView
184 | //
185 | this.sampleModelDataGridView.AutoGenerateColumns = false;
186 | this.sampleModelDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
187 | this.sampleModelDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
188 | this.dataGridViewTextBoxColumn1,
189 | this.dataGridViewTextBoxColumn2,
190 | this.dataGridViewTextBoxColumn3,
191 | this.dataGridViewTextBoxColumn4,
192 | this.dataGridViewTextBoxColumn5});
193 | this.sampleModelDataGridView.DataSource = this.sampleModelBindingSource;
194 | this.sampleModelDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
195 | this.sampleModelDataGridView.Location = new System.Drawing.Point(0, 31);
196 | this.sampleModelDataGridView.Name = "sampleModelDataGridView";
197 | this.sampleModelDataGridView.RowTemplate.Height = 28;
198 | this.sampleModelDataGridView.Size = new System.Drawing.Size(665, 310);
199 | this.sampleModelDataGridView.TabIndex = 1;
200 | //
201 | // dataGridViewTextBoxColumn1
202 | //
203 | this.dataGridViewTextBoxColumn1.DataPropertyName = "Id";
204 | this.dataGridViewTextBoxColumn1.HeaderText = "Id";
205 | this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
206 | //
207 | // dataGridViewTextBoxColumn2
208 | //
209 | this.dataGridViewTextBoxColumn2.DataPropertyName = "Name";
210 | this.dataGridViewTextBoxColumn2.HeaderText = "Name";
211 | this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
212 | //
213 | // dataGridViewTextBoxColumn3
214 | //
215 | this.dataGridViewTextBoxColumn3.DataPropertyName = "Description";
216 | this.dataGridViewTextBoxColumn3.HeaderText = "Description";
217 | this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
218 | //
219 | // dataGridViewTextBoxColumn4
220 | //
221 | this.dataGridViewTextBoxColumn4.DataPropertyName = "Price";
222 | this.dataGridViewTextBoxColumn4.HeaderText = "Price";
223 | this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
224 | //
225 | // dataGridViewTextBoxColumn5
226 | //
227 | this.dataGridViewTextBoxColumn5.DataPropertyName = "Url";
228 | this.dataGridViewTextBoxColumn5.HeaderText = "Url";
229 | this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
230 | //
231 | // sampleModelBindingSource
232 | //
233 | this.sampleModelBindingSource.DataSource = typeof(WindowsForms.DataAnnotationsValidation.SampleModel);
234 | //
235 | // Form2
236 | //
237 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
238 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
239 | this.ClientSize = new System.Drawing.Size(665, 341);
240 | this.Controls.Add(this.sampleModelDataGridView);
241 | this.Controls.Add(this.sampleModelBindingNavigator);
242 | this.Name = "Form2";
243 | this.Text = "Form2";
244 | this.Load += new System.EventHandler(this.Form2_Load);
245 | ((System.ComponentModel.ISupportInitialize)(this.sampleModelBindingNavigator)).EndInit();
246 | this.sampleModelBindingNavigator.ResumeLayout(false);
247 | this.sampleModelBindingNavigator.PerformLayout();
248 | ((System.ComponentModel.ISupportInitialize)(this.sampleModelDataGridView)).EndInit();
249 | ((System.ComponentModel.ISupportInitialize)(this.sampleModelBindingSource)).EndInit();
250 | this.ResumeLayout(false);
251 | this.PerformLayout();
252 |
253 | }
254 |
255 | #endregion
256 |
257 | private System.Windows.Forms.BindingSource sampleModelBindingSource;
258 | private System.Windows.Forms.BindingNavigator sampleModelBindingNavigator;
259 | private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem;
260 | private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
261 | private System.Windows.Forms.ToolStripButton bindingNavigatorDeleteItem;
262 | private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
263 | private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
264 | private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
265 | private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem;
266 | private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1;
267 | private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
268 | private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
269 | private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
270 | private System.Windows.Forms.ToolStripButton sampleModelBindingNavigatorSaveItem;
271 | private System.Windows.Forms.DataGridView sampleModelDataGridView;
272 | private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
273 | private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
274 | private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
275 | private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
276 | private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
277 | }
278 | }
--------------------------------------------------------------------------------
/src/WindowsForms.DataAnnotationsValidation/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WindowsForms.DataAnnotationsValidation
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | System.Windows.Forms.Label descriptionLabel;
33 | System.Windows.Forms.Label idLabel;
34 | System.Windows.Forms.Label nameLabel;
35 | System.Windows.Forms.Label priceLabel;
36 | System.Windows.Forms.Label urlLabel;
37 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
38 | this.sampleModelBindingNavigator = new System.Windows.Forms.BindingNavigator(this.components);
39 | this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
40 | this.sampleModelBindingSource = new System.Windows.Forms.BindingSource(this.components);
41 | this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
42 | this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
43 | this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
44 | this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
45 | this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
46 | this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox();
47 | this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator();
48 | this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
49 | this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
50 | this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
51 | this.sampleModelBindingNavigatorSaveItem = new System.Windows.Forms.ToolStripButton();
52 | this.descriptionTextBox = new System.Windows.Forms.TextBox();
53 | this.idTextBox = new System.Windows.Forms.TextBox();
54 | this.nameTextBox = new System.Windows.Forms.TextBox();
55 | this.urlTextBox = new System.Windows.Forms.TextBox();
56 | this.priceTextBox = new System.Windows.Forms.TextBox();
57 | this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components);
58 | descriptionLabel = new System.Windows.Forms.Label();
59 | idLabel = new System.Windows.Forms.Label();
60 | nameLabel = new System.Windows.Forms.Label();
61 | priceLabel = new System.Windows.Forms.Label();
62 | urlLabel = new System.Windows.Forms.Label();
63 | ((System.ComponentModel.ISupportInitialize)(this.sampleModelBindingNavigator)).BeginInit();
64 | this.sampleModelBindingNavigator.SuspendLayout();
65 | ((System.ComponentModel.ISupportInitialize)(this.sampleModelBindingSource)).BeginInit();
66 | ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
67 | this.SuspendLayout();
68 | //
69 | // descriptionLabel
70 | //
71 | descriptionLabel.AutoSize = true;
72 | descriptionLabel.Location = new System.Drawing.Point(18, 185);
73 | descriptionLabel.Name = "descriptionLabel";
74 | descriptionLabel.Size = new System.Drawing.Size(93, 20);
75 | descriptionLabel.TabIndex = 1;
76 | descriptionLabel.Text = "Description:";
77 | //
78 | // idLabel
79 | //
80 | idLabel.AutoSize = true;
81 | idLabel.Location = new System.Drawing.Point(18, 57);
82 | idLabel.Name = "idLabel";
83 | idLabel.Size = new System.Drawing.Size(27, 20);
84 | idLabel.TabIndex = 3;
85 | idLabel.Text = "Id:";
86 | //
87 | // nameLabel
88 | //
89 | nameLabel.AutoSize = true;
90 | nameLabel.Location = new System.Drawing.Point(18, 89);
91 | nameLabel.Name = "nameLabel";
92 | nameLabel.Size = new System.Drawing.Size(55, 20);
93 | nameLabel.TabIndex = 5;
94 | nameLabel.Text = "Name:";
95 | //
96 | // priceLabel
97 | //
98 | priceLabel.AutoSize = true;
99 | priceLabel.Location = new System.Drawing.Point(18, 121);
100 | priceLabel.Name = "priceLabel";
101 | priceLabel.Size = new System.Drawing.Size(48, 20);
102 | priceLabel.TabIndex = 7;
103 | priceLabel.Text = "Price:";
104 | //
105 | // urlLabel
106 | //
107 | urlLabel.AutoSize = true;
108 | urlLabel.Location = new System.Drawing.Point(18, 153);
109 | urlLabel.Name = "urlLabel";
110 | urlLabel.Size = new System.Drawing.Size(33, 20);
111 | urlLabel.TabIndex = 9;
112 | urlLabel.Text = "Url:";
113 | //
114 | // sampleModelBindingNavigator
115 | //
116 | this.sampleModelBindingNavigator.AddNewItem = this.bindingNavigatorAddNewItem;
117 | this.sampleModelBindingNavigator.BindingSource = this.sampleModelBindingSource;
118 | this.sampleModelBindingNavigator.CountItem = this.bindingNavigatorCountItem;
119 | this.sampleModelBindingNavigator.DeleteItem = this.bindingNavigatorDeleteItem;
120 | this.sampleModelBindingNavigator.ImageScalingSize = new System.Drawing.Size(24, 24);
121 | this.sampleModelBindingNavigator.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
122 | this.bindingNavigatorMoveFirstItem,
123 | this.bindingNavigatorMovePreviousItem,
124 | this.bindingNavigatorSeparator,
125 | this.bindingNavigatorPositionItem,
126 | this.bindingNavigatorCountItem,
127 | this.bindingNavigatorSeparator1,
128 | this.bindingNavigatorMoveNextItem,
129 | this.bindingNavigatorMoveLastItem,
130 | this.bindingNavigatorSeparator2,
131 | this.bindingNavigatorAddNewItem,
132 | this.bindingNavigatorDeleteItem,
133 | this.sampleModelBindingNavigatorSaveItem});
134 | this.sampleModelBindingNavigator.Location = new System.Drawing.Point(0, 0);
135 | this.sampleModelBindingNavigator.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
136 | this.sampleModelBindingNavigator.MoveLastItem = this.bindingNavigatorMoveLastItem;
137 | this.sampleModelBindingNavigator.MoveNextItem = this.bindingNavigatorMoveNextItem;
138 | this.sampleModelBindingNavigator.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
139 | this.sampleModelBindingNavigator.Name = "sampleModelBindingNavigator";
140 | this.sampleModelBindingNavigator.PositionItem = this.bindingNavigatorPositionItem;
141 | this.sampleModelBindingNavigator.Size = new System.Drawing.Size(490, 31);
142 | this.sampleModelBindingNavigator.TabIndex = 0;
143 | this.sampleModelBindingNavigator.Text = "bindingNavigator1";
144 | //
145 | // bindingNavigatorAddNewItem
146 | //
147 | this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
148 | this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
149 | this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
150 | this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
151 | this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(28, 28);
152 | this.bindingNavigatorAddNewItem.Text = "Add new";
153 | //
154 | // sampleModelBindingSource
155 | //
156 | this.sampleModelBindingSource.DataSource = typeof(WindowsForms.DataAnnotationsValidation.SampleModel);
157 | //
158 | // bindingNavigatorCountItem
159 | //
160 | this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
161 | this.bindingNavigatorCountItem.Size = new System.Drawing.Size(54, 28);
162 | this.bindingNavigatorCountItem.Text = "of {0}";
163 | this.bindingNavigatorCountItem.ToolTipText = "Total number of items";
164 | //
165 | // bindingNavigatorDeleteItem
166 | //
167 | this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
168 | this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
169 | this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
170 | this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
171 | this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(28, 28);
172 | this.bindingNavigatorDeleteItem.Text = "Delete";
173 | //
174 | // bindingNavigatorMoveFirstItem
175 | //
176 | this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
177 | this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image")));
178 | this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
179 | this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
180 | this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(28, 28);
181 | this.bindingNavigatorMoveFirstItem.Text = "Move first";
182 | //
183 | // bindingNavigatorMovePreviousItem
184 | //
185 | this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
186 | this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image")));
187 | this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
188 | this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
189 | this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(28, 28);
190 | this.bindingNavigatorMovePreviousItem.Text = "Move previous";
191 | //
192 | // bindingNavigatorSeparator
193 | //
194 | this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
195 | this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 31);
196 | //
197 | // bindingNavigatorPositionItem
198 | //
199 | this.bindingNavigatorPositionItem.AccessibleName = "Position";
200 | this.bindingNavigatorPositionItem.AutoSize = false;
201 | this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
202 | this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 31);
203 | this.bindingNavigatorPositionItem.Text = "0";
204 | this.bindingNavigatorPositionItem.ToolTipText = "Current position";
205 | //
206 | // bindingNavigatorSeparator1
207 | //
208 | this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
209 | this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 31);
210 | //
211 | // bindingNavigatorMoveNextItem
212 | //
213 | this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
214 | this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image")));
215 | this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
216 | this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
217 | this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(28, 28);
218 | this.bindingNavigatorMoveNextItem.Text = "Move next";
219 | //
220 | // bindingNavigatorMoveLastItem
221 | //
222 | this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
223 | this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image")));
224 | this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
225 | this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
226 | this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(28, 28);
227 | this.bindingNavigatorMoveLastItem.Text = "Move last";
228 | //
229 | // bindingNavigatorSeparator2
230 | //
231 | this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
232 | this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 31);
233 | //
234 | // sampleModelBindingNavigatorSaveItem
235 | //
236 | this.sampleModelBindingNavigatorSaveItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
237 | this.sampleModelBindingNavigatorSaveItem.Image = ((System.Drawing.Image)(resources.GetObject("sampleModelBindingNavigatorSaveItem.Image")));
238 | this.sampleModelBindingNavigatorSaveItem.Name = "sampleModelBindingNavigatorSaveItem";
239 | this.sampleModelBindingNavigatorSaveItem.Size = new System.Drawing.Size(28, 28);
240 | this.sampleModelBindingNavigatorSaveItem.Text = "Save Data";
241 | //
242 | // descriptionTextBox
243 | //
244 | this.descriptionTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.sampleModelBindingSource, "Description", true));
245 | this.descriptionTextBox.Location = new System.Drawing.Point(117, 182);
246 | this.descriptionTextBox.Multiline = true;
247 | this.descriptionTextBox.Name = "descriptionTextBox";
248 | this.descriptionTextBox.Size = new System.Drawing.Size(246, 108);
249 | this.descriptionTextBox.TabIndex = 2;
250 | //
251 | // idTextBox
252 | //
253 | this.idTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.sampleModelBindingSource, "Id", true));
254 | this.idTextBox.Location = new System.Drawing.Point(117, 54);
255 | this.idTextBox.Name = "idTextBox";
256 | this.idTextBox.Size = new System.Drawing.Size(100, 26);
257 | this.idTextBox.TabIndex = 4;
258 | //
259 | // nameTextBox
260 | //
261 | this.nameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.sampleModelBindingSource, "Name", true));
262 | this.nameTextBox.Location = new System.Drawing.Point(117, 86);
263 | this.nameTextBox.Name = "nameTextBox";
264 | this.nameTextBox.Size = new System.Drawing.Size(100, 26);
265 | this.nameTextBox.TabIndex = 6;
266 | //
267 | // urlTextBox
268 | //
269 | this.urlTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.sampleModelBindingSource, "Url", true));
270 | this.urlTextBox.Location = new System.Drawing.Point(117, 150);
271 | this.urlTextBox.Name = "urlTextBox";
272 | this.urlTextBox.Size = new System.Drawing.Size(246, 26);
273 | this.urlTextBox.TabIndex = 10;
274 | //
275 | // priceTextBox
276 | //
277 | this.priceTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.sampleModelBindingSource, "Price", true));
278 | this.priceTextBox.Location = new System.Drawing.Point(117, 118);
279 | this.priceTextBox.Name = "priceTextBox";
280 | this.priceTextBox.Size = new System.Drawing.Size(100, 26);
281 | this.priceTextBox.TabIndex = 8;
282 | //
283 | // errorProvider1
284 | //
285 | this.errorProvider1.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
286 | this.errorProvider1.ContainerControl = this;
287 | this.errorProvider1.DataSource = this.sampleModelBindingSource;
288 | //
289 | // Form1
290 | //
291 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
292 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
293 | this.ClientSize = new System.Drawing.Size(490, 317);
294 | this.Controls.Add(descriptionLabel);
295 | this.Controls.Add(this.descriptionTextBox);
296 | this.Controls.Add(idLabel);
297 | this.Controls.Add(this.idTextBox);
298 | this.Controls.Add(nameLabel);
299 | this.Controls.Add(this.nameTextBox);
300 | this.Controls.Add(priceLabel);
301 | this.Controls.Add(this.priceTextBox);
302 | this.Controls.Add(urlLabel);
303 | this.Controls.Add(this.urlTextBox);
304 | this.Controls.Add(this.sampleModelBindingNavigator);
305 | this.Name = "Form1";
306 | this.Text = "Form1";
307 | this.Load += new System.EventHandler(this.Form1_Load);
308 | ((System.ComponentModel.ISupportInitialize)(this.sampleModelBindingNavigator)).EndInit();
309 | this.sampleModelBindingNavigator.ResumeLayout(false);
310 | this.sampleModelBindingNavigator.PerformLayout();
311 | ((System.ComponentModel.ISupportInitialize)(this.sampleModelBindingSource)).EndInit();
312 | ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit();
313 | this.ResumeLayout(false);
314 | this.PerformLayout();
315 |
316 | }
317 |
318 | #endregion
319 |
320 | private System.Windows.Forms.BindingSource sampleModelBindingSource;
321 | private System.Windows.Forms.BindingNavigator sampleModelBindingNavigator;
322 | private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem;
323 | private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
324 | private System.Windows.Forms.ToolStripButton bindingNavigatorDeleteItem;
325 | private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
326 | private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
327 | private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
328 | private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem;
329 | private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1;
330 | private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
331 | private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
332 | private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
333 | private System.Windows.Forms.ToolStripButton sampleModelBindingNavigatorSaveItem;
334 | private System.Windows.Forms.TextBox descriptionTextBox;
335 | private System.Windows.Forms.TextBox idTextBox;
336 | private System.Windows.Forms.TextBox nameTextBox;
337 | private System.Windows.Forms.TextBox urlTextBox;
338 | private System.Windows.Forms.TextBox priceTextBox;
339 | private System.Windows.Forms.ErrorProvider errorProvider1;
340 | }
341 | }
342 |
343 |
--------------------------------------------------------------------------------