0% encontró este documento útil (0 votos)
30 vistas13 páginas

Unidad 2 Act 1

Descargar como docx, pdf o txt
Descargar como docx, pdf o txt
Descargar como docx, pdf o txt
Está en la página 1/ 13

UNICARIBE William hiciano 2015-2668

Unidad 2, Act. 1 – Trabajando Con MDI

En la próxima imagen se puede observar que el botón de archivo funciona ya que


al cliquear en la opción abrir se acciona el explorador de archivos.

Explorador de archivos:

1|Page
UNICARIBE William hiciano 2015-2668

En la proxima captura podemos observar que el editor de texto funciona ya que


puede abrir y leer el archivo y puede mostrar su contenido.

En la próxima imagen podemos visualizar las opciones del menú, en este caso
probaremos la opción seleccionar todo.

Efectivamente se puede
observar que la opción
seleccionar todo funciona.

2|Page
UNICARIBE William hiciano 2015-2668

En la próxima imagen probamos la función formato para poder cambiar tamaño y


el estilo a las letras, vamos a cambiar el tamaño de fuente a 16pts, y usaremos el
tipo de letra Comic Sans en Bold Italic

Ahora procedemos a cambiar el color,


utilizaremos un color rojo, así podemos
comprobar que la opción color en
nuestro editor de texto esta funcionando.

3|Page
UNICARIBE William hiciano 2015-2668

En las siguientes capturas se prueba la opción cortar, vemos como en la segunda


captura se observa que la función cortar funciona.

En la próxima imagen podemos ver que la opción guardar del editor de texto
funciona, ya que al cliquear sobre la opción nos permite guardar el documento.

4|Page
UNICARIBE William hiciano 2015-2668

Dentro del editor de texto tenemos la opción de eliminar el contenido o texto. En la


segunda imagen se puede observar que efectivamente el texto se elimina.

Por último, probamos la función de cerrar para comprobar su funcionamiento.

5|Page
UNICARIBE William hiciano 2015-2668

Código:

namespace Ricardo-Quiroz-TrabajandoConMDI
{
partial class Form1
{
/// <summary>
/// Variable de quien diseña necesaria.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Limpiando los recursos que se estén utilizando.
/// </summary>
/// <param name="disposing">true si los recursos administrados se
deben desechar; false en caso contrario.</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 de este método con el editor de código.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.archivo = new System.Windows.Forms.ToolStripMenuItem();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.abrir = new System.Windows.Forms.ToolStripMenuItem();
this.guardar = new System.Windows.Forms.ToolStripMenuItem();
this.cerrar = new System.Windows.Forms.ToolStripMenuItem();
this.edicion = new System.Windows.Forms.ToolStripMenuItem();
this.atras = new System.Windows.Forms.ToolStripMenuItem();
this.adelante = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new
System.Windows.Forms.ToolStripSeparator();
this.copiar = new System.Windows.Forms.ToolStripMenuItem();
this.cortar = new System.Windows.Forms.ToolStripMenuItem();
this.pegar = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new
System.Windows.Forms.ToolStripSeparator();

6|Page
UNICARIBE William hiciano 2015-2668

this.seleccionarTodo = new
System.Windows.Forms.ToolStripMenuItem();
this.eliminarTodo = new
System.Windows.Forms.ToolStripMenuItem();
this.color = new System.Windows.Forms.ToolStripMenuItem();
this.formato = new System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.btn_copiar = new System.Windows.Forms.ToolStripButton();
this.btn_cortar = new System.Windows.Forms.ToolStripButton();
this.btn_pegar = new System.Windows.Forms.ToolStripButton();
this.ComboBox1 = new System.Windows.Forms.ToolStripComboBox();
this.openFileDialog1 = new
System.Windows.Forms.OpenFileDialog();
this.saveFileDialog1 = new
System.Windows.Forms.SaveFileDialog();
this.fontDialog1 = new System.Windows.Forms.FontDialog();
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.menuStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.archivo,
this.edicion,
this.color,
this.formato});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(553, 24);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
// archivo
//
this.archivo.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.abrir,
this.guardar,
this.cerrar});
this.archivo.Name = "archivo";
this.archivo.Size = new System.Drawing.Size(60, 20);
this.archivo.Text = "Archivo";
//
// richTextBox1
//
this.richTextBox1.Location = new System.Drawing.Point(0, 48);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(553, 390);
this.richTextBox1.TabIndex = 1;
this.richTextBox1.Text = "";
//
// abrir
//
this.abrir.Name = "abrir";

