private void ChangeHueForContainer(AssetContainerTool container, List <IUndoRedo> undos)
 {
     foreach (var _asset in container.Assets)
     {
         ChangeHueForAsset(_asset, undos);
     }
 }
Beispiel #2
0
        public EmmEditForm(EMM_File _emmFile, AssetContainerTool _container, AssetType _assetType, EepkEditor parent, bool isForContainer = true, string windowTitle = null)
        {
            IsForContainer = isForContainer;
            EmmFile        = _emmFile;
            container      = _container;
            assetType      = _assetType;
            InitializeComponent();
            DataContext = this;
            //Owner = parent;
            this.parent = parent;

            if (windowTitle != null)
            {
                Title += string.Format(" ({0})", windowTitle);
            }

            if (assetType != AssetType.PBIND && assetType != AssetType.TBIND && IsForContainer)
            {
                MessageBox.Show("EmmEditForm cannot be used on AssetType: " + assetType);
                Close();
            }

            dataGrid.EnableColumnVirtualization = true;
            dataGrid.EnableRowVirtualization    = true;
            dataGrid.SelectedItem = null;
        }
        public RenameForm(string originalName, string extension, string _windowTitle, object containerObject, Window parent = null, Mode _mode = Mode.Asset, int _stringSize = -1)
        {
            switch (_mode)
            {
            case Mode.Asset:
                assetContainer = containerObject as AssetContainerTool;
                break;

            case Mode.Texture:
                EmbFile = containerObject as EMB_File;
                break;

            case Mode.Material:
                EmmFile = containerObject as EMM_File;
                break;
            }

            LengthLimit = _stringSize;
            NameValue   = originalName;
            Extension   = extension;
            InitializeComponent();
            Title       = _windowTitle;
            DataContext = this;
            Owner       = parent;
            textBox.Focus();
            OriginalName = NameValue + Extension;
            CurrentMode  = _mode;
        }
Beispiel #4
0
 private void ChangeHueForContainer(AssetContainerTool container, double hueChange, double saturationChange, double lightnessChange)
 {
     foreach (var _asset in container.Assets)
     {
         ChangeHueForAsset(_asset, hueChange, saturationChange, lightnessChange);
     }
 }
Beispiel #5
0
 public ProgressBarAssetImport(AssetContainerTool _mainContainerFile, List <Asset> _selectedAssets, AssetType _type, Window parent)
 {
     container      = _mainContainerFile;
     SelectedAssets = _selectedAssets;
     type           = _type;
     InitializeComponent();
     Owner = parent;
     InitProgressBar();
     DataContext = this;
 }
        private List <RgbColor> GetUsedColersByContainer(AssetContainerTool container)
        {
            List <RgbColor> colors = new List <RgbColor>();

            foreach (var asset in container.Assets)
            {
                colors.AddRange(asset.GetUsedColors());
            }

            return(colors);
        }
        public EmbEditForm(EMB_File _embFile, AssetContainerTool _container, AssetType _assetType, EepkEditor _parent, bool isForContainer = true, string windowTitle = null)
        {
            IsForContainer = isForContainer;
            EmbFile        = _embFile;
            container      = _container;
            assetType      = _assetType;
            InitializeComponent();
            DataContext = this;
            //Owner = parent;
            parent = _parent;

            if (windowTitle != null)
            {
                Title += String.Format(" ({0})", windowTitle);
            }

            if (assetType != AssetType.PBIND && assetType != AssetType.TBIND && isForContainer)
            {
                MessageBox.Show("EmbEditForm cannot be used on AssetType: " + assetType);
                Close();
            }

            //EmbFile.LoadDdsImages(false);
        }