예제 #1
0
        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;
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
 public void DeleteTexture(TextureViewModel tex)
 {
     _textures.Remove(tex.Texture);
     Textures.Remove(tex);
 }