public void updateViewReferState(SearchResultDownloadItem.State DownloadState) { switch (DownloadState) { case (SearchResultDownloadItem.State.Downloadable): { ToggelDownload(); break; } case (SearchResultDownloadItem.State.Downloaded): { TogglePlay(); break; } case (SearchResultDownloadItem.State.Downloading): { ToggleDownloading(); break; } default: { break; } } }
private void UpdateVideoButtonByState(SearchResultDownloadItem.State state, ImageButton downloadButton) { switch (state) { case SearchResultDownloadItem.State.Downloaded: downloadButton.Enabled = false; downloadButton.Visibility = ViewStates.Gone; break; case SearchResultDownloadItem.State.Downloading: downloadButton.Enabled = false; downloadButton.SetImageResource(Resource.Drawable.ic_downloading); break; case SearchResultDownloadItem.State.Downloadable: downloadButton.Enabled = true; downloadButton.SetImageResource(Resource.Drawable.ic_download); break; default: break; } }