Example #1
0
        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;
        }
Example #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 MaterialSelector(EMM_File _emmFile, Window parent, Material initialSelection)
 {
     emmFile = _emmFile;
     InitializeComponent();
     DataContext = this;
     Owner       = parent;
     listBox_Materials.SelectedItem = initialSelection;
     listBox_Materials.ScrollIntoView(initialSelection);
 }