Sei sulla pagina 1di 11

using System;

using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
static class Program
{
/// <summary>
/// Punto de entrada principal para la aplicación.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
///////////////FORM1.CS
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
Font fuentePr;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
fuentePr = EditordeTexto.Font;
}
private void nuevoToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void ArchivoSalir_Click(object sender, EventArgs e)
{
Close();
}
private void EdicionCortar_Click(object sender, EventArgs e)
{
EditordeTexto.Cut();
}
private void EdicionCopiar_Click(object sender, EventArgs e)
{
EditordeTexto.Copy();
}
private void EdicionPegar_Click(object sender, EventArgs e)
{
EditordeTexto.Paste();
}
private void btCortar_Click(object sender, EventArgs e)
{
EditordeTexto.Cut();
}
private void btCopiar_Click(object sender, EventArgs e)
{
EditordeTexto.Copy();
}
private void btPegar_Click(object sender, EventArgs e)
{
EditordeTexto.Paste();
}
private void OpFuArial_Click(object sender, EventArgs e)
{
Font f = EditordeTexto.Font;
EditordeTexto.Font = new Font("Arial", f.Size, f.Style);
}
private void OpFuCouriernew_Click(object sender, EventArgs e)
{
Font f = EditordeTexto.Font;
EditordeTexto.Font = new Font("Courier New", f.Size, f.Style);
}
private void OpFuPredeterminada_Click(object sender, EventArgs e)
{
Font f = EditordeTexto.Font;
EditordeTexto.Font = new Font(fuentePr.SystemFontName, f.Size, f.Sty
le);
}
private void toolStripMenuItem2_Click(object sender, EventArgs e)
{
Font f = EditordeTexto.Font;
EditordeTexto.Font = new Font(f.SystemFontName, 12.0F , f.Style);
}
private void toolStripMenuItem3_Click(object sender, EventArgs e)
{
Font f = EditordeTexto.Font;
EditordeTexto.Font = new Font(f.SystemFontName, 14.0F, f.Style);
}
private void toolStripMenuItem4_Click(object sender, EventArgs e)
{
Font f = EditordeTexto.Font;
EditordeTexto.Font = new Font(f.SystemFontName, 16.0F, f.Style);
}
private void toolStripMenuItem5_Click(object sender, EventArgs e)
{
Font f = EditordeTexto.Font;
EditordeTexto.Font = new Font(f.SystemFontName, 24.0F, f.Style);
}
private void predeterminadoToolStripMenuItem_Click(object sender, EventA
rgs e)
{
Font f = EditordeTexto.Font;
EditordeTexto.Font = new Font(f.SystemFontName, fuentePr.Size, f.Sty
le);
}
}
}

///////////FORM1.DESIGNER

