public void DownTexture(int selected) { TextureViewModel tmp = Textures[selected + 1]; Texture _tmp = _textures[selected + 1]; Textures[selected + 1] = Textures[selected]; _textures[selected + 1] = _textures[selected]; Textures[selected] = tmp; _textures[selected] = _tmp; }
public void EditTexture(TextureViewModel tex) { Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); // Set filter for file extension and default file extension dlg.DefaultExt = ".tex"; dlg.Filter = "Texture file (*.tex)|*.tex"; // Display OpenFileDialog by calling ShowDialog method Nullable <bool> result = dlg.ShowDialog(); // Get the selected file name and display in a TextBox if (result == true) { // Open document string filename = dlg.FileName; tex.Filename = filename; } }
public void DeleteTexture(TextureViewModel tex) { _textures.Remove(tex.Texture); Textures.Remove(tex); }