public void CancelText() { try { Imagery imagery = new Imagery(); imagery.ImageryComment = ""; imagery.ImageryURI = _imageUri.Trim(); imagery.IsNew = true; imagery.IsDirty = false; imagery.Save(); GlobalData.ImageListItems.Add(imagery); UpdateGridAdapter(); } catch (Exception e) { Log.Error(TAG, "CancelText: Exception - " + e.Message); if (GlobalData.ShowErrorDialog) { ErrorDisplay.ShowErrorAlert(this, e, GetString(Resource.String.ErrorCancelImageComment), "ImageryActivity.CancelText"); } } }
public Friend(SocketUser friend) { InitializeComponent(); User = friend; label3.Text = friend.UserName; string stat; if (friend.Status == UserStatus.Online) { stat = "Online"; } else if (friend.Status == UserStatus.Offline) { stat = "Offline"; } else { stat = "Idle"; } label4.Text = stat; pictureBox1.Image = Imagery.CropToCircle(friend.Avatar, BackColor); }
private IEnumerator AddTerrain(Place place) { // Store current place this._place = place; // Convert lat/long to Google/Bing/AGOL tile. var tile = this._place.Location.ToTile(this._place.Level); // Get children. //var children = tile.GetChildren(CHILDREN_LEVEL); var children = tile.GetNeighbor(CHILDREN_LEVEL); // Elevation and texture variables. ElevationData el = null; Texture2D[] textures = new Texture2D[children.Length]; yield return(null); // Retrieve elevation. if (currentDimension == "3D") { this.StartCoroutine(Elevation.GetHeights(tile, elevation => { el = elevation; // Construct terrain if both elevation and textures downloaded. if (textures.All(t => t != null)) { this.StartCoroutine(this.BuildTerrain(el, textures)); } })); yield return(null); } // Retrieve imagery. foreach (var child in children) { this.StartCoroutine(Imagery.GetTexture(child, currentStyle, texture => { textures[Array.IndexOf(children, child)] = texture; // Construct terrain if both elevation and textures downloaded. //if (el != null && textures.All(t => t != null)) if (textures.All(t => t != null)) { this.StartCoroutine(this.BuildTerrain(el, textures)); } })); } //add 2 /* * if (needupdate) * { * this.StartCoroutine(this.Updatemap(updateURL)); * //destroy all exist building,erase the items form * GameObject[] gameObjects = GameObject.FindGameObjectsWithTag("Rotate"); * for (var i = 0; i < gameObjects.Length; i++) * { * Destroy(gameObjects[i]); * } * //StartCoroutine(Eraseitems(queryURL)); * } */ }