• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

EveryDB2のデータベースを読み込んでWinFormでGUI表示するサンプル


Commit MetaInfo

Revisionde41042120edf366140a993e90979c9d01f517c0 (tree)
Zeit2021-06-01 05:07:52
Autoryoshy <yoshy@user...>
Commiteryoshy

Log Message

temp_20210601_0507

Ändern Zusammenfassung

Diff

--- a/App/Adaptor/Gateway/ViewModel/Dto/UmaSummaryRowDto.cs
+++ b/App/Adaptor/Gateway/ViewModel/Dto/UmaSummaryRowDto.cs
@@ -47,9 +47,56 @@ namespace UmaTest.App.Adaptor.Gateway.ViewModel.Dto
4747
4848 public string SenSuu { get; set; }
4949
50- public string ChichiBamei { get => Konso != null ? Konso.Chichi.Bamei : String.Empty; }
50+ public NHansyoku Chichi
51+ {
52+ get
53+ {
54+ if (Konso != null)
55+ {
56+ return Konso.Chichi;
57+ }
58+ if (Zenso != null)
59+ {
60+ return Zenso.Chichi;
61+ }
62+
63+ return null;
64+ }
65+ }
5166
52- public string HahaChichiBamei { get => Konso?.HahaChichi.Bamei; }
67+ public NHansyoku HahaChichi
68+ {
69+ get
70+ {
71+ if (Konso != null)
72+ {
73+ return Konso.HahaChichi;
74+ }
75+ if (Zenso != null)
76+ {
77+ return Zenso.HahaChichi;
78+ }
79+
80+ return null;
81+ }
82+ }
83+
84+ public string BataijyuFormatted
85+ {
86+ get
87+ {
88+ if (Konso != null)
89+ {
90+ return Konso.BataijyuFormatted;
91+ }
92+ if (Zenso != null)
93+ {
94+ return Zenso.BataijyuFormatted;
95+ }
96+
97+ return String.Empty;
98+ }
99+ }
53100
54101 public UmaRaceRowDto Konso { get; set; }
55102
--- a/App/Presentation/View/MainWindow.cs
+++ b/App/Presentation/View/MainWindow.cs
@@ -127,18 +127,18 @@ namespace UmaTest.App.Presentation.View
127127 new DataGridViewTextBoxColumn
128128 {
129129 //DataPropertyName = "ChichiBamei",
130- DataPropertyName = "Konso.Chichi.Bamei",
130+ DataPropertyName = "Chichi.Bamei",
131131 Name = "父",
132132 },
133133 new DataGridViewTextBoxColumn
134134 {
135135 //DataPropertyName = "HahaChichiBamei",
136- DataPropertyName = "Konso.HahaChichi.Bamei",
136+ DataPropertyName = "HahaChichi.Bamei",
137137 Name = "母父",
138138 },
139139 new DataGridViewTextBoxColumn
140140 {
141- DataPropertyName = "Konso.BataijyuFormatted",
141+ DataPropertyName = "BataijyuFormatted",
142142 Name = "馬体重",
143143 },
144144 new DataGridViewTextBoxColumn
@@ -368,6 +368,12 @@ namespace UmaTest.App.Presentation.View
368368 typeof(UmaRaceInfo)
369369 );
370370
371+ // 馬サマリ行.繁殖馬情報
372+ TypeDescriptor.AddProvider(
373+ new NestedTypeDescriptionProvider<NHansyoku>(TypeDescriptor.GetProvider(typeof(UmaSummaryRowDto))),
374+ typeof(UmaSummaryRowDto)
375+ );
376+
371377 // 馬サマリ行.着度数
372378 TypeDescriptor.AddProvider(
373379 new NestedTypeDescriptionProvider<ChakudosuuByGradeRowDto>(TypeDescriptor.GetProvider(typeof(UmaSummaryRowDto))),
@@ -382,11 +388,6 @@ namespace UmaTest.App.Presentation.View
382388 nestedUmaRaceRowDtoProvider, typeof(UmaSummaryRowDto)
383389 );
384390
385- // 馬サマリ行.馬毎レース行.繁殖馬情報
386- TypeDescriptor.AddProvider(
387- new NestedTypeDescriptionProvider<NHansyoku>(nestedUmaRaceRowDtoProvider), typeof(UmaSummaryRowDto)
388- );
389-
390391 //
391392 // Enable Double Buffering for repainting too slow problem on data grid view
392393 //
@@ -428,6 +429,11 @@ namespace UmaTest.App.Presentation.View
428429 bindingSource1.DataSource = vm.UmaSummaryList;
429430 AdjustDataGridView(dataGridView1, bindingSource1, vm.UmaSummaryList.Count, splitContainer2.Panel1);
430431
432+ if (dataGridView1.Rows.Count > 0)
433+ {
434+ dataGridView1.Rows[0].Selected = true;
435+ }
436+
431437 splitContainer2.FixedPanel = FixedPanel.None;
432438 int newHeight = dataGridView1.ColumnHeadersHeight
433439 + (dataGridView1.Rows.Count > 0 ? dataGridView1.Rows.Count * dataGridView1.Rows[0].Height : 0)