namespace WindowsFormsApplication1
{
partial class Form1
{
/// <summary>
/// Variable del diseñador requerida.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Limpiar los recursos que se estén utilizando.
/// </summary>
/// <param name="disposing">true si los recursos administrados se deben
eliminar; false en caso contrario, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Código generado por el Diseñador de Windows Forms
/// <summary>
/// Método necesario para admitir el Diseñador. No se puede modificar
/// el contenido del método con el editor de código.
/// </summary>
private void InitializeComponent()
{
this.BarraDeMenus = new System.Windows.Forms.MenuStrip();
this.BarraDeHerramientas = new System.Windows.Forms.ToolStrip();
this.BarraDeEstado = new System.Windows.Forms.StatusStrip();
this.EditordeTexto = new System.Windows.Forms.TextBox();
this.MenuArchivo = new System.Windows.Forms.ToolStripMenuItem();
this.ArchivoNuevo = new System.Windows.Forms.ToolStripMenuItem();
this.ArchivoAbrir = new System.Windows.Forms.ToolStripMenuItem();
this.ArchivoGuardar = new System.Windows.Forms.ToolStripMenuItem();
this.GuardarComo = new System.Windows.Forms.ToolStripMenuItem();
this.ArchivoSalir = new System.Windows.Forms.ToolStripMenuItem();
this.MenuEdicion = new System.Windows.Forms.ToolStripMenuItem();
this.MenuOpciones = new System.Windows.Forms.ToolStripMenuItem();
this.EdicionFuente = new System.Windows.Forms.ToolStripMenuItem();
this.OpcionesTam = new System.Windows.Forms.ToolStripMenuItem();
this.EdicionCortar = new System.Windows.Forms.ToolStripMenuItem();
this.EdicionCopiar = new System.Windows.Forms.ToolStripMenuItem();
this.EdicionPegar = new System.Windows.Forms.ToolStripMenuItem();
this.OpFuArial = new System.Windows.Forms.ToolStripMenuItem();
this.OpFuCouriernew = new System.Windows.Forms.ToolStripMenuItem();
this.OpFuPredeterminada = new System.Windows.Forms.ToolStripMenuItem
();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem
();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem
();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem
();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem
();
this.predeterminadoToolStripMenuItem = new System.Windows.Forms.Tool
StripMenuItem();
this.MenuDepuracion = new System.Windows.Forms.ToolStripMenuItem();
this.MenuAyuda = new System.Windows.Forms.ToolStripMenuItem();
this.btAbrir = new System.Windows.Forms.ToolStripButton();
this.btGuardar = new System.Windows.Forms.ToolStripButton();
this.btCortar = new System.Windows.Forms.ToolStripButton();
this.btCopiar = new System.Windows.Forms.ToolStripButton();
this.btPegar = new System.Windows.Forms.ToolStripButton();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.BarraDeMenus.SuspendLayout();
this.BarraDeHerramientas.SuspendLayout();
this.SuspendLayout();
//
// BarraDeMenus
//
this.BarraDeMenus.Items.AddRange(new System.Windows.Forms.ToolStripI
tem[] {
this.MenuArchivo,
this.MenuEdicion,
this.MenuOpciones,
this.MenuDepuracion,
this.MenuAyuda});
this.BarraDeMenus.Location = new System.Drawing.Point(0, 0);
this.BarraDeMenus.Name = "BarraDeMenus";
this.BarraDeMenus.Size = new System.Drawing.Size(737, 24);
this.BarraDeMenus.TabIndex = 0;
this.BarraDeMenus.Text = "BarraDeMenus";
//
// BarraDeHerramientas
//
this.BarraDeHerramientas.Items.AddRange(new System.Windows.Forms.Too
lStripItem[] {
this.btAbrir,
this.btGuardar,
this.btCortar,
this.btCopiar,
this.btPegar,
this.toolStripButton1});
this.BarraDeHerramientas.Location = new System.Drawing.Point(0, 24);
this.BarraDeHerramientas.Name = "BarraDeHerramientas";
this.BarraDeHerramientas.Size = new System.Drawing.Size(737, 25);
this.BarraDeHerramientas.TabIndex = 1;
this.BarraDeHerramientas.Text = "BarraDeHerramientas";
//
// BarraDeEstado
//
this.BarraDeEstado.Location = new System.Drawing.Point(0, 410);
this.BarraDeEstado.Name = "BarraDeEstado";
this.BarraDeEstado.Size = new System.Drawing.Size(737, 22);
this.BarraDeEstado.TabIndex = 2;
this.BarraDeEstado.Text = "Barra De Estado";
//
// EditordeTexto
//
this.EditordeTexto.AcceptsReturn = true;
this.EditordeTexto.AcceptsTab = true;
this.EditordeTexto.Dock = System.Windows.Forms.DockStyle.Fill;
this.EditordeTexto.Location = new System.Drawing.Point(0, 49);
this.EditordeTexto.Multiline = true;
this.EditordeTexto.Name = "EditordeTexto";
this.EditordeTexto.ScrollBars = System.Windows.Forms.ScrollBars.Vert
ical;
this.EditordeTexto.Size = new System.Drawing.Size(737, 361);
this.EditordeTexto.TabIndex = 2;
//
// MenuArchivo
//
this.MenuArchivo.DropDownItems.AddRange(new System.Windows.Forms.Too
lStripItem[] {
this.ArchivoNuevo,
this.ArchivoAbrir,
this.ArchivoGuardar,
this.GuardarComo,
this.ArchivoSalir});
this.MenuArchivo.Name = "MenuArchivo";
this.MenuArchivo.Size = new System.Drawing.Size(55, 20);
this.MenuArchivo.Text = "&Archivo";
//
// ArchivoNuevo
//
this.ArchivoNuevo.Name = "ArchivoNuevo";
this.ArchivoNuevo.Size = new System.Drawing.Size(166, 22);
this.ArchivoNuevo.Text = "Nuevo";
this.ArchivoNuevo.Click += new System.EventHandler(this.nuevoToolStr
ipMenuItem_Click);
//
// ArchivoAbrir
//
this.ArchivoAbrir.Name = "ArchivoAbrir";
this.ArchivoAbrir.Size = new System.Drawing.Size(166, 22);
this.ArchivoAbrir.Text = "Abrir";
//
// ArchivoGuardar
//
this.ArchivoGuardar.Name = "ArchivoGuardar";
this.ArchivoGuardar.Size = new System.Drawing.Size(166, 22);
this.ArchivoGuardar.Text = "Guardar";
//
// GuardarComo
//
this.GuardarComo.Name = "GuardarComo";
this.GuardarComo.Size = new System.Drawing.Size(166, 22);
this.GuardarComo.Text = "Guardar Como...";
//
// ArchivoSalir
//
this.ArchivoSalir.Name = "ArchivoSalir";
this.ArchivoSalir.Size = new System.Drawing.Size(166, 22);
this.ArchivoSalir.Text = "Salir";
this.ArchivoSalir.Click += new System.EventHandler(this.ArchivoSalir
_Click);
//
// MenuEdicion
//
this.MenuEdicion.DropDownItems.AddRange(new System.Windows.Forms.Too
lStripItem[] {
this.EdicionCortar,
this.EdicionCopiar,
this.EdicionPegar});
this.MenuEdicion.Name = "MenuEdicion";
this.MenuEdicion.Size = new System.Drawing.Size(52, 20);
this.MenuEdicion.Text = "&Edición";
//
// MenuOpciones
//
this.MenuOpciones.DropDownItems.AddRange(new System.Windows.Forms.To
olStripItem[] {
this.EdicionFuente,
this.OpcionesTam});
this.MenuOpciones.Name = "MenuOpciones";
this.MenuOpciones.Size = new System.Drawing.Size(63, 20);
this.MenuOpciones.Text = "&Opciones";
//
// EdicionFuente
//
this.EdicionFuente.DropDownItems.AddRange(new System.Windows.Forms.T
oolStripItem[] {
this.OpFuArial,
this.OpFuCouriernew,
this.OpFuPredeterminada});
this.EdicionFuente.Name = "EdicionFuente";
this.EdicionFuente.Size = new System.Drawing.Size(152, 22);
this.EdicionFuente.Text = "Fuente";
//
// OpcionesTam
//
this.OpcionesTam.DropDownItems.AddRange(new System.Windows.Forms.Too
lStripItem[] {
this.toolStripMenuItem2,
this.toolStripMenuItem3,
this.toolStripMenuItem4,
this.toolStripMenuItem5,
this.predeterminadoToolStripMenuItem});
this.OpcionesTam.Name = "OpcionesTam";
this.OpcionesTam.Size = new System.Drawing.Size(152, 22);
this.OpcionesTam.Text = "Tamaño";
//
// EdicionCortar
//
this.EdicionCortar.Name = "EdicionCortar";
this.EdicionCortar.ShortcutKeys = ((System.Windows.Forms.Keys)((Syst
em.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X)));
this.EdicionCortar.Size = new System.Drawing.Size(155, 22);
this.EdicionCortar.Text = "Cortar";
this.EdicionCortar.Click += new System.EventHandler(this.EdicionCort
ar_Click);
//
// EdicionCopiar
//
this.EdicionCopiar.Name = "EdicionCopiar";
this.EdicionCopiar.ShortcutKeys = ((System.Windows.Forms.Keys)((Syst
em.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
this.EdicionCopiar.Size = new System.Drawing.Size(155, 22);
this.EdicionCopiar.Text = "Copiar";
this.EdicionCopiar.Click += new System.EventHandler(this.EdicionCopi
ar_Click);
//
// EdicionPegar
//
this.EdicionPegar.Name = "EdicionPegar";
this.EdicionPegar.ShortcutKeys = ((System.Windows.Forms.Keys)((Syste
m.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
this.EdicionPegar.Size = new System.Drawing.Size(155, 22);
this.EdicionPegar.Text = "Pegar";
this.EdicionPegar.Click += new System.EventHandler(this.EdicionPegar
_Click);
//
// OpFuArial
//
this.OpFuArial.Name = "OpFuArial";
this.OpFuArial.Size = new System.Drawing.Size(161, 22);
this.OpFuArial.Text = "Arial";
this.OpFuArial.Click += new System.EventHandler(this.OpFuArial_Click
);
//
// OpFuCouriernew
//
this.OpFuCouriernew.Name = "OpFuCouriernew";
this.OpFuCouriernew.Size = new System.Drawing.Size(161, 22);
this.OpFuCouriernew.Text = "Courier new";
this.OpFuCouriernew.Click += new System.EventHandler(this.OpFuCourie
rnew_Click);
//
// OpFuPredeterminada
//
this.OpFuPredeterminada.Name = "OpFuPredeterminada";
this.OpFuPredeterminada.Size = new System.Drawing.Size(161, 22);
this.OpFuPredeterminada.Text = "Predeterminada";
this.OpFuPredeterminada.Click += new System.EventHandler(this.OpFuPr
edeterminada_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(161, 22);
this.toolStripMenuItem2.Text = "12";
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolSt
ripMenuItem2_Click);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(161, 22);
this.toolStripMenuItem3.Text = "14";
this.toolStripMenuItem3.Click += new System.EventHandler(this.toolSt
ripMenuItem3_Click);
//
// toolStripMenuItem4
//
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(161, 22);
this.toolStripMenuItem4.Text = "16";
this.toolStripMenuItem4.Click += new System.EventHandler(this.toolSt
ripMenuItem4_Click);
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(161, 22);
this.toolStripMenuItem5.Text = "24";
this.toolStripMenuItem5.Click += new System.EventHandler(this.toolSt
ripMenuItem5_Click);
//
// predeterminadoToolStripMenuItem
//
this.predeterminadoToolStripMenuItem.Name = "predeterminadoToolStrip
MenuItem";
this.predeterminadoToolStripMenuItem.Size = new System.Drawing.Size(
161, 22);
this.predeterminadoToolStripMenuItem.Text = "Predeterminado";
this.predeterminadoToolStripMenuItem.Click += new System.EventHandle
r(this.predeterminadoToolStripMenuItem_Click);
//
// MenuDepuracion
//
this.MenuDepuracion.Name = "MenuDepuracion";
this.MenuDepuracion.Size = new System.Drawing.Size(73, 20);
this.MenuDepuracion.Text = "Depuracion";
//
// MenuAyuda
//
this.MenuAyuda.Name = "MenuAyuda";
this.MenuAyuda.Size = new System.Drawing.Size(50, 20);
this.MenuAyuda.Text = "Ayuda";
//
// btAbrir
//
this.btAbrir.DisplayStyle = System.Windows.Forms.ToolStripItemDispla
yStyle.Image;
this.btAbrir.Image = global::WindowsFormsApplication1.Properties.Res
ources.Folder_32;
this.btAbrir.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btAbrir.Name = "btAbrir";
this.btAbrir.Size = new System.Drawing.Size(23, 22);
this.btAbrir.Text = "Abrir";
//
// btGuardar
//
this.btGuardar.DisplayStyle = System.Windows.Forms.ToolStripItemDisp
layStyle.Image;
this.btGuardar.Image = global::WindowsFormsApplication1.Properties.R
esources.Download_32;
this.btGuardar.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btGuardar.Name = "btGuardar";
this.btGuardar.Size = new System.Drawing.Size(23, 22);
this.btGuardar.Text = "Guardar";
//
// btCortar
//
this.btCortar.DisplayStyle = System.Windows.Forms.ToolStripItemDispl
ayStyle.Image;
this.btCortar.Image = global::WindowsFormsApplication1.Properties.Re
sources.Cut_32;
this.btCortar.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btCortar.Name = "btCortar";
this.btCortar.Size = new System.Drawing.Size(23, 22);
this.btCortar.Text = "Cortar";
this.btCortar.Click += new System.EventHandler(this.btCortar_Click);
//
// btCopiar
//
this.btCopiar.DisplayStyle = System.Windows.Forms.ToolStripItemDispl
ayStyle.Image;
this.btCopiar.Image = global::WindowsFormsApplication1.Properties.Re
sources.File_copy_32;
this.btCopiar.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btCopiar.Name = "btCopiar";
this.btCopiar.Size = new System.Drawing.Size(23, 22);
this.btCopiar.Text = "Copiar";
this.btCopiar.Click += new System.EventHandler(this.btCopiar_Click);
//
// btPegar
//
this.btPegar.DisplayStyle = System.Windows.Forms.ToolStripItemDispla
yStyle.Image;
this.btPegar.Image = global::WindowsFormsApplication1.Properties.Res
ources.Paste_32;
this.btPegar.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btPegar.Name = "btPegar";
this.btPegar.Size = new System.Drawing.Size(23, 22);
this.btPegar.Text = "Pegar";
this.btPegar.Click += new System.EventHandler(this.btPegar_Click);
//
// toolStripButton1
//
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripI
temDisplayStyle.Image;
this.toolStripButton1.Image = global::WindowsFormsApplication1.Prope
rties.Resources.Blogmarks_32;
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.M
agenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
this.toolStripButton1.Text = "Depurar";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(737, 432);
this.Controls.Add(this.EditordeTexto);
this.Controls.Add(this.BarraDeEstado);
this.Controls.Add(this.BarraDeHerramientas);
this.Controls.Add(this.BarraDeMenus);
this.MainMenuStrip = this.BarraDeMenus;
this.Name = "Form1";
this.Text = "Editor CHProgramas";
this.Load += new System.EventHandler(this.Form1_Load);
this.BarraDeMenus.ResumeLayout(false);
this.BarraDeMenus.PerformLayout();
this.BarraDeHerramientas.ResumeLayout(false);
this.BarraDeHerramientas.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip BarraDeMenus;
private System.Windows.Forms.ToolStrip BarraDeHerramientas;
private System.Windows.Forms.StatusStrip BarraDeEstado;
private System.Windows.Forms.TextBox EditordeTexto;
private System.Windows.Forms.ToolStripMenuItem MenuArchivo;
private System.Windows.Forms.ToolStripMenuItem ArchivoNuevo;
private System.Windows.Forms.ToolStripMenuItem ArchivoAbrir;
private System.Windows.Forms.ToolStripMenuItem ArchivoGuardar;
private System.Windows.Forms.ToolStripMenuItem GuardarComo;
private System.Windows.Forms.ToolStripMenuItem ArchivoSalir;
private System.Windows.Forms.ToolStripMenuItem MenuEdicion;
private System.Windows.Forms.ToolStripMenuItem MenuOpciones;
private System.Windows.Forms.ToolStripMenuItem EdicionFuente;
private System.Windows.Forms.ToolStripMenuItem OpcionesTam;
private System.Windows.Forms.ToolStripMenuItem EdicionCortar;
private System.Windows.Forms.ToolStripMenuItem EdicionCopiar;
private System.Windows.Forms.ToolStripMenuItem EdicionPegar;
private System.Windows.Forms.ToolStripMenuItem OpFuArial;
private System.Windows.Forms.ToolStripMenuItem OpFuCouriernew;
private System.Windows.Forms.ToolStripMenuItem OpFuPredeterminada;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5;
private System.Windows.Forms.ToolStripMenuItem predeterminadoToolStripMe
nuItem;
private System.Windows.Forms.ToolStripMenuItem MenuDepuracion;
private System.Windows.Forms.ToolStripMenuItem MenuAyuda;
private System.Windows.Forms.ToolStripButton btAbrir;
private System.Windows.Forms.ToolStripButton btGuardar;
private System.Windows.Forms.ToolStripButton btCortar;
private System.Windows.Forms.ToolStripButton btCopiar;
private System.Windows.Forms.ToolStripButton btPegar;
private System.Windows.Forms.ToolStripButton toolStripButton1;
}
}

Potrebbero piacerti anche