public override void ViewDidLoad() { base.ViewDidLoad(); StartButton.AddTarget(startTimeEntry, UIControlEvent.TouchUpInside); StopButton.AddTarget(stopTimeEntry, UIControlEvent.TouchUpInside); ShowAllTimeEntriesButton.AddTarget((s, e) => openApp(), UIControlEvent.TouchUpInside); tapGestureRecognizer = new UITapGestureRecognizer(openApp); SuggestionsTableView.RegisterNibForCellReuse(SuggestionTableViewCell.Nib, SuggestionTableViewCell.Identifier); var suggestions = SharedStorage.Instance.GetCurrentSuggestions(); if (suggestions == null) { ExtensionContext?.SetWidgetLargestAvailableDisplayMode(NCWidgetDisplayMode.Compact); return; } suggestionsCount = suggestions.Count; SuggestionsTableViewHeightConstraint.Constant = 60 * suggestionsCount; dataSource = new SuggestionsDataSource(); dataSource.Suggestions = suggestions; dataSource.Callback = continueSuggestion; SuggestionsTableView.Source = dataSource; }
void ReleaseDesignerOutlets() { if (DescriptionLabel != null) { DescriptionLabel.Dispose(); DescriptionLabel = null; } if (DotView != null) { DotView.Dispose(); DotView = null; } if (DurationLabel != null) { DurationLabel.Dispose(); DurationLabel = null; } if (ErrorMessageLabel != null) { ErrorMessageLabel.Dispose(); ErrorMessageLabel = null; } if (ProjectNameLabel != null) { ProjectNameLabel.Dispose(); ProjectNameLabel = null; } if (RunningTimerContainerCompactBottomConstraint != null) { RunningTimerContainerCompactBottomConstraint.Dispose(); RunningTimerContainerCompactBottomConstraint = null; } if (RunningTimerContainerView != null) { RunningTimerContainerView.Dispose(); RunningTimerContainerView = null; } if (ShowAllTimeEntriesButton != null) { ShowAllTimeEntriesButton.Dispose(); ShowAllTimeEntriesButton = null; } if (StartButton != null) { StartButton.Dispose(); StartButton = null; } if (StopButton != null) { StopButton.Dispose(); StopButton = null; } if (SuggestionsContainerExpandedBottomConstraint != null) { SuggestionsContainerExpandedBottomConstraint.Dispose(); SuggestionsContainerExpandedBottomConstraint = null; } if (SuggestionsContainerView != null) { SuggestionsContainerView.Dispose(); SuggestionsContainerView = null; } if (SuggestionsLabel != null) { SuggestionsLabel.Dispose(); SuggestionsLabel = null; } if (SuggestionsTableView != null) { SuggestionsTableView.Dispose(); SuggestionsTableView = null; } if (SuggestionsTableViewHeightConstraint != null) { SuggestionsTableViewHeightConstraint.Dispose(); SuggestionsTableViewHeightConstraint = null; } }