Ejemplo n.º 1
0
 private void CargarCObjeto_Click(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(CodigoObjeto.Text))
     {
         Window mapa = new MapaMemoria(CodigoObjeto.Text);
         mapa.Show();
     }
 }
Ejemplo n.º 2
0
        private void Cargar_obj_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openFile = new OpenFileDialog();

            openFile.Filter = "obj Files (*.obj)|*.obj";
            if (openFile.ShowDialog() == true)
            {
                Stream stream = File.OpenRead(openFile.FileName);
                currentFilePath = openFile.FileName;
                byte[] data = new byte[stream.Length];
                stream.Read(data, 0, (int)stream.Length);
                string sinput = "";
                foreach (byte c in data)
                {
                    sinput += (char)c;
                }

                stream.Close();
                MapaMemoria mapa = new MapaMemoria(sinput);
                mapa.Show();
            }
        }