Пример #1
0
        public void ImportImages(string[] imagepaths)
        {
            var import = new ImportWindow();

            import.InterpolationModeBox.SelectedIndex = Properties.Settings.Default.InterpIndex;
            import.ApplyAllCheck.Checked = Properties.Settings.Default.ApplyAllCheck;
            import.StartImports(UI, imagepaths);
            Properties.Settings.Default.InterpIndex   = import.InterpolationModeBox.SelectedIndex;
            Properties.Settings.Default.ApplyAllCheck = import.ApplyAllCheck.Checked;
            var taken = ImportingMapPreviews.Concat(ExistingMapPreviews).Select(x => x.ID).ToList();

            taken.Add(-1);
            long id = taken.Max() + 1;

            foreach (var image in import.OutputImages)
            {
                MapIDControl mapbox = new MapIDControl(id, SelectedWorld is JavaWorld ? (Map) new JavaMap(image) : new BedrockMap(image));
                ImportingMapPreviews.Add(mapbox);
                UI.ImportZone.Controls.Add(mapbox);
                mapbox.MouseDown += ImportingBox_MouseDown;
                id++;
            }
        }