private void OnStatusSheetDismissed(object sender, UIButtonEventArgs e) { if (statusSheet.Status.HasValue && assignment != null && assignment.Status != statusSheet.Status) { if (statusSheet.Status != AssignmentStatus.Complete) { assignment.Status = statusSheet.Status.Value; var method = StatusChanged; if (method != null) { method(this, EventArgs.Empty); } } else { var method = Completed; if (method != null) { method(this, EventArgs.Empty); } } } statusSheet.Dismissed -= OnStatusSheetDismissed; statusSheet.Dispose(); statusSheet = null; }
private void OnStatusSheetDismissed(object sender, UIButtonEventArgs e) { if (statusSheet.Status.HasValue && assignment != null && assignment.Status != statusSheet.Status) { if (statusSheet.Status != AssignmentStatus.Complete) { assignment.Status = statusSheet.Status.Value; var method = StatusChanged; if (method != null) { method(this, EventArgs.Empty); } } else { var method = Completed; if (method != null) { method(this, EventArgs.Empty); } } } statusSheet.Dismissed -= OnStatusSheetDismissed; statusSheet.Dispose (); statusSheet = null; }
/// <summary> /// Event when clicked /// </summary> private void OnTouchUpInside(object sender, EventArgs e) { statusSheet = new AssignmentStatusSheet(); statusSheet.Dismissed += OnStatusSheetDismissed; statusSheet.ShowFrom(Frame, Superview, true); }
/// <summary> /// Event when clicked /// </summary> private void OnTouchUpInside(object sender, EventArgs e) { statusSheet = new AssignmentStatusSheet (); statusSheet.Dismissed += OnStatusSheetDismissed; statusSheet.ShowFrom (Frame, Superview, true); }