Advertisement
Guest User

Untitled

a guest
Nov 29th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.46 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using WindowsFormsApp2;
  11.  
  12.  
  13. //█░░ █▀▀█ █▀▀▀ ░▀░ █▀▀▄
  14. //█░░ █░░█ █░▀█ ▀█▀ █░░█
  15. //▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀ ▀░░▀
  16.  
  17. //█░░ █▀▀█ █▀▀▀ ░▀░ █▀▀▄
  18. //█░░ █░░█ █░▀█ ▀█▀ █░░█
  19. //▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀ ▀░░▀
  20.  
  21. //█░░ █▀▀█ █▀▀▀ ░▀░ █▀▀▄
  22. //█░░ █░░█ █░▀█ ▀█▀ █░░█
  23. //▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀ ▀░░▀
  24.  
  25. //█░░ █▀▀█ █▀▀▀ ░▀░ █▀▀▄
  26. //█░░ █░░█ █░▀█ ▀█▀ █░░█
  27. //▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀ ▀░░▀
  28.  
  29.  
  30. // NOTE: THIS IS THE LOGIN FORM (START FORM)
  31.  
  32. namespace SimpleLoader
  33. {
  34. //▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃
  35.  
  36.     public partial class Form2 : Form
  37.     {
  38.         public Point mouseLocation;
  39.  
  40.         public Form2()
  41.         {
  42.             InitializeComponent();
  43.         }
  44.  
  45.         private void textBox1_TextChanged(object sender, EventArgs e)
  46.  
  47. //▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃
  48.         {
  49.  
  50.         }
  51.  
  52.         private void button2_Click(object sender, EventArgs e)
  53.         {
  54.             Application.Exit(); // when close button is clicked, program will close
  55.  
  56.             //▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃
  57.         }
  58.  
  59.         private void Form2_Load(object sender, EventArgs e)
  60.         {
  61.  
  62.         }
  63.         //▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃
  64.  
  65.  
  66.  
  67.             // THIS IS THE LOGIN SECTION. YOU CAN MAKE SQL DATABSE IF YOU WANT TO.
  68.             // I JUST MADE THIS QUICKLY FOR AN EXAMPLE
  69.  
  70.         private void button1_Click(object sender, EventArgs e)
  71.         {
  72.             String username = "motify";
  73.             String pass = "login";
  74.  
  75.             if ((textBox1.Text == username) && (textBox2.Text == pass))
  76.             {
  77.                 MessageBox.Show("Welcome back, User!", "OmniLoader | By MoTiFy");
  78.                 WindowsFormsApp2.Form1 f1 = new Form1();
  79.                 f1.Show();
  80.                 this.Hide();
  81.             }
  82.  
  83.             else
  84.             {
  85.                 MessageBox.Show("Incorrect username or password, try again!", "OmniLoader | By MoTiFy");
  86.  
  87.             }
  88.  
  89.             //▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃
  90.  
  91.             //else (IGNORE THIS)
  92.  
  93.  
  94.         }
  95.  
  96.  //▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃
  97.  
  98.             // IGNORE THIS SECTION
  99.             // THIS ALLOWS THAT YOU CAN MOVE THE WINDOW/FORM EVERYWHERE ON YOUR SCREEN!
  100.  
  101.         private void Form2_MouseDown(object sender, MouseEventArgs e)
  102.         {
  103.             mouseLocation = new Point(-e.X, -e.Y);
  104.         }
  105.  
  106.         private void Form2_MouseMove(object sender, MouseEventArgs e)
  107.         {
  108.             if (e.Button == MouseButtons.Left)
  109.             {
  110.                 Point mousePose = Control.MousePosition;
  111.                 mousePose.Offset(mouseLocation.X, mouseLocation.Y);
  112.                 Location = mousePose;
  113.  
  114.  //▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃
  115.             }
  116.         }
  117.     }
  118. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement