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
Password System - Pass.cs

Pass.cs

Caricato da:
Scarica il programma completo

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6.  
  7. namespace SaTaNaRiKPaSS
  8. {
  9.         /// <summary>
  10.         /// Descrizione di riepilogo per Pass.
  11.         /// </summary>
  12.         public class Pass : System.Windows.Forms.Form
  13.         {
  14.                 private System.Windows.Forms.TextBox P;
  15.                 private System.Windows.Forms.Button button1;
  16.                 private System.Windows.Forms.Label label1;
  17.                 /// <summary>
  18.                 /// Variabile di progettazione necessaria.
  19.                 /// </summary>
  20.                 private System.ComponentModel.Container components = null;
  21.  
  22.                 public Pass()
  23.                 {
  24.                         //
  25.                         // Necessario per il supporto di Progettazione Windows Form
  26.                         //
  27.                         InitializeComponent();
  28.  
  29.                         //
  30.                         // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
  31.                         //
  32.                 }
  33.  
  34.                 /// <summary>
  35.                 /// Pulire le risorse in uso.
  36.                 /// </summary>
  37.                 protected override void Dispose( bool disposing )
  38.                 {
  39.                         if( disposing )
  40.                         {
  41.                                 if(components != null)
  42.                                 {
  43.                                         components.Dispose();
  44.                                 }
  45.                         }
  46.                         base.Dispose( disposing );
  47.                 }
  48.  
  49.                 #region Codice generato da Progettazione Windows Form
  50.                 /// <summary>
  51.                 /// Metodo necessario per il supporto della finestra di progettazione. Non modificare
  52.                 /// il contenuto del metodo con l'editor di codice.
  53.                 /// </summary>
  54.                 private void InitializeComponent()
  55.                 {
  56.                         this.P = new System.Windows.Forms.TextBox();
  57.                         this.button1 = new System.Windows.Forms.Button();
  58.                         this.label1 = new System.Windows.Forms.Label();
  59.                         this.SuspendLayout();
  60.                         //
  61.                         // P
  62.                         //
  63.                         this.P.Font = new System.Drawing.Font("Comic Sans MS", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  64.                         this.P.Location = new System.Drawing.Point(16, 32);
  65.                         this.P.Name = "P";
  66.                         this.P.Size = new System.Drawing.Size(264, 23);
  67.                         this.P.TabIndex = 0;
  68.                         this.P.Text = "";
  69.                         //
  70.                         // button1
  71.                         //
  72.                         this.button1.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  73.                         this.button1.ForeColor = System.Drawing.Color.Red;
  74.                         this.button1.Location = new System.Drawing.Point(96, 64);
  75.                         this.button1.Name = "button1";
  76.                         this.button1.Size = new System.Drawing.Size(104, 24);
  77.                         this.button1.TabIndex = 1;
  78.                         this.button1.Text = "Ok";
  79.                         this.button1.Click += new System.EventHandler(this.button1_Click);
  80.                         //
  81.                         // label1
  82.                         //
  83.                         this.label1.Font = new System.Drawing.Font("Comic Sans MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  84.                         this.label1.ForeColor = System.Drawing.Color.Red;
  85.                         this.label1.Location = new System.Drawing.Point(16, 8);
  86.                         this.label1.Name = "label1";
  87.                         this.label1.Size = new System.Drawing.Size(264, 16);
  88.                         this.label1.TabIndex = 2;
  89.                         this.label1.Text = "Inserisci Password";
  90.                         //
  91.                         // Pass
  92.                         //
  93.                         this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  94.                         this.BackColor = System.Drawing.Color.Black;
  95.                         this.ClientSize = new System.Drawing.Size(292, 94);
  96.                         this.ControlBox = false;
  97.                         this.Controls.Add(this.label1);
  98.                         this.Controls.Add(this.button1);
  99.                         this.Controls.Add(this.P);
  100.                         this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
  101.                         this.MaximizeBox = false;
  102.                         this.MinimizeBox = false;
  103.                         this.Name = "Pass";
  104.                         this.ShowInTaskbar = false;
  105.                         this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  106.                         this.Text = "Password Autorizzazione By SaTaNa";
  107.                         this.ResumeLayout(false);
  108.  
  109.                 }
  110.                 #endregion
  111.  
  112.                 private void button1_Click(object sender, System.EventArgs e)
  113.                 {
  114.                         string password=P.Text;
  115.                         if (password=="SaTaNaGoD")
  116.                         {
  117.                                 Form1 f = new Form1();
  118.                                 f.ShowDialog();
  119.                             Close();
  120.                         }
  121.                         else
  122.                         {
  123.                                 MessageBox.Show("Password Errata!","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
  124.                                 P.Text="";
  125.                                 return;
  126.                         }
  127.                 }
  128.         }
  129. }