Inheritance: System.EventArgs
Ejemplo n.º 1
0
 private void tw_PostDeleted(object sender, PostDeletedEventArgs e)
 {
     try
     {
         if (InvokeRequired && !IsDisposed)
         {
             Invoke((Action) (() =>
                    {
                        _statuses.RemovePostReserve(e.StatusId);
                        if (_curTab != null && _statuses.Tabs[_curTab.Text].Contains(e.StatusId))
                        {
                            this.PurgeListViewItemCache();
                            ((DetailsListView)_curTab.Tag).Update();
                            if (_curPost != null && _curPost.StatusId == e.StatusId) DispSelectedPost(true);
                        }
                    }));
             return;
         }
     }
     catch (ObjectDisposedException)
     {
         return;
     }
     catch (InvalidOperationException)
     {
         return;
     }
 }
Ejemplo n.º 2
0
 private async void tw_PostDeleted(object sender, PostDeletedEventArgs e)
 {
     try
     {
         if (InvokeRequired && !IsDisposed)
         {
             await this.InvokeAsync(async () =>
             {
                 this._statuses.RemovePostFromAllTabs(e.StatusId, setIsDeleted: true);
                 if (_curTab != null && _statuses.Tabs[_curTab.Text].Contains(e.StatusId))
                 {
                     this.PurgeListViewItemCache();
                     ((DetailsListView)_curTab.Tag).Update();
                     if (_curPost != null && _curPost.StatusId == e.StatusId)
                         await this.DispSelectedPost(true);
                 }
             });
             return;
         }
     }
     catch (ObjectDisposedException)
     {
         return;
     }
     catch (InvalidOperationException)
     {
         return;
     }
 }