private void UpdatePictureData(string pictureURL, bool uploadingPicture) { if (InvokeRequired) { delUpdatePictureData d = new delUpdatePictureData(UpdatePictureData); this.BeginInvoke(d, pictureURL, uploadingPicture); } else { try { Cursor.Current = Cursors.Default; pictureUsed = uploadingPicture; //if (DetectDevice.DeviceType == DeviceType.Standard && !string.IsNullOrEmpty(pictureURL)) //{ if (txtStatusUpdate.Text.Length > 0) { txtStatusUpdate.Text = txtStatusUpdate.Text + ' ' + pictureURL; } else { txtStatusUpdate.Text = txtStatusUpdate.Text + pictureURL; } txtStatusUpdate.SelectionStart = txtStatusUpdate.Text.Length; pictureUsed = true; //} uploadedPictureURL = pictureURL; this.uploadingPicture = uploadingPicture; } catch (OutOfMemoryException) { } } }
private void UpdatePictureData(string pictureURL, bool uploadingPicture) { if (InvokeRequired) { delUpdatePictureData d = new delUpdatePictureData(UpdatePictureData); BeginInvoke(d, pictureURL, uploadingPicture); } else { try { Cursor.Current = Cursors.Default; if (!string.IsNullOrEmpty(pictureURL)) { if (UploadManager.Count > 0) // it should be, otherwise something is up UploadManager[0].UploadedUri = new Uri(pictureURL); if (txtStatusUpdate.Text.Length > 0) InsertTextAtCursor(' ' + pictureURL); else InsertTextAtCursor(pictureURL); } } catch (OutOfMemoryException) { } } }