private void SetActivatedFeature() { // change logic to refer to repository for this Items.Clear(); if (SelectedLocation != null && SelectedFeatureDefinition != null) { var activeItem = repository.GetActivatedFeature(SelectedFeatureDefinition.UniqueIdentifier, SelectedLocation.UniqueId); if (activeItem != null) { var activeIndicatorItem = new ActiveIndicator <ActivatedFeature>(activeItem, true); Items.Add(activeIndicatorItem); ActiveItem = activeIndicatorItem; } else { ActiveItem = null; } } else { ActiveItem = null; } }
private void OnPlayerDisconnected(BasePlayer player, string reason) { if (ActiveIndicator.Contains(player)) { ActiveIndicator.Remove(player); } player.gameObject.GetComponent <GodmodeComponent>()?.DetachComponent(); }
private async void ImageButton_Clicked(object sender, System.EventArgs e) { Search = TxtLink.Text; TxtLink.Text = "Getting Url"; string Url = ""; ScrollResults.Content = await ActiveIndicator.DisplayBusy(); await Task.Run(() => { Url = UrlHelper.JooxUrl(Search).Result; }); if (Url != null) { TxtLink.Text = Url; int id = 0; if (GetId(Url) != null && isSong) { StackLayout StackResults = new StackLayout() { HorizontalOptions = LayoutOptions.FillAndExpand, Padding = 3, BackgroundColor = Color.FromHex("#B54800") }; SongId = GetId(Url); ScrollResults.Content = await GetSong(); } else if (GetId(Url) != null && isAlbum) { StackLayout StackResults = new StackLayout() { HorizontalOptions = LayoutOptions.FillAndExpand, Padding = 3, BackgroundColor = Color.FromHex("#B54800") }; if (Int32.TryParse(GetId(Url), out id)) { AlbumId = id; ScrollResults.Content = await GetAlbum(); } } else if ((GetId(Url) != null && isPlaylist)) { PlaytlistId = (GetId(Url)); ScrollResults.Content = await GetPlaylist(); } else { DependencyService.Get <IMessageCenter>().ShortMessage("Cannot find ID"); } } else { DependencyService.Get <IMessageCenter>().ShortMessage("Cannot find url"); } }
void WebView_LoadStarted(object sender, EventArgs e) { if (!Loaded) { Loaded = true; ActiveIndicator.StartAnimating(); CustomWebView.LoadPageStarted = true; } }
void WebView_LoadFinished(object sender, EventArgs e) { if (!Finished) { Finished = true; ActiveIndicator.StopAnimating(); CustomWebView.LoadPageFinished = true; } }
void WebView_LoadError(object sender, UIWebErrorArgs e) { if (!Failed) { Failed = true; ActiveIndicator.StopAnimating(); CustomWebView.LoadPageFailed = true; } }
} // Text to be displayed in top left corner // Use this for initialization void Awake() { // Get reference to BattleManager GameObjects Script GameObject battleManagerObj = GameObject.Find("BattleManager"); battleManager = battleManagerObj.GetComponent <BattleManager> (); // Get reference to active indicator Transform activeIndicatorObj = transform.Find("ActiveUnitIndicator"); activeIndicator = activeIndicatorObj.GetComponent <ActiveIndicator>(); statusText = (Text)transform.Find("StatusMessage").GetComponent <Text>(); gameOver = transform.Find("GameOverPanel").GetComponent <GameOver>(); }
protected async override void OnAppearing() { if (IsAlbum && IsPlaylist == false) { ScrollResults.Content = await ActiveIndicator.DisplayBusy(); ScrollResults.Content = await GetArtistAlbums(); } else if (IsAlbum == false && IsPlaylist) { ScrollResults.Content = await ActiveIndicator.DisplayBusy(); ScrollResults.Content = await GetPlaylistSongs(); } else { ScrollResults.Content = await ActiveIndicator.DisplayBusy(); ScrollResults.Content = await GetArtistSongs(); } }
private async void BtnSearch_Clicked(object sender, EventArgs e) { SearchText = TxtSearch.Text; if (RadioAlbum.IsSelected) { BtnSearch.IsEnabled = false; ScrollResults.Content = await ActiveIndicator.DisplayBusy(); ScrollResults.Content = await AlbumStackAsync(); BtnSearch.IsEnabled = true; } else { BtnSearch.IsEnabled = false; ScrollResults.Content = await ActiveIndicator.DisplayBusy(); ScrollResults.Content = await ArtistStackAsync(); BtnSearch.IsEnabled = true; } }
public override void OnPageStarted(Android.Webkit.WebView view, string url, Android.Graphics.Bitmap favicon) { base.OnPageStarted(view, url, favicon); ActiveIndicator.Show(); CustomWebView.LoadStarted(this, new EventArgs()); }
public override void OnPageFinished(Android.Webkit.WebView view, string url) { base.OnPageFinished(view, url); ActiveIndicator.Hide(); CustomWebView.LoadCompleted(this, new EventArgs()); }