Skip to content

Commit 3d0a57e

Browse files
committed
1.1.6.8
1 parent 8c76ac2 commit 3d0a57e

243 files changed

Lines changed: 14277 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
86.1 KB
Binary file not shown.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
using Microsoft.AspNetCore.Components;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Web.UI;
8+
using System.Web.UI.WebControls;
9+
10+
namespace Blazor.WebForm.UI.ControlComponents
11+
{
12+
public abstract class BaseDataBoundControlComponent<TControl> : WebControlComponent<TControl>
13+
where TControl : BaseDataBoundControl, new()
14+
{
15+
[Parameter]
16+
public string DataSourceID
17+
{
18+
get
19+
{
20+
return this.Control.DataSourceID;
21+
}
22+
set
23+
{
24+
this.Control.DataSourceID = value;
25+
}
26+
}
27+
28+
//[Parameter]
29+
//public object DataSource
30+
//{
31+
// get
32+
// {
33+
// return this.Control.DataSource;
34+
// }
35+
// set
36+
// {
37+
// this.Control.DataSource = value;
38+
// }
39+
//}
40+
41+
[Parameter]
42+
public EventHandler OnDataBound
43+
{
44+
get
45+
{
46+
return this.GetEventProperty();
47+
}
48+
set
49+
{
50+
this.SetEventProperty(value, i => this.Control.DataBound += i, i => this.Control.DataBound -= i);
51+
}
52+
}
53+
}
54+
}
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
using Microsoft.AspNetCore.Components;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Web.UI;
8+
using System.Web.UI.WebControls;
9+
10+
namespace Blazor.WebForm.UI.ControlComponents
11+
{
12+
public abstract class BaseDataListControlComponent<TControl> : WebControlComponent<TControl>
13+
where TControl : BaseDataList, new()
14+
{
15+
[Parameter]
16+
public string Caption
17+
{
18+
get
19+
{
20+
return this.Control.Caption;
21+
}
22+
set
23+
{
24+
this.Control.Caption = value;
25+
}
26+
}
27+
28+
[Parameter]
29+
public int CellPadding
30+
{
31+
get
32+
{
33+
return this.Control.CellPadding;
34+
}
35+
set
36+
{
37+
this.Control.CellPadding = value;
38+
}
39+
}
40+
41+
[Parameter]
42+
public int CellSpacing
43+
{
44+
get
45+
{
46+
return this.Control.CellSpacing;
47+
}
48+
set
49+
{
50+
this.Control.CellSpacing = value;
51+
}
52+
}
53+
54+
[Parameter]
55+
public string DataKeyField
56+
{
57+
get
58+
{
59+
return this.Control.DataKeyField;
60+
}
61+
set
62+
{
63+
this.Control.DataKeyField = value;
64+
}
65+
}
66+
67+
[Parameter]
68+
public string DataMember
69+
{
70+
get
71+
{
72+
return this.Control.DataMember;
73+
}
74+
set
75+
{
76+
this.Control.DataMember = value;
77+
}
78+
}
79+
80+
[Parameter]
81+
public bool UseAccessibleHeader
82+
{
83+
get
84+
{
85+
return this.Control.UseAccessibleHeader;
86+
}
87+
set
88+
{
89+
this.Control.UseAccessibleHeader = value;
90+
}
91+
}
92+
93+
//[Parameter]
94+
//public object DataSource
95+
//{
96+
// get
97+
// {
98+
// return this.Control.DataSource;
99+
// }
100+
// set
101+
// {
102+
// this.Control.DataSource = value;
103+
// }
104+
//}
105+
106+
[Parameter]
107+
public GridLines GridLines
108+
{
109+
get
110+
{
111+
return this.Control.GridLines;
112+
}
113+
set
114+
{
115+
this.Control.GridLines = value;
116+
}
117+
}
118+
119+
[Parameter]
120+
public HorizontalAlign HorizontalAlign
121+
{
122+
get
123+
{
124+
return this.Control.HorizontalAlign;
125+
}
126+
set
127+
{
128+
this.Control.HorizontalAlign = value;
129+
}
130+
}
131+
132+
[Parameter]
133+
public string DataSourceID
134+
{
135+
get
136+
{
137+
return this.Control.DataSourceID;
138+
}
139+
set
140+
{
141+
this.Control.DataSourceID = value;
142+
}
143+
}
144+
145+
[Parameter]
146+
public TableCaptionAlign CaptionAlign
147+
{
148+
get
149+
{
150+
return this.Control.CaptionAlign;
151+
}
152+
set
153+
{
154+
this.Control.CaptionAlign = value;
155+
}
156+
}
157+
158+
[Parameter]
159+
public EventHandler OnSelectedIndexChanged
160+
{
161+
get
162+
{
163+
return this.GetEventProperty();
164+
}
165+
set
166+
{
167+
this.SetEventProperty(value, i => this.Control.SelectedIndexChanged += i, i => this.Control.SelectedIndexChanged -= i);
168+
}
169+
}
170+
}
171+
}
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
using Microsoft.AspNetCore.Components;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Web.UI;
8+
using System.Web.UI.WebControls;
9+
10+
namespace Blazor.WebForm.UI.ControlComponents
11+
{
12+
public abstract class BaseValidatorControlComponent<TControl> : LabelControlComponent<TControl>
13+
where TControl : BaseValidator, new()
14+
{
15+
[Parameter]
16+
public bool SetFocusOnError
17+
{
18+
get
19+
{
20+
return this.Control.SetFocusOnError;
21+
}
22+
set
23+
{
24+
this.Control.SetFocusOnError = value;
25+
}
26+
}
27+
28+
[Parameter]
29+
public ValidatorDisplay Display
30+
{
31+
get
32+
{
33+
return this.Control.Display;
34+
}
35+
set
36+
{
37+
this.Control.Display = value;
38+
}
39+
}
40+
41+
[Parameter]
42+
public bool EnableClientScript
43+
{
44+
get
45+
{
46+
return this.Control.EnableClientScript;
47+
}
48+
set
49+
{
50+
this.Control.EnableClientScript = value;
51+
}
52+
}
53+
54+
[Parameter]
55+
public string ErrorMessage
56+
{
57+
get
58+
{
59+
return this.Control.ErrorMessage;
60+
}
61+
set
62+
{
63+
this.Control.ErrorMessage = value;
64+
}
65+
}
66+
67+
[Parameter]
68+
public string ControlToValidate
69+
{
70+
get
71+
{
72+
return this.Control.ControlToValidate;
73+
}
74+
set
75+
{
76+
this.Control.ControlToValidate = value;
77+
}
78+
}
79+
80+
[Parameter]
81+
public string ValidationGroup
82+
{
83+
get
84+
{
85+
return this.Control.ValidationGroup;
86+
}
87+
set
88+
{
89+
this.Control.ValidationGroup = value;
90+
}
91+
}
92+
93+
protected override void OnInitialized()
94+
{
95+
base.OnInitialized();
96+
ValidatorCollection validators = (this.Control as IValidatePage).Validators;
97+
if (!validators.Contains(this.Control))
98+
{
99+
validators.Add(this.Control);
100+
}
101+
}
102+
103+
protected override void SetInnerPropertyWithInner(IReadOnlyDictionary<string, object> parameters, ref bool hasInnerContent)
104+
{
105+
base.SetInnerPropertyWithInner(parameters, ref hasInnerContent);
106+
if (!parameters.ContainsKey(nameof(this.ID)) && string.IsNullOrEmpty(this.ID))
107+
{
108+
this.ID = Guid.NewGuid().ToString("N");
109+
}
110+
}
111+
}
112+
}

0 commit comments

Comments
 (0)