7|Page
UNICARIBE William hiciano 2015-2668

this.abrir.ShortcutKeys = ((System.Windows.Forms.Keys)
((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
this.abrir.Size = new System.Drawing.Size(180, 22);
this.abrir.Text = "Abrir";
this.abrir.Click += new System.EventHandler(this.abrir_Click);
//
// guardar
//
this.guardar.Name = "guardar";
this.guardar.ShortcutKeys = ((System.Windows.Forms.Keys)
((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.G)));
this.guardar.Size = new System.Drawing.Size(180, 22);
this.guardar.Text = "Guardar";
this.guardar.Click += new
System.EventHandler(this.guardar_Click);
//
// cerrar
//
this.cerrar.Name = "cerrar";
this.cerrar.ShortcutKeys = System.Windows.Forms.Keys.F4;
this.cerrar.Size = new System.Drawing.Size(180, 22);
this.cerrar.Text = "Cerrar";
this.cerrar.Click += new
System.EventHandler(this.cerrar_Click);
//
// edicion
//
this.edicion.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.atras,
this.adelante,
this.toolStripSeparator1,
this.copiar,
this.cortar,
this.pegar,
this.toolStripSeparator2,
this.seleccionarTodo,
this.eliminarTodo});
this.edicion.Name = "edicion";
this.edicion.Size = new System.Drawing.Size(58, 20);
this.edicion.Text = "Edicion";
//
// atras
//
this.atras.Name = "atras";
this.atras.ShortcutKeys = ((System.Windows.Forms.Keys)
((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z)));
this.atras.Size = new System.Drawing.Size(203, 22);
this.atras.Text = "Atras";
this.atras.Click += new System.EventHandler(this.atras_Click);
//
// adelante
//
this.adelante.Name = "adelante";
this.adelante.ShortcutKeys = ((System.Windows.Forms.Keys)
((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y)));
this.adelante.Size = new System.Drawing.Size(203, 22);

8|Page
UNICARIBE William hiciano 2015-2668

this.adelante.Text = "Adelante";
this.adelante.Click += new
System.EventHandler(this.adelante_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(200,
6);
//
// copiar
//
this.copiar.Name = "copiar";
this.copiar.ShortcutKeys = ((System.Windows.Forms.Keys)
((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
this.copiar.Size = new System.Drawing.Size(203, 22);
this.copiar.Text = "Copiar";
this.copiar.Click += new
System.EventHandler(this.copiar_Click);
//
// cortar
//
this.cortar.Name = "cortar";
this.cortar.ShortcutKeys = ((System.Windows.Forms.Keys)
((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X)));
this.cortar.Size = new System.Drawing.Size(203, 22);
this.cortar.Text = "Cortar";
this.cortar.Click += new
System.EventHandler(this.cortar_Click);
//
// pegar
//
this.pegar.Name = "pegar";
this.pegar.ShortcutKeys = ((System.Windows.Forms.Keys)
((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
this.pegar.Size = new System.Drawing.Size(203, 22);
this.pegar.Text = "Pegar";
this.pegar.Click += new System.EventHandler(this.pegar_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(200,
6);
//
// seleccionarTodo
//
this.seleccionarTodo.Name = "seleccionarTodo";
this.seleccionarTodo.ShortcutKeys =
((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control |
System.Windows.Forms.Keys.E)));
this.seleccionarTodo.Size = new System.Drawing.Size(203, 22);
this.seleccionarTodo.Text = "Seleccionar Todo";
this.seleccionarTodo.Click += new
System.EventHandler(this.seleccionarTodo_Click);
//
// eliminarTodo

9|Page
UNICARIBE William hiciano 2015-2668

//
this.eliminarTodo.Name = "eliminarTodo";
this.eliminarTodo.ShortcutKeys = ((System.Windows.Forms.Keys)
((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));
this.eliminarTodo.Size = new System.Drawing.Size(203, 22);
this.eliminarTodo.Text = "Eliminar Todo";
this.eliminarTodo.Click += new
System.EventHandler(this.eliminarTodo_Click);
//
// color
//
this.color.Name = "color";
this.color.Size = new System.Drawing.Size(48, 20);
this.color.Text = "Color";
this.color.Click += new System.EventHandler(this.color_Click);
//
// formato
//
this.formato.Name = "formato";
this.formato.Size = new System.Drawing.Size(64, 20);
this.formato.Text = "Formato";
this.formato.Click += new
System.EventHandler(this.formato_Click);
//
// toolStrip1
//
this.toolStrip1.Items.AddRange(new
System.Windows.Forms.ToolStripItem[] {
this.btn_copiar,
this.btn_cortar,
this.btn_pegar,
this.ComboBox1});
this.toolStrip1.Location = new System.Drawing.Point(0, 24);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(553, 25);
this.toolStrip1.TabIndex = 2;
this.toolStrip1.Text = "toolStrip1";
//
// btn_copiar
//
this.btn_copiar.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.btn_copiar.Image = ((System.Drawing.Image)
(resources.GetObject("btn_copiar.Image")));
this.btn_copiar.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.btn_copiar.Name = "btn_copiar";
this.btn_copiar.Size = new System.Drawing.Size(23, 22);
this.btn_copiar.Text = "Copiar";
this.btn_copiar.Click += new
System.EventHandler(this.copiar_Click);
//
// btn_cortar
//
this.btn_cortar.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;

10 | P a g e
UNICARIBE William hiciano 2015-2668

this.btn_cortar.Image = ((System.Drawing.Image)
(resources.GetObject("btn_cortar.Image")));
this.btn_cortar.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.btn_cortar.Name = "btn_cortar";
this.btn_cortar.Size = new System.Drawing.Size(23, 22);
this.btn_cortar.Text = "Cortar";
this.btn_cortar.Click += new
System.EventHandler(this.cortar_Click);
//
// btn_pegar
//
this.btn_pegar.DisplayStyle =
System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.btn_pegar.Image = ((System.Drawing.Image)
(resources.GetObject("btn_pegar.Image")));
this.btn_pegar.ImageTransparentColor =
System.Drawing.Color.Magenta;
this.btn_pegar.Name = "btn_pegar";
this.btn_pegar.Size = new System.Drawing.Size(23, 22);
this.btn_pegar.Text = "Pegar";
this.btn_pegar.Click += new
System.EventHandler(this.pegar_Click);
//
// ComboBox1
//
this.ComboBox1.Items.AddRange(new object[] {
"2",
"4",
"6",
"8",
"10",
"12",
"14",
"16",
"18",
"20",
"22",
"24",
"26",
"28",
"30",
"35",
"40",
"45",
"50",
"60",
"70"});
this.ComboBox1.Name = "ComboBox1";
this.ComboBox1.Size = new System.Drawing.Size(121, 25);
this.ComboBox1.SelectedIndexChanged += new
System.EventHandler(this.seleccionar_tamaño);
//
// openFileDialog1
//
this.openFileDialog1.FileName = "openFileDialog1";
//

11 | P a g e
UNICARIBE William hiciano 2015-2668

// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ButtonFace;
this.ClientSize = new System.Drawing.Size(553, 450);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.richTextBox1);
this.Controls.Add(this.menuStrip1);
this.Name = "Form1";
this.Text = "Editor De Texto_RicardoQ";
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();

#endregion

private System.Windows.Forms.MenuStrip menuStrip1;


private System.Windows.Forms.ToolStripMenuItem archivo;
private System.Windows.Forms.ToolStripMenuItem abrir;
private System.Windows.Forms.ToolStripMenuItem guardar;
private System.Windows.Forms.ToolStripMenuItem cerrar;
private System.Windows.Forms.ToolStripMenuItem edicion;
private System.Windows.Forms.ToolStripMenuItem atras;
private System.Windows.Forms.ToolStripMenuItem adelante;
private System.Windows.Forms.ToolStripSeparator
toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem copiar;
private System.Windows.Forms.ToolStripMenuItem cortar;
private System.Windows.Forms.ToolStripMenuItem pegar;
private System.Windows.Forms.ToolStripSeparator
toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem seleccionarTodo;
private System.Windows.Forms.ToolStripMenuItem eliminarTodo;
private System.Windows.Forms.ToolStripMenuItem color;
private System.Windows.Forms.ToolStripMenuItem formato;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton btn_copiar;
private System.Windows.Forms.ToolStripButton btn_cortar;
private System.Windows.Forms.ToolStripButton btn_pegar;
private System.Windows.Forms.ToolStripComboBox ComboBox1;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
private System.Windows.Forms.FontDialog fontDialog1;
private System.Windows.Forms.ColorDialog colorDialog1;
}
}

12 | P a g e
UNICARIBE William hiciano 2015-2668

rgergq

13 | P a g e

También podría gustarte