Advertisement
Guest User

codeforexecutor

a guest
Apr 6th, 2020
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.60 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.IO;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Windows.Forms;
  11. using sxlib;
  12. using sxlib.Specialized;
  13.  
  14. namespace FirstUI
  15. {
  16.     public partial class Basic : Form
  17.     {
  18.         public bool Attached;
  19.         public bool Loaded;
  20.         public static string Direct = Directory.GetCurrentDirectory();
  21.         public Basic()
  22.         {
  23.             InitializeComponent();
  24.  
  25.             Functions.Lib = SxLib.InitializeWinForms(this, Direct);
  26.             Functions.Lib.Load();
  27.             Functions.Lib.LoadEvent += SynLoadEvent;
  28.         }
  29.  
  30.         private void SynLoadEvent(SxLibBase.SynLoadEvents Event, object Param)
  31.         {
  32.             switch(Event)
  33.             {
  34.                 case SxLibBase.SynLoadEvents.CHANGING_WL:
  35.                     this.AttachingLabel.ForeColor = Color.FromArgb(0, 0, 0);
  36.                     this.AttachingLabel.Text = "Checking Whitelist";
  37.                     return;
  38.                 case SxLibBase.SynLoadEvents.READY:
  39.                     this.AttachingLabel.ForeColor = Color.FromArgb(0, 255, 0);
  40.                     this.AttachingLabel.Text = "Ready To Attach";
  41.                     this.Loaded = true;
  42.                     return;
  43.             }
  44.         }
  45.  
  46.         private void SynAttachEvent(SxLibBase.SynAttachEvents Event, object Param)
  47.         {
  48.             switch(Event)
  49.             {
  50.                 case SxLibBase.SynAttachEvents.INJECTING:
  51.                     this.AttachingLabel.ForeColor = Color.FromArgb(0, 0, 0);
  52.                     this.AttachingLabel.Text = "Injecting";
  53.                     return;
  54.                 case SxLibBase.SynAttachEvents.READY:
  55.                     this.AttachingLabel.ForeColor = Color.FromArgb(0, 255, 0);
  56.                     this.AttachingLabel.Text = "Online";
  57.                     return;
  58.             }
  59.         }
  60.  
  61.         private void AttachButton_Click(object sender, EventArgs e)
  62.         {
  63.             Functions.Lib.Attach();
  64.             Functions.Lib.AttachEvent += SynAttachEvent;
  65.         }
  66.  
  67.         private void ClearButton_Click(object sender, EventArgs e)
  68.         {
  69.             this.ExecutingBox.Text = "";
  70.         }
  71.  
  72.         private void ExecuteButton_Click(object sender, EventArgs e)
  73.         {
  74.             string script = this.ExecutingBox.Text;
  75.             Functions.Lib.Execute(script);
  76.         }
  77.  
  78.         private void Basic_FormClosed(object sender, FormClosedEventArgs e)
  79.         {
  80.             Environment.Exit(0);
  81.         }
  82.     }
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement