private async void DxHostOnDrop(object sender, DragEventArgs e)
        {
            if (!e.Data.GetDataPresent(DataFormats.FileDrop))
            {
                return;
            }
            string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);

            if (files == null)
            {
                return;
            }

            foreach (var file in files)
            {
                if (file.EndsWith(".icfg"))
                {
                    var cfg = ViewerConfig.LoadFromFile(file);
                    await cfg.ApplyToModels(models);
                }
                else
                {
                    await import.ImportImageAsync(file);
                }
            }
        }
示例#2
0
        private async void DxHostOnDrop(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(DataFormats.FileDrop))
            {
                string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);

                if (files != null)
                {
                    foreach (var file in files)
                    {
                        await import.ImportImageAsync(file);
                    }
                }
            }
        }