Skip to content

Commit 807702d

Browse files
author
Irina
committed
2024v1 update
1 parent 46d3317 commit 807702d

114 files changed

Lines changed: 60243 additions & 903 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.

NET_8/Accordion/AccordionExplorer.Server/AccordionExplorer.Server.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@
1010
</ItemGroup>
1111
<ItemGroup>
1212
<PackageReference Include="C1.Blazor.Accordion">
13-
<Version>8.0.20233.676</Version>
13+
<Version>8.0.20241.820</Version>
1414
</PackageReference>
1515
<PackageReference Include="C1.Blazor.Core">
16-
<Version>8.0.20233.676</Version>
16+
<Version>8.0.20241.820</Version>
1717
</PackageReference>
1818
<PackageReference Include="C1.Blazor.DataFilter">
19-
<Version>8.0.20233.676</Version>
19+
<Version>8.0.20241.820</Version>
2020
</PackageReference>
2121
<PackageReference Include="C1.Blazor.DateTimeEditors">
22-
<Version>8.0.20233.676</Version>
22+
<Version>8.0.20241.820</Version>
2323
</PackageReference>
2424
<PackageReference Include="C1.Blazor.Grid">
25-
<Version>8.0.20233.676</Version>
25+
<Version>8.0.20241.820</Version>
2626
</PackageReference>
2727
<PackageReference Include="C1.Blazor.GridControl">
28-
<Version>8.0.20233.676</Version>
28+
<Version>8.0.20241.820</Version>
2929
</PackageReference>
3030
<PackageReference Include="C1.Blazor.Input">
31-
<Version>8.0.20233.676</Version>
31+
<Version>8.0.20241.820</Version>
3232
</PackageReference>
3333
<PackageReference Include="C1.Blazor.ListView">
34-
<Version>8.0.20233.676</Version>
34+
<Version>8.0.20241.820</Version>
3535
</PackageReference>
3636
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.0" />
3737
</ItemGroup>

NET_8/Accordion/AccordionExplorer.Server/Localization/AccordionRes.ja.resx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,6 @@
157157
<value>Expander</value>
158158
<comment>Expander</comment>
159159
</data>
160-
<data name="ExpandsModes" xml:space="preserve">
161-
<value>展開モード</value>
162-
<comment>Expand Modes</comment>
163-
</data>
164160
<data name="Header" xml:space="preserve">
165161
<value>ヘッダ</value>
166162
<comment>Header</comment>

NET_8/DataFilter/DataFilterExplorer.Server/DataFilterExplorer.Server.csproj

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,38 @@
55
</PropertyGroup>
66
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
77
<DefineConstants>TRACE;BLAZOR</DefineConstants>
8+
<NoWarn>1701;1702;CS1591;BL0005</NoWarn>
89
</PropertyGroup>
910
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
1011
<DefineConstants>TRACE;BLAZOR</DefineConstants>
12+
<NoWarn>1701;1702;CS1591;BL0005</NoWarn>
1113
</PropertyGroup>
1214
<ItemGroup>
1315
<None Remove="readme.txt" />
1416
<None Remove="readme_ja.txt" />
1517
</ItemGroup>
1618
<ItemGroup>
1719
<PackageReference Include="C1.Blazor.Accordion">
18-
<Version>8.0.20233.676</Version>
20+
<Version>8.0.20241.820</Version>
1921
</PackageReference>
2022
<PackageReference Include="C1.Blazor.Core">
21-
<Version>8.0.20233.676</Version>
23+
<Version>8.0.20241.820</Version>
2224
</PackageReference>
2325
<PackageReference Include="C1.Blazor.DataFilter">
24-
<Version>8.0.20233.676</Version>
26+
<Version>8.0.20241.820</Version>
2527
</PackageReference>
2628
<PackageReference Include="C1.Blazor.Grid">
27-
<Version>8.0.20233.676</Version>
29+
<Version>8.0.20241.820</Version>
2830
</PackageReference>
2931
<PackageReference Include="C1.Blazor.ListView">
30-
<Version>8.0.20233.676</Version>
32+
<Version>8.0.20241.820</Version>
3133
</PackageReference>
3234
<PackageReference Include="C1.Blazor.TreeView">
33-
<Version>8.0.20233.676</Version>
35+
<Version>8.0.20241.820</Version>
3436
</PackageReference>
35-
<PackageReference Include="C1.DataCollection" Version="7.0.20233.175" />
36-
<PackageReference Include="C1.DataCollection.BindingList" Version="7.0.20233.175" />
37-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.6" />
37+
<PackageReference Include="C1.DataCollection" Version="8.0.20241.192" />
38+
<PackageReference Include="C1.DataCollection.BindingList" Version="8.0.20241.192" />
39+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.3" />
3840
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.0" />
3941
</ItemGroup>
4042
<ItemGroup>

NET_8/DataFilter/DataFilterExplorer.Server/Models/Car.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ public Car()
1010
{
1111
Random gen = new Random();
1212
int range = 25 * 365;
13-
DateProductionLine = DateTime.Today.AddDays(-gen.Next(range));
13+
DateProductionLine = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day, gen.Next(24), gen.Next(60), 0, gen.NextDouble() > .5 ? DateTimeKind.Utc : DateTimeKind.Local).AddDays(-gen.Next(range));
14+
ManufactureDate = DateOnly.FromDateTime(DateProductionLine.AddDays(-gen.Next(10)));
15+
PresentationDate = new DateTimeOffset(DateProductionLine.AddDays(gen.Next(10)));
16+
FuelConsumption = TimeOnly.FromTimeSpan(TimeSpan.FromMinutes(240 + gen.Next(200)));
17+
Acceleration = TimeSpan.FromSeconds(5 + gen.Next(12));
18+
1419
IsSportVersion = gen.NextDouble() > 0.5;
15-
IsLimitedSeries = gen.NextDouble() > 0.5 ? true : gen.NextDouble() > 0.5? false: null;
20+
IsLimitedSeries = gen.NextDouble() > 0.5 ? true : gen.NextDouble() > 0.5 ? false : null;
1621
}
1722
public string Brand { get; set; }
1823
public string Model { get; set; }
@@ -21,8 +26,12 @@ public Car()
2126
public string TransmissSpeedCount { get; set; }
2227
public string TransmissAutomatic { get; set; }
2328
public DateTime DateProductionLine { get; set; }
24-
public bool IsSportVersion{ get; set; }
25-
public bool? IsLimitedSeries{ get; set; }
29+
public DateOnly ManufactureDate { get; set; }
30+
public TimeOnly FuelConsumption { get; set; }
31+
public TimeSpan Acceleration { get; set; }
32+
public DateTimeOffset PresentationDate { get; set; }
33+
public bool IsSportVersion { get; set; }
34+
public bool? IsLimitedSeries { get; set; }
2635

2736
[Browsable(false)]
2837
public int ID { get; set; }

NET_8/DataFilter/DataFilterExplorer.Server/Pages/ConditionalFilters.razor

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<C1.Blazor.Core.C1CheckBox @bind-IsChecked="_autoApply" IsThreeState="false" /> @DataFilterRes.AutoApplyFilter
1313
</label>
1414
<button @onclick="OnApplyFilterClicked" style="margin: 4px; padding: 2px 8px; height: 36px;">
15-
<svg style="height: 16px; width: 16px; fill: currentColor;" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 402.577 402.577"><path d="M400.858 11.427C397.617 4.006 392.008.295 384.004.291H18.564c-7.993 0-13.61 3.715-16.846 11.136-3.234 7.801-1.903 14.467 3.999 19.985l140.757 140.753V310.92c0 4.955 1.809 9.232 5.424 12.854l73.085 73.083c3.429 3.614 7.71 5.428 12.851 5.428 2.282 0 4.66-.479 7.135-1.43 7.426-3.238 11.14-8.851 11.14-16.845V172.166L396.861 31.413c5.904-5.518 7.232-12.182 3.997-19.986z"/></svg>
15+
<svg style="height: 16px; width: 16px; fill: currentColor;" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 402.577 402.577"><path d="M400.858 11.427C397.617 4.006 392.008.295 384.004.291H18.564c-7.993 0-13.61 3.715-16.846 11.136-3.234 7.801-1.903 14.467 3.999 19.985l140.757 140.753V310.92c0 4.955 1.809 9.232 5.424 12.854l73.085 73.083c3.429 3.614 7.71 5.428 12.851 5.428 2.282 0 4.66-.479 7.135-1.43 7.426-3.238 11.14-8.851 11.14-16.845V172.166L396.861 31.413c5.904-5.518 7.232-12.182 3.997-19.986z" /></svg>
1616
</button>
1717
</div>
1818
<br />
@@ -21,10 +21,13 @@
2121
<div class="filtersSection">
2222
<C1DataFilter @ref="_dataFilter" AutoGenerateFilters="false" AutoApply="_autoApply.GetValueOrDefault()" ItemsSource="@_data" Style="@("max-height: inherit")" ExpandMode="@ExpandMode.One">
2323
<DataFilters>
24-
<TextFilter PropertyName="Model" />
25-
<DateFilter PropertyName="DateProductionLine" HeaderText="Date Production Line" />
26-
<NumericFilter PropertyName="Price" Increment="1000" Format="F2" />
27-
<FullTextFilter PropertyName="Brand" HeaderText="Brand" />
24+
<TextFilter PropertyName="@nameof(Car.Model)" />
25+
<DateTimeFilter PropertyName="@nameof(Car.DateProductionLine)"/>
26+
<DateTimeOffsetFilter PropertyName="@nameof(Car.PresentationDate)"/>
27+
<DateOnlyFilter PropertyName="@nameof(Car.ManufactureDate)" />
28+
<TimeOnlyFilter PropertyName="@nameof(Car.FuelConsumption)" Format="hh:mm" />
29+
<NumericFilter PropertyName="@nameof(Car.Price)" Increment="1000" Format="F2" />
30+
<FullTextFilter PropertyName="@nameof(Car.Brand)"/>
2831
</DataFilters>
2932
</C1DataFilter>
3033
</div>
@@ -46,17 +49,31 @@
4649
_data = new C1.DataCollection.C1DataCollection<Car>(DataProvider.GetCarDataCollection(carsTable));
4750
}
4851

