private void LoadInformation()
        {
            string ImageFilename = System.IO.Path.GetFileNameWithoutExtension(ExtensionMethods.ConvertPathSeparatorsToCurrentNativeSeparator(ExportTarget.ItemPath));

            this.Title = $"Export Image | {ImageFilename}";

            byte[] file = ExportTarget.Extract();
            Image = new BLP(file);

            ExportFormatComboBox.Active = (int)Config.GetDefaultImageFormat();

            MipLevelListStore.Clear();
            foreach (string mipString in Image.GetMipMapLevelStrings())
            {
                MipLevelListStore.AppendValues(true, mipString);
            }

            ExportDirectoryFileChooserButton.SetFilename(Config.GetDefaultExportDirectory());
        }
Esempio n. 2
0
        /// <summary>
        /// Loads the information from the image into the UI.
        /// </summary>
        private void LoadInformation()
        {
            var imageFilename = IOPath.GetFileNameWithoutExtension
                                (
                _exportTarget.FilePath.ConvertPathSeparatorsToCurrentNativeSeparator()
                                );

            this.Title = $"Export Image | {imageFilename}";

            var file = _exportTarget.Extract();

            _image = new BLP(file);

            _exportFormatComboBox.Active = (int)_config.DefaultImageExportFormat;

            _mipLevelListStore.Clear();
            foreach (var mipString in _image.GetMipMapLevelStrings())
            {
                _mipLevelListStore.AppendValues(true, mipString);
            }

            _exportDirectoryFileChooserButton.SetFilename(_config.DefaultExportDirectory);
        }