예제 #1
0
        void runtime_WorkflowCompleted(object sender, WorkflowCompletedEventArgs e)
        {
            // Remove completed workflow from list view
            RemoveListViewItem remove = new RemoveListViewItem(RemoveListViewItemAsync);
            Invoke(remove, e.WorkflowInstance.InstanceId);

            // Remove completed workflow persistence file
            FileInfo file = new FileInfo(e.WorkflowInstance.InstanceId.ToString());
            file.Delete();
        }
예제 #2
0
        void runtime_WorkflowCompleted(object sender, WorkflowCompletedEventArgs e)
        {
            // Remove completed workflow from list view
            RemoveListViewItem remove = new RemoveListViewItem(RemoveListViewItemAsync);

            Invoke(remove, e.WorkflowInstance.InstanceId);

            // Remove completed workflow persistence file
            FileInfo file = new FileInfo(e.WorkflowInstance.InstanceId.ToString());

            file.Delete();
        }
예제 #3
0
        /// <summary>
        /// Remove an item from the collection and the TreeListView
        /// </summary>
        /// <param name="index"></param>
        public new void RemoveAt(int index)
        {
            ReadWriteLock.AcquireWriterLock(-1);
            TreeListViewItem item = this[index];

            if (this[index].Visible && this.TreeListView != null)
            {
                ListView           listview = (ListView)TreeListView;
                RemoveListViewItem remove   = new RemoveListViewItem(listview.Items.Remove);
                if (listview.InvokeRequired)
                {
                    listview.Invoke(remove, new Object[] { (ListViewItem)item });
                }
                else
                {
                    listview.Items.Remove((ListViewItem)item);
                }
            }
            List.RemoveAt(index);
            item.SetParent(null);
            ReadWriteLock.ReleaseWriterLock();
        }
예제 #4
0
 /// <summary>
 /// Remove an item from the collection and the TreeListView
 /// </summary>
 /// <param name="index"></param>
 public new void RemoveAt(int index)
 {
   ReadWriteLock.AcquireWriterLock(-1);
   TreeListViewItem item = this[index];
   if(this[index].Visible && this.TreeListView != null)
   {
     ListView listview = (ListView) TreeListView;
     RemoveListViewItem remove = new RemoveListViewItem(listview.Items.Remove);
     if(listview.InvokeRequired)
       listview.Invoke(remove, new Object[] {(ListViewItem) item});
     else
       listview.Items.Remove((ListViewItem) item);
   }
   List.RemoveAt(index);
   item.SetParent(null);
   ReadWriteLock.ReleaseWriterLock();
 }