SHOW:
|
|
- or go back to the newest paste.
1 | - | private void BtnDel_Click(object sender, EventArgs e) |
1 | + | private void BtnDel_Click(object sender, EventArgs e) |
2 | - | { |
2 | + | { |
3 | - | ShowDialog(DATE_DIALOG); |
3 | + | ShowDialog(DATE_DIALOG); |
4 | } | |
5 | - | |
5 | + | |
6 | - | protected override Dialog OnCreateDialog(int id) |
6 | + | protected override Dialog OnCreateDialog(int id) |
7 | - | { |
7 | + | { |
8 | - | switch (id) |
8 | + | switch (id) |
9 | - | { |
9 | + | { |
10 | - | case DATE_DIALOG: |
10 | + | case DATE_DIALOG: |
11 | - | { |
11 | + | { |
12 | - | return new DatePickerDialog(this, this, year, month, day); |
12 | + | return new DatePickerDialog(this, this, year, month, day); |
13 | - | } |
13 | + | } |
14 | - | break; |
14 | + | break; |
15 | - | |
15 | + | |
16 | - | case DATE_DIALOG2: |
16 | + | case DATE_DIALOG2: |
17 | - | { |
17 | + | { |
18 | - | return new DatePickerDialog(this, this, anio, mes, dia); |
18 | + | return new DatePickerDialog(this, this, anio, mes, dia); |
19 | - | } |
19 | + | } |
20 | - | break; |
20 | + | break; |
21 | - | default: |
21 | + | default: |
22 | - | break; |
22 | + | break; |
23 | - | } |
23 | + | } |
24 | - | return null; |
24 | + | return null; |
25 | } | |
26 | - | |
26 | + | |
27 | - | public void OnDateSet(DatePicker view, int year, int month, int dayOfMonth) |
27 | + | public void OnDateSet(DatePicker view, int year, int month, int dayOfMonth) |
28 | - | { |
28 | + | { |
29 | - | this.year = year; |
29 | + | this.year = year; |
30 | - | this.month = month; |
30 | + | this.month = month; |
31 | - | this.day = dayOfMonth; |
31 | + | this.day = dayOfMonth; |
32 | - | Toast.MakeText(this, "Seleccionaste :" + (month + 1) + "/" + day + "/" + year, ToastLength.Short).Show(); |
32 | + | Toast.MakeText(this, "Seleccionaste :" + (month + 1) + "/" + day + "/" + year, ToastLength.Short).Show(); |
33 | - | string Del = (year + "-" + (month + 1) + "-" + day).ToString(); |
33 | + | string Del = (year + "-" + (month + 1) + "-" + day).ToString(); |
34 | - | btnDel.Text = Del; |
34 | + | btnDel.Text = Del; |
35 | } |