Advertisement
Fhernd

Principa.cs

Feb 27th, 2018
1,476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. using System;
  2. using System.ComponentModel;
  3. using System.Windows.Forms;
  4. using R706GuardarConfiguracion.Properties;
  5.  
  6. namespace R706GuardarConfiguracion
  7. {
  8.     public partial class Principal : Form
  9.     {
  10.         public Principal()
  11.         {
  12.             InitializeComponent();
  13.         }
  14.  
  15.         private void btnCambiarConfiguracion_Click(object sender, EventArgs e)
  16.         {
  17.             Button btnPresionado = sender as Button;
  18.  
  19.             if (btnPresionado != null)
  20.             {
  21.                 txtCampoTexto.BackColor = btnPresionado.BackColor;
  22.  
  23.                 Settings.Default.ColorTexto = txtCampoTexto.BackColor;
  24.             }
  25.         }
  26.  
  27.         protected override void OnClosing(CancelEventArgs evt)
  28.         {
  29.             base.OnClosing(evt);
  30.  
  31.             Settings.Default.UbicacionVentana = this.Location;
  32.  
  33.             Settings.Default.Save();
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement