質問編集履歴

2

修正

2021/02/05 00:43

投稿

byori
byori

スコア72

test CHANGED
File without changes
test CHANGED
@@ -286,4 +286,6 @@
286
286
 
287
287
  ```
288
288
 
289
+ この配列分ンページを作成したい
290
+
289
291
  ![数分のページを作成したい](4a61d8bdc6acce3753cd585d8b257f75.png)

1

情報の追加

2021/02/05 00:43

投稿

byori
byori

スコア72

test CHANGED
File without changes
test CHANGED
@@ -111,3 +111,179 @@
111
111
 
112
112
 
113
113
  Windows10 VS2015 C# WPF
114
+
115
+
116
+
117
+ 追加
118
+
119
+ ```WPF
120
+
121
+ public partial class PrevReportWindow : Window
122
+
123
+ {
124
+
125
+ public string shindan;
126
+
127
+ public string shoken;
128
+
129
+
130
+
131
+ private void Window_Loaded(object sender, RoutedEventArgs e)
132
+
133
+ {
134
+
135
+
136
+
137
+ Model._report = (FlowDocumentReport)this.Resources["report"];
138
+
139
+ Model._shindan = shindan;
140
+
141
+ Model._shoken = shoken;
142
+
143
+ Model.dispData();
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+ public class FlowDocumentReport : ObservableCollection<FlowDocumentModel>
156
+
157
+ {
158
+
159
+
160
+
161
+ }
162
+
163
+
164
+
165
+
166
+
167
+ public class PrevReport
168
+
169
+ {
170
+
171
+ public string shindan; // { get; set; }
172
+
173
+ public string shoken; // { get; set; }
174
+
175
+ }
176
+
177
+
178
+
179
+ public class FlowDocumentModel : INotifyPropertyChanged
180
+
181
+ {
182
+
183
+ public string _shindan;
184
+
185
+ public string _shoken;
186
+
187
+ public PrevReport report = new PrevReport();
188
+
189
+ public FlowDocumentReport _report;
190
+
191
+
192
+
193
+ public event PropertyChangedEventHandler PropertyChanged;
194
+
195
+ public FlowDocumentModel()
196
+
197
+ {
198
+
199
+ PropertyChanged += (sender, e) => { };
200
+
201
+ }
202
+
203
+
204
+
205
+ public void NotifyPropertyChanged(string propertyName)
206
+
207
+ {
208
+
209
+ if (PropertyChanged != null)
210
+
211
+ {
212
+
213
+ PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
214
+
215
+ }
216
+
217
+ }
218
+
219
+
220
+
221
+ public void dispData()
222
+
223
+ {
224
+
225
+ _report.Add(new FlowDocumentModel()
226
+
227
+ {
228
+
229
+ Shindan = GetHistoryData(HistoryShin, k),
230
+
231
+ Shoken = GetHistoryData(HistorySho, k)
232
+
233
+ });
234
+
235
+ }
236
+
237
+ public string Shindan
238
+
239
+ {
240
+
241
+ get { return report.shindan; }
242
+
243
+ set
244
+
245
+ {
246
+
247
+ if (value != report.shindan)
248
+
249
+ {
250
+
251
+ report.shindan = value;
252
+
253
+ NotifyPropertyChanged("Shindan");
254
+
255
+ }
256
+
257
+ }
258
+
259
+ }
260
+
261
+ public string Shoken
262
+
263
+ {
264
+
265
+ get { return report.shoken; }
266
+
267
+ set
268
+
269
+ {
270
+
271
+ if (value != report.shoken)
272
+
273
+ {
274
+
275
+ report.shoken = value;
276
+
277
+ NotifyPropertyChanged("Shoken");
278
+
279
+ }
280
+
281
+ }
282
+
283
+ }
284
+
285
+ }
286
+
287
+ ```
288
+
289
+ ![数分のページを作成したい](4a61d8bdc6acce3753cd585d8b257f75.png)