示例#1
0
        public Importer()
        {
            inhibit = true;
            InitializeComponent();
            for (AssetTypeEnum i = AssetTypeEnum.Mesh; i <= AssetTypeEnum.Other; i++)
            {
                assetTypeComboBox.Items.Add(AssetTypeDesc.AssetTypeEnumName(i));
            }
            List <string> log = RepositoryClass.Instance.InitializeRepository();

            CheckLogAndMaybeExit(log);
            updateRepositoryPath();
            somethingChanged = false;
            cameFromFile     = false;
            setEnables();
            categoryPanel.Visible = false;
            genOffset             = filesListBox.Left + filesListBox.Width;
            inhibit = false;
        }
示例#2
0
        private void displayAssetDefinition()
        {
            assetNameTextBox.Text   = assetDefinition.Name;
            descriptionTextBox.Text = assetDefinition.Description;
            assetTypeComboBox.Text  = AssetTypeDesc.AssetTypeEnumName(assetDefinition.TypeEnum);
            setupCategoryComboBox(assetDefinition.TypeEnum);
            setCategory(assetDefinition.Category);
            createControlsForAssetType(assetDefinition.TypeEnum);
            int fileIndex = 0;

            foreach (FileDescControls desc in allControls)
            {
                if (fileIndex >= assetDefinition.Files.Count)
                {
                    break;
                }
                AssetTypeFileDesc d    = desc.desc;
                AssetFile         file = assetDefinition.Files[fileIndex];
                if (desc.useTextBox)
                {
                    if (d.FileTypeEnum == file.FileTypeEnum)
                    {
                        desc.textBox.Text = file.TargetFile;
                        fileIndex++;
                    }
                }
                else
                {
                    while (fileIndex < assetDefinition.Files.Count)
                    {
                        file = assetDefinition.Files[fileIndex];
                        if (d.FileTypeEnum != file.FileTypeEnum)
                        {
                            break;
                        }
                        desc.listBox.Items.Add(file.TargetFile);
                        fileIndex++;
                    }
                }
            }
        }