49-
void OnAutoGeneratingColumn(object sender, GridAutoGeneratingColumnEventArgs args)
52+
void OnAutoGeneratingColumn(object sender, GridAutoGeneratingColumnEventArgs a)
5053
{
51-
if (args.Property.Name == nameof(Car.Picture))
54+
switch (a.Property.Name)
5255
{
53-
args.Column.CellTemplate = target => builder =>
54-
{
55-
builder.OpenElement(0, "img");
56-
builder.AddAttribute(1, "style", "max-height: 35px");
57-
builder.AddAttribute(2, "src", $"data:image/bmp;base64, {((Lazy<string>)target).Value}");
58-
builder.CloseElement();
59-
};
56+
case nameof(Car.Picture):
57+
a.Column.CellTemplate = target => builder =>
58+
{
59+
builder.OpenElement(0, "img");
60+
builder.AddAttribute(1, "style", "max-height: 35px");
61+
builder.AddAttribute(2, "src", $"data:image/bmp;base64, {((Lazy<string>)target).Value}");
62+
builder.CloseElement();
63+
};
64+
break;
65+
66+
case nameof(Car.DateProductionLine):
67+
a.Column.Format = "g";
68+
break;
69+
70+
case nameof(Car.PresentationDate):
71+
a.Column.Format = "MM/dd/yy H:mm:ss zzz";
72+
break;
73+
74+
case nameof(Car.FuelConsumption):
75+
a.Column.Format = "hh:mm";
76+
break;
6077
}
6178
}
6279

NET_8/DataFilter/DataFilterExplorer.Server/Pages/FiltersSummary.razor

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</section>
1818

1919

20-
@code{
20+
@code {
2121

2222
C1.DataCollection.C1DataCollection<Car> _data;
2323

@@ -28,17 +28,28 @@
2828
_data = new C1.DataCollection.C1DataCollection<Car>(DataProvider.GetCarDataCollection(carsTable));
2929
}
3030

31-
void OnAutoGeneratingColumn(object sender, GridAutoGeneratingColumnEventArgs args)
31+
void OnAutoGeneratingColumn(object sender, GridAutoGeneratingColumnEventArgs a)
3232
{
33-
if (args.Property.Name == nameof(Car.Picture))
33+
switch (a.Column.Binding)
3434
{
35-
args.Column.CellTemplate = target => builder =>
36-
{
37-
builder.OpenElement(0, "img");
38-
builder.AddAttribute(1, "style", "max-height: 35px");
39-
builder.AddAttribute(2, "src", $"data:image/bmp;base64, {((Lazy<string>)target).Value}");
40-
builder.CloseElement();
41-
};
35+
case nameof(Car.Picture):
36+
a.Column.CellTemplate = target => builder =>
37+
{
38+
builder.OpenElement(0, "img");
39+
builder.AddAttribute(1, "style", "max-height: 35px");
40+
builder.AddAttribute(2, "src", $"data:image/bmp;base64, {((Lazy<string>)target).Value}");
41+
builder.CloseElement();
42+
};
43+
break;
44+
case nameof(Car.DateProductionLine):
45+
a.Column.Format = "g";
46+
break;
47+
case nameof(Car.PresentationDate):
48+
a.Column.Format = "MM/dd/yy H:mm:ss zzz";
49+
break;
50+
case nameof(Car.FuelConsumption):
51+
a.Column.Format = "hh:mm";
52+
break;
4253
}
4354
}
4455

@@ -75,6 +86,12 @@
7586
unset.DisplayValue = DataFilterResources.Null;
7687
}
7788
}
78-
89+
else if (e.Property.Name == nameof(Car.FuelConsumption))
90+
{
91+
var fuelConsumptionFilter = (TimeOnlyRangeFilter)e.Filter;
92+
fuelConsumptionFilter.Maximum = _data.Max(x => ((Car)x).FuelConsumption);
93+
fuelConsumptionFilter.Minimum = _data.Min(x => ((Car)x).FuelConsumption);
94+
fuelConsumptionFilter.Format = "hh:mm";
95+
}
7996
}
8097
}

0 commit comments

Comments
 (0)