private void Ventana_Visor_Bases_Datos_FormClosing(object sender, FormClosingEventArgs e) { try { Temporizador_Principal.Stop(); if (Set_Datos != null) { Set_Datos.Dispose(); Set_Datos = null; } if (Adaptador_SQL != null) { Adaptador_SQL.Dispose(); Adaptador_SQL = null; } /*if (Conexión_SQL != null) * { * Conexión_SQL.Close(); * Conexión_SQL.Dispose(); * Conexión_SQL = null; * }*/ } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Registro_Cambios_FormClosing(object sender, FormClosingEventArgs e) { try { Temporizador_Principal.Stop(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); } }
private void Ventana_Descargador_Skins_Automático_FormClosing(object sender, FormClosingEventArgs e) { try { Temporizador_Principal.Stop(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); } }
private void Ventana_Extractor_Recursos_XNA_FormClosing(object sender, FormClosingEventArgs e) { try { Temporizador_Principal.Stop(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Visor_Nombres_Encantamientos_FormClosing(object sender, FormClosingEventArgs e) { try { Temporizador_Principal.Stop(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Adivinación_Número_Mágico_FormClosing(object sender, FormClosingEventArgs e) { try { Temporizador_Principal.Stop(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Descargador_Skins_Automático_Shown(object sender, EventArgs e) { try { this.Activate(); Temporizador_Principal.Start(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); } }
private void Ventana_Buscador_Archivos_Duplicados_Shown(object sender, EventArgs e) { try { this.Activate(); Temporizador_Principal.Start(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Registro_Semillas_Útiles_Shown(object sender, EventArgs e) { try { this.Activate(); Temporizador_Principal.Start(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Exportador_Estructuras_Pintadas_Shown(object sender, EventArgs e) { try { Temporizador_Principal.Start(); this.Activate(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); } }
private void Ventana_Visor_Formato_Chunks_1_13_Shown(object sender, EventArgs e) { try { this.Activate(); Temporizador_Principal.Start(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Visor_Ayuda_FormClosing(object sender, FormClosingEventArgs e) { try { Temporizador_Principal.Stop(); Cronómetro_Memoria.Reset(); Cronómetro_Memoria = null; } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); } }
private void Ventana_Visor_Recetas_Shown(object sender, EventArgs e) { try { this.Activate(); Temporizador_Principal.Start(); //System.Diagnostics.Tracing. //System.Diagnostics.Tracing.EventFieldFormat.Json; } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Comparador_Imágenes_Shown(object sender, EventArgs e) { try { this.Activate(); Temporizador_Principal.Start(); /*// This tool was actually born to check if the textures I used for my new Mars resource * // pack were the same on Minecraft 1.14.4 and 1.15.1, so this is the test function I * // used to automatically check everything, just ignore it and enjoy the rest of the tool. * string Ruta_Base = @"C:\Users\Jupisoft\AppData\Roaming\.minecraft\resourcepacks\_MARS\Jupisoft Mars Full Pack [Vanilla] [1.14+]\assets\minecraft"; * string Ruta_1_14_4 = @"C:\Users\Jupisoft\AppData\Roaming\.minecraft\resourcepacks\Jupisoft Planet Mars [1.13+]\assets\minecraft\textures orig\1.14.4\assets\minecraft"; * string Ruta_1_15_1 = @"C:\Users\Jupisoft\AppData\Roaming\.minecraft\resourcepacks\Jupisoft Planet Mars [1.13+]\assets\minecraft\textures orig\1.15.1\assets\minecraft"; * string[] Matriz_Rutas_Base = Directory.GetFiles(Ruta_Base, "*.png", SearchOption.AllDirectories); * if (Matriz_Rutas_Base != null && Matriz_Rutas_Base.Length > 0) * { * string Texto_Iguales = null; * string Texto_Diferentes = null; * string Texto_Inválidos = null; * if (Matriz_Rutas_Base.Length > 1) Array.Sort(Matriz_Rutas_Base); * int Longitud_Base = Ruta_Base.Length + 1; * foreach (string Ruta in Matriz_Rutas_Base) * { * try * { * string Ruta_1 = Ruta_1_14_4 + "\\" + Ruta.Substring(Longitud_Base); * string Ruta_2 = Ruta_1_15_1 + "\\" + Ruta.Substring(Longitud_Base); * if (File.Exists(Ruta_1) && File.Exists(Ruta_2)) * { * double Porcentaje_Iguales = Program.Comparar_Píxeles_Imágenes(Ruta_1, Ruta_2); * if (Porcentaje_Iguales >= 100d) * { * Texto_Iguales += Ruta + "\r\n"; * } * else * { * Texto_Diferentes += Ruta + "\r\n"; * } * } * else * { * Texto_Inválidos += Ruta + "\r\n"; * } * } * catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; continue; } * } * Matriz_Rutas_Base = null; * Clipboard.SetText("[Iguales]\r\n" + Texto_Iguales + "\r\n\r\n[Diferentes]\r\n" + Texto_Diferentes + "\r\n\r\n[Inválidos]\r\n" + Texto_Inválidos); * }*/ } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Semillas_Parecidas_Shown(object sender, EventArgs e) { try { /*if (string.Compare(Environment.UserName, "Jupisoft", true) == 0) * { * Buscar_Semillas_Parecidas(); // Only for me, update the similar seed list. * }*/ this.Activate(); Temporizador_Principal.Start(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Plantilla_Shown(object sender, EventArgs e) { try { this.Activate(); Temporizador_Principal.Start(); Bitmap Imagen = Generar_Imagen_Espiral((int)NumericUpDown_Ancho.Value, (int)NumericUpDown_Alto.Value, (int)NumericUpDown_Escalones.Value, false, CheckBox_Simetría.CheckState); int Zoom; Picture.BackgroundImage = Imagen; Picture.Image = Program.Obtener_Imagen_Autozoom(Imagen, Picture.ClientSize.Width, Picture.ClientSize.Height, true, CheckState.Unchecked, out Zoom); this.Text = Texto_Título + " - [Automatic zoom: " + Program.Traducir_Número(Zoom) + "x]"; Picture.Refresh(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Afinador_Bloques_Nota_FormClosing(object sender, FormClosingEventArgs e) { try { Temporizador_Principal.Stop(); if (Reproductor != null) { Reproductor.Stop(); Reproductor.Dispose(); Reproductor = null; } Pintar.Dispose(); Pintar = null; } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Plantilla_Shown(object sender, EventArgs e) { try { this.Activate(); Ancho = Picture.ClientSize.Width; Alto = Picture.ClientSize.Height; Picture.Image = new Bitmap(Ancho, Alto, PixelFormat.Format32bppArgb); Pintar = Graphics.FromImage(Picture.Image); Pintar.CompositingMode = CompositingMode.SourceOver; Pintar.CompositingQuality = CompositingQuality.HighQuality; Pintar.InterpolationMode = InterpolationMode.NearestNeighbor; Pintar.PixelOffsetMode = PixelOffsetMode.HighQuality; Pintar.SmoothingMode = SmoothingMode.None; Pintar.TranslateTransform((float)((double)Ancho / 2d), (float)((double)Alto / 2d)); Temporizador_Principal.Start(); } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Buscador_Archivos_Duplicados_FormClosing(object sender, FormClosingEventArgs e) { try { Temporizador_Principal.Stop(); if (Lector_Texto != null) { Lector_Texto.Flush(); Lector_Texto.Close(); Lector_Texto.Dispose(); Lector_Texto = null; } if (Lector != null) { Lector.Close(); Lector.Dispose(); Lector = null; } } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Simulador_Cielo_3D_Shown(object sender, EventArgs e) { try { this.Activate(); Temporizador_Principal.Start(); /*Imagen_Cielo = Program.Cargar_Imagen_Ruta(Application.StartupPath + "\\Sky\\cloud1.png", CheckState.Indeterminate); * if (Imagen_Cielo != null) * { * int Ancho = Imagen_Cielo.Width / 3; * int Alto = Imagen_Cielo.Height / 2; * Matriz_Imágenes = new Bitmap[6]; * Matriz_Imágenes[0] = Imagen_Cielo.Clone(new Rectangle(Ancho * 0, Alto * 0, Ancho, Alto), Imagen_Cielo.PixelFormat); * Matriz_Imágenes[1] = Imagen_Cielo.Clone(new Rectangle(Ancho * 1, Alto * 0, Ancho, Alto), Imagen_Cielo.PixelFormat); * Matriz_Imágenes[2] = Imagen_Cielo.Clone(new Rectangle(Ancho * 2, Alto * 0, Ancho, Alto), Imagen_Cielo.PixelFormat); * Matriz_Imágenes[3] = Imagen_Cielo.Clone(new Rectangle(Ancho * 0, Alto * 1, Ancho, Alto), Imagen_Cielo.PixelFormat); * Matriz_Imágenes[4] = Imagen_Cielo.Clone(new Rectangle(Ancho * 1, Alto * 1, Ancho, Alto), Imagen_Cielo.PixelFormat); * Matriz_Imágenes[5] = Imagen_Cielo.Clone(new Rectangle(Ancho * 2, Alto * 1, Ancho, Alto), Imagen_Cielo.PixelFormat); * } * * Picture.Image = new Bitmap(Picture.ClientSize.Width, Picture.ClientSize.Height, PixelFormat.Format32bppArgb); * * Pintar = Graphics.FromImage(Picture.Image); * Pintar.CompositingMode = CompositingMode.SourceCopy; * Pintar.CompositingQuality = CompositingQuality.HighQuality; * Pintar.InterpolationMode = InterpolationMode.HighQualityBicubic; * Pintar.PixelOffsetMode = PixelOffsetMode.HighQuality; * Pintar.SmoothingMode = SmoothingMode.HighQuality; * Pintar.TextRenderingHint = TextRenderingHint.AntiAlias; * * /*Imagen_Cielo = Program.Cargar_Imagen_Ruta(Application.StartupPath + "\\Sky\\cloud1.png", CheckState.Indeterminate); * if (Imagen_Cielo != null) * { * // Optifine needs to flip Y the bottom tile to work. * int Ancho_Alto = 64; // 24. * Imagen_Cielo = Program.Obtener_Imagen_Miniatura(Imagen_Cielo, Ancho_Alto * 3, Ancho_Alto * 2, true, false, CheckState.Checked); * Box_3D_Sky.FullBox.Valor_Z = (double)Ancho_Alto * 100d; * Picture_3D = new Box_3D_Sky.FullBox(); * //Picture_3D.Skin = Imagen_Cielo.Clone() as Image; * this.Controls.Add(Picture_3D); * Picture_3D.Dock = DockStyle.Fill; * TrackBar_FOV.Value = 46; //Picture_3D.FOV; * Picture_3D.BringToFront(); * TrackBar_Pos.SendToBack(); * TrackBar_FOV.SendToBack(); * * //Caja = new Box_3D_Sky.Box(Imagen_Cielo.Clone() as Image, new Box_3D_Sky.Point3D(0.5d, 0.5d, 0.5d), Box_3D_Sky.Effects.None); * * //Picture.Image = new Bitmap(Picture.ClientSize.Width, Picture.ClientSize.Height, PixelFormat.Format32bppArgb); * * /*Pintar = Graphics.FromImage(Picture.Image); * Pintar.CompositingMode = CompositingMode.SourceCopy; * Pintar.CompositingQuality = CompositingQuality.HighQuality; * Pintar.InterpolationMode = InterpolationMode.HighQualityBicubic; * Pintar.PixelOffsetMode = PixelOffsetMode.HighQuality; * Pintar.SmoothingMode = SmoothingMode.HighQuality; * Pintar.TextRenderingHint = TextRenderingHint.AntiAlias;*//* * } * else SystemSounds.Beep.Play();*/ } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Ventana_Visor_Nombres_Encantamientos_Shown(object sender, EventArgs e) { try { this.Activate(); Temporizador_Principal.Start(); /*Bitmap Imagen_ascii = Program.Obtener_Imagen_Ruta(@"C:\...\ascii.png"); * Bitmap Imagen_ascii_sga = Program.Obtener_Imagen_Ruta(@"C:\...\ascii_sga.png"); * Program.Obtener_Imagen_Pintada(Imagen_ascii, Color.Black); * Program.Obtener_Imagen_Pintada(Imagen_ascii_sga, Color.Black); * Program.Guardar_Imagen_Temporal(Imagen_ascii, "ascii"); * Program.Guardar_Imagen_Temporal(Imagen_ascii_sga, "ascii_sga");*/ /*Bitmap Imagen = (Bitmap)Resources.Fuente_ascii.Clone(); * Bitmap Imagen_SGA = (Bitmap)Resources.Fuente_ascii_sga.Clone(); * Graphics Pintar = Graphics.FromImage(Imagen); * Pintar.Clear(Color.Transparent); * Pintar.CompositingMode = CompositingMode.SourceCopy; * Pintar.CompositingQuality = CompositingQuality.HighQuality; * Pintar.InterpolationMode = InterpolationMode.NearestNeighbor; * Pintar.PixelOffsetMode = PixelOffsetMode.HighQuality; * Pintar.SmoothingMode = SmoothingMode.None; * Graphics Pintar_SGA = Graphics.FromImage(Imagen_SGA); * Pintar_SGA.Clear(Color.Transparent); * Pintar_SGA.CompositingMode = CompositingMode.SourceCopy; * Pintar_SGA.CompositingQuality = CompositingQuality.HighQuality; * Pintar_SGA.InterpolationMode = InterpolationMode.NearestNeighbor; * Pintar_SGA.PixelOffsetMode = PixelOffsetMode.HighQuality; * Pintar_SGA.SmoothingMode = SmoothingMode.None; * for (int Y = 0; Y < 16; Y++) * { * for (int X = 0; X < 16; X++) * { * Bitmap Imagen_Temporal = Resources.Fuente_ascii.Clone(new Rectangle(X * 8, Y * 8, 8, 8), PixelFormat.Format32bppArgb); * Bitmap Imagen_Temporal_SGA = Resources.Fuente_ascii_sga.Clone(new Rectangle(X * 8, Y * 8, 8, 8), PixelFormat.Format32bppArgb); * Rectangle Rectángulo = Program.Buscar_Zona_Recorte_Imagen(Imagen_Temporal); * Rectangle Rectángulo_SGA = Program.Buscar_Zona_Recorte_Imagen(Imagen_Temporal_SGA); * if (Rectángulo.X > -1 && Rectángulo.Y > -1 && Rectángulo.X < int.MaxValue && Rectángulo.Y < int.MaxValue && Rectángulo.Width > 0 && Rectángulo.Height > 0) * { * Rectángulo.Y = 0; // Don't move it vertically. * Rectángulo.Height = 8; * Imagen_Temporal = Imagen_Temporal.Clone(Rectángulo, PixelFormat.Format32bppArgb); * Pintar.DrawImage(Imagen_Temporal, new Rectangle((X * 8) + ((8 - Rectángulo.Width) / 2), Y * 8, Rectángulo.Width, 8), new Rectangle(0, 0, Rectángulo.Width, Rectángulo.Height), GraphicsUnit.Pixel); * } * if (Rectángulo_SGA.X > -1 && Rectángulo_SGA.Y > -1 && Rectángulo_SGA.X < int.MaxValue && Rectángulo_SGA.Y < int.MaxValue && Rectángulo_SGA.Width > 0 && Rectángulo_SGA.Height > 0) * { * Rectángulo_SGA.Y = 0; // Don't move it vertically. * Rectángulo_SGA.Height = 8; * Imagen_Temporal_SGA = Imagen_Temporal_SGA.Clone(Rectángulo_SGA, PixelFormat.Format32bppArgb); * Pintar_SGA.DrawImage(Imagen_Temporal_SGA, new Rectangle((X * 8) + ((8 - Rectángulo_SGA.Width) / 2), Y * 8, Rectángulo_SGA.Width, 8), new Rectangle(0, 0, Rectángulo_SGA.Width, Rectángulo_SGA.Height), GraphicsUnit.Pixel); * } * } * } * Pintar.Dispose(); * Pintar = null; * Pintar_SGA.Dispose(); * Pintar_SGA = null; * Program.Guardar_Imagen_Temporal(Imagen, "Fuente_ascii"); * Program.Guardar_Imagen_Temporal(Imagen_SGA, "Fuente_ascii_sga");*/ } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }
private void Temporizador_Principal_Tick(object sender, EventArgs e) { try { if (Variable_Excepción) { if ((Environment.TickCount / 500) % 2 == 0) { if (!Variable_Excepción_Imagen) { Variable_Excepción_Imagen = true; Barra_Estado_Botón_Excepción.Image = Resources.Excepción; Barra_Estado_Botón_Excepción.ForeColor = Color.Red; Barra_Estado_Botón_Excepción.Text = "Exceptions: " + Program.Traducir_Número(Variable_Excepción_Total); } } else { if (Variable_Excepción_Imagen) { Variable_Excepción_Imagen = false; Barra_Estado_Botón_Excepción.Image = Resources.Excepción_Gris; Barra_Estado_Botón_Excepción.ForeColor = Color.Black; Barra_Estado_Botón_Excepción.Text = "Exceptions: " + Program.Traducir_Número(Variable_Excepción_Total); } } if (!Barra_Estado_Botón_Excepción.Visible) { Barra_Estado_Botón_Excepción.Visible = true; } if (!Barra_Estado_Separador_1.Visible) { Barra_Estado_Separador_1.Visible = true; } } } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } try { try { Program.Proceso.Refresh(); long Memoria_Bytes = Program.Proceso.PagedMemorySize64; Barra_Estado_Etiqueta_Memoria.Text = "RAM: " + Program.Traducir_Tamaño_Bytes_Automático(Memoria_Bytes, 2, true); if (Memoria_Bytes < 4294967296L) // < 4 GB { if (Variable_Memoria) { Variable_Memoria = false; Barra_Estado_Etiqueta_Memoria.ForeColor = Color.Black; } } else // >= 4 GB { if ((Environment.TickCount / 500) % 2 == 0) { if (!Variable_Memoria) { Variable_Memoria = true; Barra_Estado_Etiqueta_Memoria.ForeColor = Color.Red; } } else { if (Variable_Memoria) { Variable_Memoria = false; Barra_Estado_Etiqueta_Memoria.ForeColor = Color.Black; } } } } catch { Barra_Estado_Etiqueta_Memoria.Text = "RAM: ? MB (? GB)"; } } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } try { if (!string.IsNullOrEmpty(Ruta_Pendiente_Abrir)) { if (!Subproceso_Activo) { Ruta_Nivel = Ruta_Pendiente_Abrir; Ruta_Pendiente_Abrir = null; Abrir_Ruta_Nivel(); return; } else { Pendiente_Subproceso_Abortar = true; return; } } if (!string.IsNullOrEmpty(Ruta_Nivel)) { if (!Subproceso_Activo) { //if (Picture.BackColor.GetHashCode() != Color_Fondo.GetHashCode()) Picture.BackColor = Color_Fondo; if (Pendiente_Invertir_Mapa) { /*Pendiente_Invertir_Mapa = false; * BitmapData Bitmap_Data = ((Bitmap)Picture.BackgroundImage).LockBits(new Rectangle(0, 0, Ancho_Cliente, Alto_Cliente), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb); * byte[] Matriz_Bytes = new byte[Math.Abs(Bitmap_Data.Stride) * Alto_Cliente]; * Marshal.Copy(Bitmap_Data.Scan0, Matriz_Bytes, 0, Matriz_Bytes.Length); * for (int Y = 0, Índice = 0; Y < Alto_Cliente; Y++) * { * for (int X = 0; X < Ancho_Cliente; X++, Índice += 4) * { * if (Matriz_Bytes[Índice + 3] > 0) // Negativizar los píxeles no transparentes * { * Matriz_Bytes[Índice + 2] = (byte)(255 - Matriz_Bytes[Índice + 2]); * Matriz_Bytes[Índice + 1] = (byte)(255 - Matriz_Bytes[Índice + 1]); * Matriz_Bytes[Índice] = (byte)(255 - Matriz_Bytes[Índice]); * } * } * } * Marshal.Copy(Matriz_Bytes, 0, Bitmap_Data.Scan0, Matriz_Bytes.Length); * ((Bitmap)Picture.BackgroundImage).UnlockBits(Bitmap_Data); * Bitmap_Data = null; * Matriz_Bytes = null; * Picture.Invalidate(); * Picture.Update();*/ } if (Pendiente_Vaciar_Toda_Caché) { Pendiente_Vaciar_Toda_Caché = false; foreach (KeyValuePair <string, string> Entrada in Diccionario_Dimensiones_Rutas) { Diccionario_Dimensiones_Caché_Regiones[Entrada.Key].Clear(); } GC.Collect(); GC.GetTotalMemory(true); } if (Pendiente_Guardar_Imagen_PNG) { /*Pendiente_Guardar_Imagen_PNG = false; * Bitmap Imagen = new Bitmap(Ancho_Cliente, Alto_Cliente, PixelFormat.Format24bppRgb); * Pintar = Graphics.FromImage(Imagen); * Pintar.Clear(Variable_Color_Fondo); * Pintar.CompositingMode = CompositingMode.SourceOver; * Pintar.DrawImage(Picture.BackgroundImage, new Rectangle(0, 0, Ancho_Cliente, Alto_Cliente), new Rectangle(0, 0, Ancho_Cliente, Alto_Cliente), GraphicsUnit.Pixel); * Pintar.Dispose(); * Pintar = null; * Program.Crear_Carpetas(Program.Ruta_Guardado_Imágenes_Realistic_World_Viewer_2D); * if (Directory.Exists(Program.Ruta_Guardado_Imágenes_Realistic_World_Viewer_2D)) * { * string Ruta = Program.Ruta_Guardado_Imágenes_Realistic_World_Viewer_2D + "\\" + Program.Obtener_Nombre_Temporal_Sin_Guiones() + " Map (" + ComboBox_Mapa.Text + (Variable_Mapa_3D ? " 3D " : " 2D ") + Variable_Dimensión.ToString().Replace('_', ' ') + ") [XYZ " + Program.Traducir_Número(Variable_X) + ", " + Program.Traducir_Número(Variable_Y) + ", " + Program.Traducir_Número(Variable_Z) + "].png"; * try * { * Imagen.Save(Ruta, ImageFormat.Png); * try { Process.Start(Ruta); } * catch { } * SystemSounds.Asterisk.Play(); * } * catch { MessageBox.Show(this, "The program couldn't save the map to:\r\n" + Ruta + ".\r\nPlease try it again later and make sure you have the right privileges.", Program.Texto_Título_Versión, MessageBoxButtons.OK, MessageBoxIcon.Warning); } * Ruta = null; * } * else MessageBox.Show(this, "The program couldn't create the save folder for the map at:\r\n" + Program.Ruta_Guardado_Imágenes_Realistic_World_Viewer_2D + ".\r\nPlease try it again later and make sure you have the right privileges.", Program.Texto_Título_Versión, MessageBoxButtons.OK, MessageBoxIcon.Warning); * Imagen.Dispose(); * Imagen = null;*/ } if (Pendiente_Copiar_Portapapeles) { /*Pendiente_Copiar_Portapapeles = false; * Bitmap Imagen = new Bitmap(Ancho_Cliente, Alto_Cliente, PixelFormat.Format24bppRgb); * Pintar = Graphics.FromImage(Imagen); * Pintar.Clear(Variable_Color_Fondo); * Pintar.CompositingMode = CompositingMode.SourceOver; * Pintar.DrawImage(Picture.BackgroundImage, new Rectangle(0, 0, Ancho_Cliente, Alto_Cliente), new Rectangle(0, 0, Ancho_Cliente, Alto_Cliente), GraphicsUnit.Pixel); * Pintar.Dispose(); * Pintar = null; * try * { * Clipboard.SetImage(Imagen); * SystemSounds.Asterisk.Play(); * } * catch { MessageBox.Show(this, "The program couldn't copy the map to the clipboard.\r\nPlease try it again in a while.", Program.Texto_Título_Versión, MessageBoxButtons.OK, MessageBoxIcon.Warning); } * Imagen.Dispose(); * Imagen = null;*/ } if (Pendiente_Copiar_Ventana_Portapapeles) { /*Pendiente_Copiar_Ventana_Portapapeles = false; * Bitmap Imagen = new Bitmap(this.Width, this.Height, PixelFormat.Format24bppRgb); * this.DrawToBitmap(Imagen, new Rectangle(0, 0, this.Width, this.Height)); * try * { * Clipboard.SetImage(Imagen); * SystemSounds.Asterisk.Play(); * } * catch { MessageBox.Show(this, "The program couldn't copy the map to the clipboard.\r\nPlease try it again in a while.", Program.Texto_Título_Versión, MessageBoxButtons.OK, MessageBoxIcon.Warning); } * Imagen.Dispose(); * Imagen = null;*/ } if (Pendiente_Redimensionar_Mapa) { /*Pendiente_Redimensionar_Mapa = false; * Picture.BackgroundImage = new Bitmap(Ancho_Cliente, Alto_Cliente, PixelFormat.Format32bppArgb); */} } if (Pendiente_Dibujar_Mapa && !Ocupado) { if (!Subproceso_Activo) { if (Pendiente_Subproceso_Abortar) { Minecraft.Pendiente_Subproceso_Abortar = false; Pendiente_Subproceso_Abortar = false; } /*if (Pendiente_Vaciar_Caché_Overworld) * { * Diccionario_Caché_Regiones_Overworld.Clear(); * Pendiente_Vaciar_Caché_Overworld = false; * } * if (Pendiente_Vaciar_Caché_Nether) * { * Diccionario_Caché_Regiones_Nether.Clear(); * Pendiente_Vaciar_Caché_Nether = false; * } * if (Pendiente_Vaciar_Caché_The_End) * { * Diccionario_Caché_Regiones_The_End.Clear(); * Pendiente_Vaciar_Caché_The_End = false; * }*/ if (!Pendiente_Subproceso_Abortar_Global) { Pendiente_Dibujar_Mapa = false; Subproceso_Activo = true; Picture.Image = null; Picture.Cursor = Cursors.WaitCursor; Subproceso = new Thread(new ParameterizedThreadStart(Subproceso_DoWork)); Subproceso.IsBackground = true; Subproceso.Priority = ThreadPriority.Normal; Subproceso.Start(); } else { Temporizador_Principal.Stop(); this.Close(); } } else if (!Pendiente_Subproceso_Abortar) { Minecraft.Pendiente_Subproceso_Abortar = true; Pendiente_Subproceso_Abortar = true; } } } else if (Pendiente_Dibujar_Mapa) { Pendiente_Dibujar_Mapa = false; // Si no hay un mapa cargado cancelar el dibujo cada vez } } catch (Exception Excepción) { Depurador.Escribir_Excepción(Excepción != null ? Excepción.ToString() : null); Variable_Excepción_Total++; Variable_Excepción = true; } }