AniDBmini.ImportWindow.OnDrop C# (CSharp) Метод

OnDrop() приватный Метод

private OnDrop ( object sender, System.Windows.DragEventArgs e ) : void
sender object
e System.Windows.DragEventArgs
Результат void
        private void OnDrop(object sender, DragEventArgs e)
        {
            if (!isWorking && e.Data.GetDataPresent(DataFormats.FileDrop))
            {
                string filePath = ((string[])e.Data.GetData(DataFormats.FileDrop))[0];
                FileInfo fi = new FileInfo(filePath);

                if (fi.Extension == ".xml" || fi.Extension == ".tgz" || fi.Extension == ".tar")
                {
                    importFilePath.Text = filePath;
                    importStart.IsEnabled = true;
                }

                e.Handled = true;
            }
        }