-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathFVS_MortalityReport.vb
More file actions
834 lines (796 loc) · 43 KB
/
Copy pathFVS_MortalityReport.vb
File metadata and controls
834 lines (796 loc) · 43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
Public Class FVS_MortalityReport
Public AgeSumState As Boolean
Private Sub FVS_MortalityReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'FormHeight = 962
FormHeight = 972
FormWidth = 977
If FVSdatabasename.Length > 50 Then
DatabaseNameLabel.Text = FVSshortname
Else
DatabaseNameLabel.Text = FVSdatabasename
End If
RecordSetNameLabel.Text = RunIDNameSelect
'- Check if Form fits within Screen Dimensions
If (FormHeight > My.Computer.Screen.Bounds.Height Or _
FormWidth > My.Computer.Screen.Bounds.Width) Then
Me.Height = FormHeight / (DevHeight / My.Computer.Screen.Bounds.Height)
Me.Width = FormWidth / (DevWidth / My.Computer.Screen.Bounds.Width)
If FVS_MortalityReport_ReSize = False Then
Resize_Form(Me)
FVS_MortalityReport_ReSize = True
End If
End If
If SpeciesName = "CHINOOK" Then
AgeSumButton.Visible = True
AgeSumButton.Text = "Sum Age Only"
MortalityTypeComboBox.Items.Clear()
MortalityTypeComboBox.Items.Add("NoneSelected")
MortalityTypeComboBox.Items.Add("Landed Catch")
MortalityTypeComboBox.Items.Add("NonRetention")
MortalityTypeComboBox.Items.Add("Shakers")
MortalityTypeComboBox.Items.Add("DropOff")
MortalityTypeComboBox.Items.Add("TotalMortality")
MortalityTypeComboBox.Items.Add("AEQ-Total Mort")
Else
AgeSumButton.Visible = False
MortalityTypeComboBox.Items.Clear()
MortalityTypeComboBox.Items.Add("NoneSelected")
MortalityTypeComboBox.Items.Add("Landed Catch")
MortalityTypeComboBox.Items.Add("NonRetention")
MortalityTypeComboBox.Items.Add("Shakers")
MortalityTypeComboBox.Items.Add("DropOff")
MortalityTypeComboBox.Items.Add("TotalMortality")
End If
AgeSumState = False
MortalityType = 1
Call LoadGridValues()
End Sub
Sub LoadGridValues()
'MortalityType = 0
'MortalityTypeComboBox.Text = "Landed Catch"
'MortalityType = 1
If SpeciesName = "CHINOOK" Then
Select Case MortalityType
Case 0
MortalityTypeComboBox.Text = "NoneSelected"
Case 1
MortalityTypeComboBox.Text = "Landed Catch"
Case 2
MortalityTypeComboBox.Text = "NonRetention"
Case 3
MortalityTypeComboBox.Text = "Shakers"
Case 4
MortalityTypeComboBox.Text = "DropOff"
Case 5
MortalityTypeComboBox.Text = "TotalMortality"
Case 6
MortalityTypeComboBox.Text = "AEQ-TotalMort"
End Select
ElseIf SpeciesName = "COHO" Then
Select Case MortalityType
Case 0
MortalityTypeComboBox.Text = "NoneSelected"
Case 1
MortalityTypeComboBox.Text = "Landed Catch"
Case 2
MortalityTypeComboBox.Text = "NonRetention"
Case 3
MortalityTypeComboBox.Text = "Shakers"
Case 4
MortalityTypeComboBox.Text = "DropOff"
Case 5
MortalityTypeComboBox.Text = "TotalMortality"
End Select
End If
If ScreenReportType = 1 Then
StockTitleLabel.Visible = False
StocksSelectedLabel.Visible = False
Me.Text = "Fishery Mortality Report"
ElseIf ScreenReportType = 2 Then
StockTitleLabel.Visible = True
StocksSelectedLabel.Visible = True
StocksSelectedLabel.Text = ""
If NumSelectedStocks > 2 Then
StocksSelectedLabel.Font = New Font("Microsoft San Serif", 8, FontStyle.Bold)
Else
StocksSelectedLabel.Font = New Font("Microsoft San Serif", 10, FontStyle.Bold)
End If
For Stk As Integer = 1 To NumSelectedStocks
StocksSelectedLabel.Text &= StockTitle(StockSelection(Stk)) & ","
If Stk = 2 And NumSelectedStocks > 2 Then
StocksSelectedLabel.Text &= "--Plus More--"
Exit For
End If
Next
Me.Text = "Stock Catch Mortality Report"
End If
MortalityGrid.Columns.Clear()
MortalityGrid.ColumnHeadersDefaultCellStyle.Font = New Font("Microsoft San Serif", CInt(10 / FormWidthScaler), FontStyle.Bold)
MortalityGrid.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomCenter
If SpeciesName = "CHINOOK" Then
MortalityGrid.DefaultCellStyle.Font = New Font("Microsoft San Serif", CInt(10 / FormWidthScaler), FontStyle.Bold)
MortalityGrid.Columns.Add("Name", "FisheryName")
MortalityGrid.Columns(0).Width = 175 / FormWidthScaler
MortalityGrid.Columns(0).ReadOnly = True
MortalityGrid.Columns(0).DefaultCellStyle.BackColor = Color.Aquamarine
MortalityGrid.Columns.Add("Age", "Age")
MortalityGrid.Columns(1).Width = 50 / FormWidthScaler
MortalityGrid.Columns(1).DefaultCellStyle.Format = ("0")
MortalityGrid.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("T1", "Oct-Apr1")
MortalityGrid.Columns(2).Width = 100 / FormWidthScaler
MortalityGrid.Columns(2).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("T2", "May-June")
MortalityGrid.Columns(3).Width = 100 / FormWidthScaler
MortalityGrid.Columns(3).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("T3", "July-Sept")
MortalityGrid.Columns(4).Width = 100 / FormWidthScaler
MortalityGrid.Columns(4).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("T4", "Oct-Apr2")
MortalityGrid.Columns(5).Width = 100 / FormWidthScaler
MortalityGrid.Columns(5).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("Total", "Total")
MortalityGrid.Columns(6).Width = 100 / FormWidthScaler
MortalityGrid.Columns(6).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.RowCount = NumFish * MaxAge + 1
ElseIf SpeciesName = "COHO" Then
MortalityGrid.DefaultCellStyle.Font = New Font("Microsoft San Serif", CInt(10 / FormWidthScaler), FontStyle.Bold)
MortalityGrid.Columns.Add("Name", "FisheryName")
MortalityGrid.Columns(0).Width = 175 / FormWidthScaler
MortalityGrid.Columns(0).ReadOnly = True
MortalityGrid.Columns(0).DefaultCellStyle.BackColor = Color.Aquamarine
MortalityGrid.Columns.Add("T1", "Jan-June")
MortalityGrid.Columns(1).Width = 100 / FormWidthScaler
MortalityGrid.Columns(1).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("T2", "July")
MortalityGrid.Columns(2).Width = 100 / FormWidthScaler
MortalityGrid.Columns(2).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("T3", "August")
MortalityGrid.Columns(3).Width = 100 / FormWidthScaler
MortalityGrid.Columns(3).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("T4", "September")
MortalityGrid.Columns(4).Width = 100 / FormWidthScaler
MortalityGrid.Columns(4).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("T5", "Oct-Dec")
MortalityGrid.Columns(5).Width = 100 / FormWidthScaler
MortalityGrid.Columns(5).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("Total", "Total")
MortalityGrid.Columns(6).Width = 100 / FormWidthScaler
MortalityGrid.Columns(6).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.RowCount = NumFish
End If
Call FillMortalityGrid()
End Sub
Sub FillMortalityGrid()
Dim RowNum, SelStk As Integer
If SpeciesName = "CHINOOK" Then
Dim TotCatch(MaxAge, NumFish, NumSteps + 1)
Select Case MortalityType
Case 1
Me.Text = "Landed Catch Report"
Me.MortalityReportTitle.Text = "CHINOOK Landed Catch"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumChinStk1
Next
GoTo SkipChinStk1
End If
SumChinStk1:
For Age As Integer = MinAge To MaxAge
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
TotCatch(Age, Fish, TStep) += LandedCatch(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep)
TotCatch(Age, Fish, NumSteps + 1) += LandedCatch(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep)
TotCatch(1, Fish, TStep) += LandedCatch(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep)
TotCatch(1, Fish, NumSteps + 1) += LandedCatch(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep)
Next
Next
Next
SkipChinStk1:
Next
Case 2
Me.Text = "NonRetention Report"
Me.MortalityReportTitle.Text = "CHINOOK NonRetention"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumChinStk2
Next
GoTo SkipChinStk2
End If
SumChinStk2:
For Age As Integer = MinAge To MaxAge
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
TotCatch(Age, Fish, TStep) += NonRetention(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep)
TotCatch(Age, Fish, NumSteps + 1) += NonRetention(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep)
TotCatch(1, Fish, TStep) += NonRetention(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep)
TotCatch(1, Fish, NumSteps + 1) += NonRetention(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep)
Next
Next
Next
SkipChinStk2:
Next
Case 3
Me.Text = "Sub-Legal Shaker Report"
Me.MortalityReportTitle.Text = "CHINOOK Sub-Legal Shakers"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumChinStk3
Next
GoTo SkipChinStk3
End If
SumChinStk3:
For Age As Integer = MinAge To MaxAge
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
TotCatch(Age, Fish, TStep) += Shakers(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(Age, Fish, NumSteps + 1) += Shakers(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(1, Fish, TStep) += Shakers(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(1, Fish, NumSteps + 1) += Shakers(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
Next
Next
Next
SkipChinStk3:
Next
Case 4
Me.Text = "DropOff Report"
Me.MortalityReportTitle.Text = "CHINOOK DropOff"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumChinStk4
Next
GoTo SkipChinStk4
End If
SumChinStk4:
For Age As Integer = MinAge To MaxAge
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
TotCatch(Age, Fish, TStep) += DropOff(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep)
TotCatch(Age, Fish, NumSteps + 1) += DropOff(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep)
TotCatch(1, Fish, TStep) += DropOff(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep)
TotCatch(1, Fish, NumSteps + 1) += DropOff(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep)
Next
Next
Next
SkipChinStk4:
Next
Case 5
Me.Text = "Total Mortality Report"
Me.MortalityReportTitle.Text = "CHINOOK Total Mortality"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumChinStk5
Next
GoTo SkipChinStk5
End If
SumChinStk5:
For Age As Integer = MinAge To MaxAge
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
TotCatch(Age, Fish, TStep) += +LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(Age, Fish, NumSteps + 1) += +LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(1, Fish, TStep) += +LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(1, Fish, NumSteps + 1) += +LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
Next
Next
Next
SkipChinStk5:
Next
Case 6
Me.Text = "AEQ-Total Mortality Report"
Me.MortalityReportTitle.Text = "CHINOOK AEQ Total Mortality"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumChinStk6
Next
GoTo SkipChinStk6
End If
SumChinStk6:
For Age As Integer = MinAge To MaxAge
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
If TerminalFisheryFlag(Fish, TStep) = Term Then
TotCatch(Age, Fish, TStep) += +LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(Age, Fish, NumSteps + 1) += +LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(1, Fish, TStep) += +LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(1, Fish, NumSteps + 1) += +LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
Else
TotCatch(Age, Fish, TStep) += (+LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)) * AEQ(Stk, Age, TStep)
TotCatch(Age, Fish, NumSteps + 1) += (+LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)) * AEQ(Stk, Age, TStep)
TotCatch(1, Fish, TStep) += (+LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)) * AEQ(Stk, Age, TStep)
TotCatch(1, Fish, NumSteps + 1) += (+LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)) * AEQ(Stk, Age, TStep)
End If
Next
Next
Next
SkipChinStk6:
Next
End Select
'- Put CHINOOK Total Array into Grid
For Fish As Integer = 1 To NumFish
MortalityGrid.Item(0, ((Fish - 1) * MaxAge)).Value = FisheryName(Fish)
For Age As Integer = 1 To MaxAge
If Age = 1 Then
RowNum = (Fish - 1) * MaxAge
MortalityGrid.Item(1, RowNum).Value = "Sum"
Else
RowNum = ((Fish - 1) * MaxAge) + Age - 1
MortalityGrid.Item(1, RowNum).Value = Age
End If
For TStep As Integer = 1 To NumSteps + 1
If ModelStockProportion(Fish) <> 0 And ScreenReportType = 1 Then
MortalityGrid.Item(TStep + 1, RowNum).Value = TotCatch(Age, Fish, TStep) / ModelStockProportion(Fish)
ElseIf ScreenReportType = 2 Then
MortalityGrid.Item(TStep + 1, RowNum).Value = TotCatch(Age, Fish, TStep)
Else
MortalityGrid.Item(TStep + 1, RowNum).Value = "-"
End If
Next
Next
Next
ElseIf SpeciesName = "COHO" Then
Dim TotCatch(NumFish, NumSteps + 1)
Age = 3
Select Case MortalityType
Case 1
Me.Text = "Landed Catch Report"
Me.MortalityReportTitle.Text = "COHO Landed Catch"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumSelStk1
Next
GoTo SkipSelStk1
End If
SumSelStk1:
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
TotCatch(Fish, TStep) += LandedCatch(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep)
TotCatch(Fish, NumSteps + 1) += LandedCatch(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep)
Next
Next
SkipSelStk1:
Next
Case 2
Me.Text = "NonRetention Report"
Me.MortalityReportTitle.Text = "COHO NonRetention"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumSelStk2
Next
GoTo SkipSelStk2
End If
SumSelStk2:
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
TotCatch(Fish, TStep) += NonRetention(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep)
TotCatch(Fish, NumSteps + 1) += NonRetention(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep)
Next
Next
SkipSelStk2:
Next
Case 3
Me.Text = "Sub-Legal Shaker Report"
Me.MortalityReportTitle.Text = "COHO Shakers"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumSelStk3
Next
GoTo SkipSelStk3
End If
SumSelStk3:
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
TotCatch(Fish, TStep) += Shakers(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(Fish, NumSteps + 1) += Shakers(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
Next
Next
SkipSelStk3:
Next
Case 4
Me.Text = "DropOff Report"
Me.MortalityReportTitle.Text = "COHO DropOff"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumSelStk4
Next
GoTo SkipSelStk4
End If
SumSelStk4:
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
TotCatch(Fish, TStep) += DropOff(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep)
TotCatch(Fish, NumSteps + 1) += DropOff(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep)
Next
Next
SkipSelStk4:
Next
Case 5
Me.Text = "Total Mortality Report"
Me.MortalityReportTitle.Text = "COHO Total Mortality"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumSelStk5
Next
GoTo SkipSelStk5
End If
SumSelStk5:
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
TotCatch(Fish, TStep) += LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(Fish, NumSteps + 1) += LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
Next
Next
SkipSelStk5:
Next
End Select
'- Put COHO Total Array into Grid
For Fish As Integer = 1 To NumFish
MortalityGrid.Item(0, Fish - 1).Value = FisheryName(Fish)
For TStep As Integer = 1 To NumSteps + 1
MortalityGrid.Item(TStep, Fish - 1).Value = TotCatch(Fish, TStep)
Next
Next
End If
End Sub
Private Sub CRCancelButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CRCancelButton.Click
Me.Close()
FVS_ScreenReports.Visible = True
End Sub
Private Sub ClipBoardCopyToolStripMenuItem_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ClipBoardCopyToolStripMenuItem.Click
'- Load String for Copy/Paste Report Output
Dim ClipStr As String
Dim RecNum, ColNum As Integer
ClipStr = ""
Clipboard.Clear()
If SpeciesName = "CHINOOK" Then
ClipStr = "CHINOOK "
ElseIf SpeciesName = "COHO" Then
ClipStr = "COHO "
End If
If ScreenReportType = 1 Then
ClipStr &= "FISHERY "
ElseIf ScreenReportType = 2 Then
ClipStr &= "STOCK "
End If
Select Case MortalityType
Case 1
ClipStr &= "Landed Catch Mortality Report"
Case 2
ClipStr &= "Non-Retention Mortality Report"
Case 3
ClipStr &= "Shaker Mortality Report"
Case 4
ClipStr &= "DropOff Mortality Report"
Case 5
ClipStr &= "Total Mortality Report"
Case 6
ClipStr &= "AEQ-Total Mortality Report"
End Select
ClipStr &= " {" & RunIDNameSelect & "} " & RunIDRunTimeDateSelect.Date & vbCr
If ScreenReportType = 2 Then
ClipStr &= "STOCKS="
For Stk As Integer = 1 To NumSelectedStocks
ClipStr &= StockTitle(StockSelection(Stk)) & ","
Next
ClipStr &= vbCr
End If
If SpeciesName = "CHINOOK" Then
If AgeSumState = False Then
ClipStr &= "FisheryName" & vbTab & "Age" & vbTab & "Oct-Apr1" & vbTab & "May-June" & vbTab & "July-Sept" & vbTab & "Oct-Apr2" & vbTab & "Total" & vbCr
For RecNum = 0 To ((NumFish * MaxAge) - 1)
For ColNum = 0 To NumSteps + 2
If ColNum = 0 Then
If ((RecNum) Mod 5) = 0 Then
ClipStr &= MortalityGrid.Item(ColNum, RecNum).Value
'Else
' ClipStr &= vbTab
End If
ElseIf ColNum = 1 Then
ClipStr &= vbTab & MortalityGrid.Item(ColNum, RecNum).Value
Else
ClipStr &= vbTab & CInt(MortalityGrid.Item(ColNum, RecNum).Value)
End If
Next
ClipStr &= vbCr
Next
ElseIf AgeSumState = True Then
ClipStr &= "FisheryName" & vbTab & "Oct-Apr1" & vbTab & "May-June" & vbTab & "July-Sept" & vbTab & "Oct-Apr2" & vbTab & "Total" & vbCr
For RecNum = 0 To NumFish - 1
For ColNum = 0 To NumSteps + 1
If ColNum = 0 Then
ClipStr = ClipStr & MortalityGrid.Item(ColNum, RecNum).Value
Else
ClipStr = ClipStr & vbTab & CInt(MortalityGrid.Item(ColNum, RecNum).Value)
End If
Next
ClipStr &= vbCr
Next
End If
ElseIf SpeciesName = "COHO" Then
ClipStr &= "FisheryName" & vbTab & "Jan-June" & vbTab & "July" & vbTab & "August" & vbTab & "September" & vbTab & "Oct-Dec" & vbTab & "Total" & vbCr
For RecNum = 0 To NumFish - 1
For ColNum = 0 To NumSteps + 1
If ColNum = 0 Then
ClipStr = ClipStr & MortalityGrid.Item(ColNum, RecNum).Value
Else
ClipStr = ClipStr & vbTab & CInt(MortalityGrid.Item(ColNum, RecNum).Value)
End If
Next
ClipStr &= vbCr
Next
End If
Clipboard.SetDataObject(ClipStr)
End Sub
Private Sub MortalityTypeComboBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles MortalityTypeComboBox.SelectedIndexChanged
'- Exit for Form Load
If MortalityType = 0 Then Exit Sub
MortalityType = MortalityTypeComboBox.SelectedIndex
'- Change Mortality Type Back to One if "None Selected" (Index=0)
If MortalityType = 0 Then MortalityType = 1
If AgeSumState = False Then
Call LoadGridValues()
'Call FillMortalityGrid()
Else
Call LoadNoAgeGridValues()
'Call FillMortalityGrid()
End If
End Sub
Private Sub AgeSumButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AgeSumButton.Click
If AgeSumState = False Then
AgeSumState = True
AgeSumButton.Text = "Show Mort/Age"
Call LoadNoAgeGridValues()
Else
AgeSumState = False
AgeSumButton.Text = "Sum Age Only"
Call LoadGridValues()
End If
End Sub
Sub LoadNoAgeGridValues()
Dim SelStk As Integer
'MortalityType = 0
'MortalityTypeComboBox.Text = "Landed Catch"
'MortalityType = 1
Select Case MortalityType
Case 0
MortalityTypeComboBox.Text = "NoneSelected"
Case 1
MortalityTypeComboBox.Text = "Landed Catch"
Case 2
MortalityTypeComboBox.Text = "NonRetention"
Case 3
MortalityTypeComboBox.Text = "Shakers"
Case 4
MortalityTypeComboBox.Text = "DropOff"
Case 5
MortalityTypeComboBox.Text = "TotalMortality"
Case 5
MortalityTypeComboBox.Text = "AEQ-TotalMortality"
End Select
If ScreenReportType = 1 Then
StockTitleLabel.Visible = False
StocksSelectedLabel.Visible = False
Me.Text = "Fishery Mortality Report"
ElseIf ScreenReportType = 2 Then
StockTitleLabel.Visible = True
StocksSelectedLabel.Visible = True
StocksSelectedLabel.Text = ""
If NumSelectedStocks > 2 Then
StocksSelectedLabel.Font = New Font("Microsoft San Serif", 8, FontStyle.Bold)
Else
StocksSelectedLabel.Font = New Font("Microsoft San Serif", 10, FontStyle.Bold)
End If
For Stk As Integer = 1 To NumSelectedStocks
StocksSelectedLabel.Text &= StockTitle(StockSelection(Stk)) & ","
If Stk = 2 And NumSelectedStocks > 2 Then
StocksSelectedLabel.Text &= "--Plus More--"
Exit For
End If
Next
Me.Text = "Stock Catch Mortality Report"
End If
MortalityGrid.Columns.Clear()
MortalityGrid.ColumnHeadersDefaultCellStyle.Font = New Font("Microsoft San Serif", CInt(10 / FormWidthScaler), FontStyle.Bold)
MortalityGrid.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomCenter
If SpeciesName = "CHINOOK" Then
MortalityGrid.DefaultCellStyle.Font = New Font("Microsoft San Serif", CInt(10 / FormWidthScaler), FontStyle.Bold)
MortalityGrid.Columns.Add("Name", "FisheryName")
MortalityGrid.Columns(0).Width = 175
MortalityGrid.Columns(0).ReadOnly = True
MortalityGrid.Columns(0).DefaultCellStyle.BackColor = Color.Aquamarine
MortalityGrid.Columns.Add("T1", "Oct-Apr1")
MortalityGrid.Columns(1).Width = 100
MortalityGrid.Columns(1).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("T2", "May-June")
MortalityGrid.Columns(2).Width = 100
MortalityGrid.Columns(2).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("T3", "July-Sept")
MortalityGrid.Columns(3).Width = 100
MortalityGrid.Columns(3).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("T4", "Oct-Apr2")
MortalityGrid.Columns(4).Width = 100
MortalityGrid.Columns(4).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.Columns.Add("Total", "Total")
MortalityGrid.Columns(5).Width = 100
MortalityGrid.Columns(5).DefaultCellStyle.Format = ("########0")
MortalityGrid.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight
MortalityGrid.RowCount = NumFish
End If
'- Put CHINOOK Summed Age Data into Grid like COHO
Dim TotCatch(NumFish, NumSteps + 1)
Select Case MortalityType
Case 1
Me.Text = "Landed Catch Report"
Me.MortalityReportTitle.Text = "CHINOOK Landed Catch"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumSelStk1
Next
GoTo SkipSelStk1
End If
SumSelStk1:
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
For Age As Integer = MinAge To MaxAge
TotCatch(Fish, TStep) += LandedCatch(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep)
TotCatch(Fish, NumSteps + 1) += LandedCatch(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep)
Next
Next
Next
SkipSelStk1:
Next
Case 2
Me.Text = "NonRetention Report"
Me.MortalityReportTitle.Text = "CHINOOK NonRetention"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumSelStk2
Next
GoTo SkipSelStk2
End If
SumSelStk2:
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
For Age As Integer = MinAge To MaxAge
TotCatch(Fish, TStep) += NonRetention(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep)
TotCatch(Fish, NumSteps + 1) += NonRetention(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep)
Next
Next
Next
SkipSelStk2:
Next
Case 3
Me.Text = "Sub-Legal Shaker Report"
Me.MortalityReportTitle.Text = "CHINOOK Shakers"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumSelStk3
Next
GoTo SkipSelStk3
End If
SumSelStk3:
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
For Age As Integer = MinAge To MaxAge
TotCatch(Fish, TStep) += Shakers(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(Fish, NumSteps + 1) += Shakers(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
Next
Next
Next
SkipSelStk3:
Next
Case 4
Me.Text = "DropOff Report"
Me.MortalityReportTitle.Text = "CHINOOK DropOff"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumSelStk4
Next
GoTo SkipSelStk4
End If
SumSelStk4:
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
For Age As Integer = MinAge To MaxAge
TotCatch(Fish, TStep) += DropOff(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep)
TotCatch(Fish, NumSteps + 1) += DropOff(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep)
Next
Next
Next
SkipSelStk4:
Next
Case 5
Me.Text = "Total Mortality Report"
Me.MortalityReportTitle.Text = "CHINOOK Total Mortality"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumSelStk5
Next
GoTo SkipSelStk5
End If
SumSelStk5:
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
For Age As Integer = MinAge To MaxAge
TotCatch(Fish, TStep) += LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(Fish, NumSteps + 1) += LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
Next
Next
Next
SkipSelStk5:
Next
Case 6
Me.Text = "AEQ-Total Mortality Report"
Me.MortalityReportTitle.Text = "CHINOOK AEQ Total Mortality"
For Stk As Integer = 1 To NumStk
If ScreenReportType = 2 Then
For SelStk = 1 To NumSelectedStocks
If Stk = StockSelection(SelStk) Then GoTo SumSelStk6
Next
GoTo SkipSelStk6
End If
SumSelStk6:
For Age As Integer = MinAge To MaxAge
For Fish As Integer = 1 To NumFish
For TStep As Integer = 1 To NumSteps
If TerminalFisheryFlag(Fish, TStep) = Term Then
TotCatch(Fish, TStep) += LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
TotCatch(Fish, NumSteps + 1) += LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)
Else
TotCatch(Fish, TStep) += (LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)) * AEQ(Stk, Age, TStep)
TotCatch(Fish, NumSteps + 1) += (LandedCatch(Stk, Age, Fish, TStep) + NonRetention(Stk, Age, Fish, TStep) + DropOff(Stk, Age, Fish, TStep) + Shakers(Stk, Age, Fish, TStep) + MSFLandedCatch(Stk, Age, Fish, TStep) + MSFNonRetention(Stk, Age, Fish, TStep) + MSFDropOff(Stk, Age, Fish, TStep) + MSFShakers(Stk, Age, Fish, TStep)) * AEQ(Stk, Age, TStep)
End If
Next
Next
Next
SkipSelStk6:
Next
End Select
'- Put CHINOOK Total Array Summed across Age into Grid
For Fish As Integer = 1 To NumFish
MortalityGrid.Item(0, Fish - 1).Value = FisheryName(Fish)
For TStep As Integer = 1 To NumSteps + 1
If ModelStockProportion(Fish) <> 0 And ScreenReportType = 1 Then
MortalityGrid.Item(TStep, Fish - 1).Value = TotCatch(Fish, TStep) / ModelStockProportion(Fish)
ElseIf ScreenReportType = 2 Then
MortalityGrid.Item(TStep, Fish - 1).Value = TotCatch(Fish, TStep)
Else
MortalityGrid.Item(TStep, Fish - 1).Value = "-"
End If
Next
Next
End Sub
Private Sub MortalityGrid_CellContentClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles MortalityGrid.CellContentClick
End Sub
End Class