- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
private void OnRdbDatesCheckedChanged(object sender, EventArgs e)
{
if (rdbMonth.Checked)
MakeDateViewVisible("month");
else if (rdbQuarter.Checked)
MakeDateViewVisible("quarter");
else if (rdbYear.Checked)
MakeDateViewVisible("year");
else
MakeDateViewVisible("individual");
}
private void MakeDateViewVisible(string dateView)
{
switch (dateView)
{
case "year":
YearView.Visible = true;
QuarterView.Visible = false;
MonthView.Visible = false;
IndividualDatesView.Visible = false;
break;
case "quarter":
YearView.Visible = false;
QuarterView.Visible = true;
MonthView.Visible = false;
IndividualDatesView.Visible = false;
break;
case "month":
YearView.Visible = false;
QuarterView.Visible = false;
MonthView.Visible = true;
IndividualDatesView.Visible = false;
break;
case "individual":
YearView.Visible = false;
QuarterView.Visible = false;
MonthView.Visible = false;
IndividualDatesView.Visible = true;
break;
}
}
guest 07.01.2009 12:58 # 0
switch в таких случаях должен "схлопнуться" в пару-тройку строк при помощи паттерна strategy или сходного.
guest8 16.09.2019 21:37 # −999
guest8 21.09.2019 15:06 # −999
guest8 21.09.2019 15:11 # −999
guest8 24.09.2019 14:25 # −999
guest8 25.09.2019 16:13 # −999
guest8 25.09.2019 22:42 # −999
guest8 26.09.2019 20:29 # −999
guest8 26.09.2019 20:35 # −999
guest 08.01.2009 00:42 # 0
guest8 01.05.2019 23:45 # −999
guest8 16.09.2019 21:37 # −999
guest8 16.09.2019 21:37 # −999
ncuxonam 25.08.2021 08:03 # 0