Ejemplo n.º 1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Verify that notification was issued for the expected file removal
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// ------------------------------------------------------------------------------------
		protected void VerifyFileRemoved(object sender, ScrImportFileEventArgs e)
		{
			Assert.AreEqual(m_fileList, sender);
			int i = m_expectedRemovedFiles.IndexOf(e.FileInfo);
			if (i < 0)
				Assert.Fail("VerifyFileRemoved called with unexpected ScrImportFileEventArgs, Filename = " + e.FileInfo.FileName);
			m_expectedRemovedFiles[i] = null;
			m_callCountForVerifyFileRemoved++;
		}
Ejemplo n.º 2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Verify that notification was issued for the expected file removal
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e">Argument that tells which file was removed</param>
		/// ------------------------------------------------------------------------------------
		protected void HandleFileRemoval(object sender, ScrImportFileEventArgs e)
		{
			ListViewItem itemToRemove = null;

			foreach (ListViewItem lvi in m_currentListView.Items)
			{
				if (lvi.Tag == e.FileInfo)
				{
					itemToRemove = lvi;
					break;
				}
			}
			Debug.Assert(itemToRemove != null);
			m_currentListView.Items.Remove(itemToRemove);
		}