Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
GN Mini Text Editor - Opzioni.vb

Opzioni.vb

Caricato da: GN
Scarica il programma completo

  1. Imports System.Windows.Forms
  2.  
  3. Public Class Opzioni
  4.  
  5.     Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
  6.         Me.DialogResult = System.Windows.Forms.DialogResult.OK
  7.         My.Settings.CaratterePredefinito = ImpostaCarattere.Font
  8.         My.Settings.ColoreCaratterePredefinito = ImpostaCarattere.Color
  9.         My.Settings.ColoreSfondoPredefinito = ColoreSfondo.ForeColor
  10.         My.Settings.SelezionaParole = SelezionaParole.Checked
  11.         MsgBox("Per applicare le impostazioni è necessario riavviare l'applicazione.")
  12.         Me.Close()
  13.     End Sub
  14.  
  15.     Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
  16.         Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
  17.         Carattere.Text = "Microsoft Sans Serif; 8,25pt"
  18.         ColoreSfondo.ForeColor = Color.White
  19.         Me.Close()
  20.     End Sub
  21.  
  22.     Private Sub SelezionaCarattere_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelezionaCarattere.Click
  23.         ImpostaCarattere.ShowDialog()
  24.         Carattere.Text = ImpostaCarattere.Font.Name & ";" & ImpostaCarattere.Font.SizeInPoints
  25.     End Sub
  26.  
  27.     Private Sub SelezionaSfondo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelezionaSfondo.Click
  28.         ImpostaColoreSfondo.ShowDialog()
  29.         ColoreSfondo.ForeColor = ImpostaColoreSfondo.Color
  30.     End Sub
  31.  
  32.     Private Sub Opzioni_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  33.         Carattere.Text = My.Settings.CaratterePredefinito.Name & "; " & My.Settings.CaratterePredefinito.SizeInPoints
  34.         ColoreSfondo.ForeColor = My.Settings.ColoreSfondoPredefinito
  35.     End Sub
  36. End Class