private void FichaPersonaje_Load(object sender, EventArgs e) { //Codigo que pone el doublebuffered a true en los elementos que se indiquen. typeof(Panel).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, panelUno, new object[] { true }); typeof(Panel).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, panelDos, new object[] { true }); typeof(Panel).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, panelTres, new object[] { true }); typeof(PictureBox).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, pictureBox1, new object[] { true }); typeof(PictureBox).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, pictureBox2, new object[] { true }); typeof(PictureBox).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, pbImagenArma, new object[] { true }); typeof(PictureBox).InvokeMember("DoubleBuffered", BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, pbItem1, new object[] { true }); //Inicializamos el album de pj album = new Album(); //Inicializamos los booleans de clickeados. Controlan si una clase esta clickeada o no initClickeado(); contadorPj = 0; modificador = false; for (int i = 0; i < btnclickeado.Length; i++) { if (i == 0) { btnclickeado[i] = true; } else { btnclickeado[i] = false; } } //Inicializamos el uptodown inicioUptoDown(); //Inicializamos array de valores de estadisticas a 0 for (int i = 0; i < listaValoresCaract.Length; i++) { listaValoresCaract[i] = 0; } //Comprobamos la activacion del boton editar activarDesactivarEditar(); }
private void imagExportar_Click(object sender, EventArgs e) { //exportar String line; String[] aux; String[] separador = { "¡-:*!" }; if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\FichaPersonaje\\SavePJ.fpj")) { StreamReader sr = new StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\FichaPersonaje\\SavePJ.fpj"); album = new Album(); while ((line = sr.ReadLine()) != null) { aux = line.Split(separador, StringSplitOptions.RemoveEmptyEntries); album.listPj.Add(new Personaje(aux[0], aux[1], aux[2], aux[3], aux[4], aux[5], aux[6], aux[7], aux[8], aux[9])); } contadorPj = 0; cargarPJ(); sr.Close(); activarDesactivarEditar(); activarTreeSkill(); } }