private void HandleRequestComplete(object sender, RequestCompleteEventArgs rcea) { // If the auto-update timer is not enabled, then enable it if (!autoUpdateTimer.Enabled) { autoUpdateTimer.Enabled = true; } try { if (!rcea.Error) { switch (rcea.RequestType) { case RequestInterface.FRIENDS_TIMELINE: case RequestInterface.REPLIES: case RequestInterface.DIRECT_MESSAGES: //SetResult(rcea.ResponseString); ParseTimelineData(rcea.ResponseString, rcea.RequestType); break; case RequestInterface.UPDATE: MessageBox.Show("Update posted successfully", RequestInterface.UPDATE + " request completed"); ClearUpdateText(); break; } } else { MessageBox.Show(rcea.ResponseString, rcea.RequestType + " request error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); } SetPostUpdateBtnEnabled(); } catch { } finally { //Cursor.Current = Cursors.Default; } }
protected virtual void OnRequestComplete(RequestCompleteEventArgs rcea) { if (RequestComplete != null) { RequestComplete(this, rcea); } }