Beispiel #1
0
		} //

		/// <summary>
		/// Delete the currently selected file, if any.
		/// </summary>
		private void DeleteCurrentFile() {

			IMessageBox messageBox = (IMessageBox) this.ServiceProvider.GetService( typeof(IMessageBox) );
			if( messageBox.ShowConfirm( this, @"Confirm Delete", @"Delete current file?" ) == MessageResult.Accept ) {

				FileDeleteService deleter = this.GetService<FileDeleteService>();
				if( deleter != null ) {
					deleter.DeleteFileAsync( this.visitor.Current.FullName,
						Properties.SortingSettings.Default.moveToTrash );
				}

				// should not need:
				//this.visitor.RemoveCurrent();

			}

		}