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
Ascii Maker By SaTaNa - Form1.cs

Form1.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. using System.Data;
  7. using System.IO;
  8. namespace WindowsApplication31
  9. {
  10.         /// <summary>
  11.         /// Descrizione di riepilogo per Form1.
  12.         /// </summary>
  13.         public class Form1 : System.Windows.Forms.Form
  14.         {
  15.                
  16.                 private System.Windows.Forms.TextBox o;
  17.                 private System.Windows.Forms.Button button2;
  18.                 private System.Windows.Forms.Label label1;
  19.                 private System.Windows.Forms.Label label2;
  20.                 private System.Windows.Forms.Button button3;
  21.                 private System.Windows.Forms.Button button1;
  22.                 private System.Windows.Forms.TextBox i1;
  23.                 private System.Windows.Forms.Button button4;
  24.                 private System.Windows.Forms.PictureBox pictureBox1;
  25.                 /// <summary>
  26.                 /// Variabile di progettazione necessaria.
  27.                 /// </summary>
  28.                 private System.ComponentModel.Container components = null;
  29.  
  30.                 public Form1()
  31.                 {
  32.                         //
  33.                         // Necessario per il supporto di Progettazione Windows Form
  34.                         //
  35.                         InitializeComponent();
  36.  
  37.                         //
  38.                         // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
  39.                         //
  40.                 }
  41.  
  42.                 /// <summary>
  43.                 /// Pulire le risorse in uso.
  44.                 /// </summary>
  45.                 protected override void Dispose( bool disposing )
  46.                 {
  47.                         if( disposing )
  48.                         {
  49.                                 if (components != null)
  50.                                 {
  51.                                         components.Dispose();
  52.                                 }
  53.                         }
  54.                         base.Dispose( disposing );
  55.                 }
  56.  
  57.                 #region Codice generato da Progettazione Windows Form
  58.                 /// <summary>
  59.                 /// Metodo necessario per il supporto della finestra di progettazione. Non modificare
  60.                 /// il contenuto del metodo con l'editor di codice.
  61.                 /// </summary>
  62.                 private void InitializeComponent()
  63.                 {
  64.                         System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
  65.                         this.i1 = new System.Windows.Forms.TextBox();
  66.                         this.o = new System.Windows.Forms.TextBox();
  67.                         this.button2 = new System.Windows.Forms.Button();
  68.                         this.label1 = new System.Windows.Forms.Label();
  69.                         this.label2 = new System.Windows.Forms.Label();
  70.                         this.button3 = new System.Windows.Forms.Button();
  71.                         this.button1 = new System.Windows.Forms.Button();
  72.                         this.button4 = new System.Windows.Forms.Button();
  73.                         this.pictureBox1 = new System.Windows.Forms.PictureBox();
  74.                         this.SuspendLayout();
  75.                         //
  76.                         // i1
  77.                         //
  78.                         this.i1.Font = new System.Drawing.Font("Comic Sans MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  79.                         this.i1.ForeColor = System.Drawing.Color.Black;
  80.                         this.i1.Location = new System.Drawing.Point(16, 56);
  81.                         this.i1.Name = "i1";
  82.                         this.i1.Size = new System.Drawing.Size(280, 23);
  83.                         this.i1.TabIndex = 0;
  84.                         this.i1.Text = "SataNa";
  85.                         this.i1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.i_KeyPress);
  86.                         this.i1.TextChanged += new System.EventHandler(this.i_TextChanged);
  87.                         //
  88.                         // o
  89.                         //
  90.                         this.o.Font = new System.Drawing.Font("Comic Sans MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  91.                         this.o.ForeColor = System.Drawing.Color.Black;
  92.                         this.o.Location = new System.Drawing.Point(16, 128);
  93.                         this.o.Name = "o";
  94.                         this.o.ReadOnly = true;
  95.                         this.o.Size = new System.Drawing.Size(280, 23);
  96.                         this.o.TabIndex = 1;
  97.                         this.o.Text = "§å†åÑå";
  98.                         this.o.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.o_KeyPress);
  99.                         this.o.TextChanged += new System.EventHandler(this.o_TextChanged);
  100.                         //
  101.                         // button2
  102.                         //
  103.                         this.button2.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  104.                         this.button2.ForeColor = System.Drawing.Color.Lime;
  105.                         this.button2.Location = new System.Drawing.Point(16, 176);
  106.                         this.button2.Name = "button2";
  107.                         this.button2.Size = new System.Drawing.Size(96, 32);
  108.                         this.button2.TabIndex = 3;
  109.                         this.button2.Text = "CaNCeLLa";
  110.                         this.button2.Click += new System.EventHandler(this.button2_Click);
  111.                         //
  112.                         // label1
  113.                         //
  114.                         this.label1.Font = new System.Drawing.Font("Comic Sans MS", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  115.                         this.label1.ForeColor = System.Drawing.Color.Lime;
  116.                         this.label1.Location = new System.Drawing.Point(16, 16);
  117.                         this.label1.Name = "label1";
  118.                         this.label1.Size = new System.Drawing.Size(96, 16);
  119.                         this.label1.TabIndex = 6;
  120.                         this.label1.Text = "NiCk NoRMaLe";
  121.                         //
  122.                         // label2
  123.                         //
  124.                         this.label2.Font = new System.Drawing.Font("Comic Sans MS", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  125.                         this.label2.ForeColor = System.Drawing.Color.Lime;
  126.                         this.label2.Location = new System.Drawing.Point(16, 96);
  127.                         this.label2.Name = "label2";
  128.                         this.label2.Size = new System.Drawing.Size(96, 16);
  129.                         this.label2.TabIndex = 7;
  130.                         this.label2.Text = "NiCk In ASCII";
  131.                         //
  132.                         // button3
  133.                         //
  134.                         this.button3.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  135.                         this.button3.ForeColor = System.Drawing.Color.Lime;
  136.                         this.button3.Location = new System.Drawing.Point(344, 176);
  137.                         this.button3.Name = "button3";
  138.                         this.button3.Size = new System.Drawing.Size(96, 32);
  139.                         this.button3.TabIndex = 8;
  140.                         this.button3.Text = "CoPiA";
  141.                         this.button3.Click += new System.EventHandler(this.button3_Click_1);
  142.                         //
  143.                         // button1
  144.                         //
  145.                         this.button1.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  146.                         this.button1.ForeColor = System.Drawing.Color.Lime;
  147.                         this.button1.Location = new System.Drawing.Point(16, 232);
  148.                         this.button1.Name = "button1";
  149.                         this.button1.Size = new System.Drawing.Size(128, 32);
  150.                         this.button1.TabIndex = 9;
  151.                         this.button1.Text = "DeCoRaZioNi";
  152.                         this.button1.Click += new System.EventHandler(this.button1_Click_1);
  153.                         //
  154.                         // button4
  155.                         //
  156.                         this.button4.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  157.                         this.button4.ForeColor = System.Drawing.Color.Lime;
  158.                         this.button4.Location = new System.Drawing.Point(344, 232);
  159.                         this.button4.Name = "button4";
  160.                         this.button4.Size = new System.Drawing.Size(96, 32);
  161.                         this.button4.TabIndex = 10;
  162.                         this.button4.Text = "InFo";
  163.                         this.button4.Click += new System.EventHandler(this.button4_Click_1);
  164.                         //
  165.                         // pictureBox1
  166.                         //
  167.                         this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
  168.                         this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
  169.                         this.pictureBox1.Location = new System.Drawing.Point(312, 8);
  170.                         this.pictureBox1.Name = "pictureBox1";
  171.                         this.pictureBox1.Size = new System.Drawing.Size(136, 128);
  172.                         this.pictureBox1.TabIndex = 11;
  173.                         this.pictureBox1.TabStop = false;
  174.                         //
  175.                         // Form1
  176.                         //
  177.                         this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  178.                         this.BackColor = System.Drawing.Color.Black;
  179.                         this.ClientSize = new System.Drawing.Size(450, 272);
  180.                         this.Controls.Add(this.pictureBox1);
  181.                         this.Controls.Add(this.button4);
  182.                         this.Controls.Add(this.button1);
  183.                         this.Controls.Add(this.button3);
  184.                         this.Controls.Add(this.label2);
  185.                         this.Controls.Add(this.label1);
  186.                         this.Controls.Add(this.button2);
  187.                         this.Controls.Add(this.o);
  188.                         this.Controls.Add(this.i1);
  189.                         this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
  190.                         this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
  191.                         this.MaximizeBox = false;
  192.                         this.MinimizeBox = false;
  193.                         this.Name = "Form1";
  194.                         this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  195.                         this.Text = "§å†åÑå Á§Çîî Må|<€R 1.2";
  196.                         this.Load += new System.EventHandler(this.Form1_Load);
  197.                         this.ResumeLayout(false);
  198.  
  199.                 }
  200.                 #endregion
  201.  
  202.                 /// <summary>
  203.                 /// Il punto di ingresso principale dell'applicazione.
  204.                 /// </summary>
  205.                 [STAThread]
  206.                 static void Main()
  207.                 {
  208.                         Application.Run(new SplashScreen());
  209.                         Application.Run(new Form1());
  210.                 }
  211.  
  212.                 private void button1_Click(object sender, System.EventArgs e)
  213.                 {
  214.                 }
  215.                        
  216.                
  217.  
  218.                 private void button2_Click(object sender, System.EventArgs e)
  219.                 {
  220.                         i1.Text="";
  221.                         o.Text="";
  222.                 }
  223.  
  224.                 private void button3_Click(object sender, System.EventArgs e)
  225.                 {
  226.                         Clipboard.SetDataObject(o.Text);
  227.                 }
  228.  
  229.                 private void o_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
  230.                 {
  231.                         if(e.KeyChar==Convert.ToChar(Keys.Clear) || e.KeyChar==Convert.ToChar(Keys.Cancel) || e.KeyChar==Convert.ToChar(Keys.Delete) || e.KeyChar==Convert.ToChar(Keys.Back) || e.KeyChar==Convert.ToChar(Keys.BrowserBack))
  232.                                 return;
  233.                         switch(e.KeyChar)
  234.                         {
  235.                                 case 'a': o.Text+="å";break;
  236.                                 case 'b': o.Text+="ß";break;
  237.                                 case 'c': o.Text+="¢";break;
  238.                                 case 'e': o.Text+="€";break;
  239.                                 case 'f': o.Text+="ƒ";break;
  240.                                 case 'h': o.Text+="h";break;
  241.                                 case 'H': o.Text+="][=][";break;
  242.                                 case 'n': o.Text+="ñ";break;
  243.                                 case 'N': o.Text+="Ñ";break;
  244.                                 case 'o': o.Text+="ø";break;
  245.                                 case 'r': o.Text+="®";break;
  246.                                 case 's': o.Text+="$";break;
  247.                                 case 't': o.Text+="†";break;
  248.                                 case 'T': o.Text+="']['";break;
  249.                                 case 'A': o.Text+="Á";break;
  250.                                 case 'B': o.Text+="|8";break;
  251.                                 case 'C': o.Text+="Ç";break;
  252.                                 case 'D': o.Text+="Ð";break;
  253.                                 case 'E': o.Text+="Ê";break;
  254.                                 case 'F': o.Text+="ƒ";break;
  255.                                 case 'I': o.Text+="][";break;
  256.                                 case 'L': o.Text+="]_";break;
  257.                                 case 'M': o.Text+="][V][";break;
  258.                                 case 'O': o.Text+="Ø";break;
  259.                                 case 'S': o.Text+="§";break;
  260.                                 case 'U': o.Text+="Ú";break;
  261.                                 case 'y': o.Text+="ý";break;
  262.                                 case 'Y': o.Text+="Ÿ";break;
  263.                                 case 'K': o.Text+="|<";break;
  264.                                 case 'W': o.Text+="\\X//";break;
  265.                                
  266.                                 default: o.Text+=e.KeyChar.ToString();break;
  267.                                        
  268.                         }
  269.                 }
  270.  
  271.                 private void i_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
  272.                 {
  273.                 }
  274.  
  275.                         private void button4_Click(object sender, System.EventArgs e)
  276.                         {
  277.                        
  278.                         }
  279.  
  280.                 private void o_TextChanged(object sender, System.EventArgs e)
  281.                 {
  282.                
  283.                 }
  284.  
  285.                 private void button1_Click_1(object sender, System.EventArgs e)
  286.                 {
  287.                         Form2 f = new Form2();
  288.                         f.ShowDialog();
  289.  
  290.                 }
  291.  
  292.                 private void i_TextChanged(object sender, System.EventArgs e)
  293.                 {
  294.                        
  295.                        
  296.                                 o.Text="";
  297.                                 for(int i = 0;i<i1.Text.Length;i++)
  298.                                 {
  299.                                         char c = i1.Text[i];
  300.                                         switch(c)
  301.                                         {
  302.                                                 case 'a': o.Text+="å";break;
  303.                                                 case 'b': o.Text+="ß";break;
  304.                                                 case 'c': o.Text+="¢";break;
  305.                                                 case 'e': o.Text+="€";break;
  306.                                                 case 'f': o.Text+="ƒ";break;
  307.                                                 case 'h': o.Text+="h";break;
  308.                                                 case 'H': o.Text+="][=][";break;
  309.                                                 case 'n': o.Text+="ñ";break;
  310.                                                 case 'N': o.Text+="Ñ";break;
  311.                                                 case 'o': o.Text+="ø";break;
  312.                                                 case 'r': o.Text+="®";break;
  313.                                                 case 's': o.Text+="$";break;
  314.                                                 case 't': o.Text+="†";break;
  315.                                                 case 'T': o.Text+="']['";break;
  316.                                                 case 'A': o.Text+="Á";break;
  317.                                                 case 'B': o.Text+="|8";break;
  318.                                                 case 'C': o.Text+="Ç";break;
  319.                                                 case 'D': o.Text+="Ð";break;
  320.                                                 case 'E': o.Text+="Ê";break;
  321.                                                 case 'F': o.Text+="ƒ";break;
  322.                                                 case 'I': o.Text+="][";break;
  323.                                                 case 'L': o.Text+="]_";break;
  324.                                                 case 'M': o.Text+="][V][";break;
  325.                                                 case 'O': o.Text+="Ø";break;
  326.                                                 case 'S': o.Text+="§";break;
  327.                                                 case 'U': o.Text+="Ú";break;
  328.                                                 case 'y': o.Text+="ý";break;
  329.                                                 case 'Y': o.Text+="Ÿ";break;
  330.                                                 case 'K': o.Text+="|<";break;
  331.                                                 case 'W': o.Text+="\\X//";break;                               
  332.                                                 default: o.Text+=c.ToString();break;                                   
  333.                                         }
  334.                                 }
  335.                         }
  336.  
  337.                 private void button4_Click_1(object sender, System.EventArgs e)
  338.                 {
  339.                         Form3 p = new Form3();
  340.                         p.ShowDialog();
  341.                 }
  342.  
  343.                 private void button3_Click_1(object sender, System.EventArgs e)
  344.                 {
  345.                     Clipboard.SetDataObject(o.Text);
  346.                 }
  347.  
  348.                 private void Form1_Load(object sender, System.EventArgs e)
  349.                 {
  350.                
  351.                 }
  352.         }
  353. }