public Loading() { InitializeComponent(); Functions.Lib = SxLib.InitializeWPF(this, Direct); Functions.Lib.Load(); Functions.Lib.LoadEvent += SynLoadEvent; }
public Form1() { InitializeComponent(); Functions.Lib = SxLib.InitializeWinForms(this, Direct); Functions.Lib.Load(); Functions.Lib.LoadEvent += SynLoadEvent; }
public Form1() { InitializeComponent(); Stuff.Lib = SxLib.InitializeWinForms(this, ThisDirectory); //Initialize the form and sxlib Stuff.Lib.LoadEvent += this.SxLoadEvent; Stuff.Lib.Load(); //load sxlib }
public static void Init() { currentDomain.UnhandledException += new UnhandledExceptionEventHandler(ErrHandler); Synapse = SxLib.InitializeOffscreen(directory); Synapse.LoadEvent += Loader; Synapse.AttachEvent += Attacher; Synapse.ScriptHubEvent += ScriptHub; Synapse.Load(); }
public Source() { InitializeComponent(); IntroductionTab.BringToFront(); Text = Functions.RandomString(Functions.Rnd.Next(10, 32)); Functions.Lib = SxLib.InitializeWinForms(this, Direct); Functions.Lib.Load(); Functions.Lib.LoadEvent += this.LibraryLoadEvent; Functions.Lib.ScriptHubEvent += new SxLibWinForms.SynScriptHubDelegate(SLibOnScriptHubEvent); }
static void Main(string[] args) { SLib = SxLib.InitializeOffscreen(@"./"); if (LoadEvents == SxLibBase.SynLoadEvents.READY) { SLib.Attach(); if (AttachEvents == SxLibBase.SynAttachEvents.READY) { SLib.Execute("return nil"); } return; } SLib.Load(); }
private void Form1_Load(object sender, EventArgs e) { if (Settings2.Default.topmosts == true) { this.TopMost = true; } else { this.TopMost = false; } materialLabel1.ForeColor = Color.White; listBox1.Items.Clear(); Functions.PopulateListBox(listBox1, "./scripts", "*.txt"); Functions.PopulateListBox(listBox1, "./scripts", "*.lua"); Functions.Lib = SxLib.InitializeWinForms(this, Settings2.Default.paths); Functions.Lib.LoadEvent += LibraryLoadEvent; Functions.Lib.Load(); var materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.DARK; materialSkinManager.ColorScheme = new ColorScheme(Primary.Blue800, Primary.Blue700, Primary.Blue800, Accent.Blue100, TextShade.WHITE); this.webBrowser1.Navigate(string.Format("file:///{0}ace/AceEditor.html", AppDomain.CurrentDomain.BaseDirectory)); }
private async void Form4_Load(object sender, EventArgs e) { TUpdate("Loading"); Tools.Enabled = false; Scriptbox.Enabled = false; Scriptlist.Enabled = false; try { foreach (string path in Directory.GetFiles("./Scripts")) { this.Scriptlist.Items.Add(Path.GetFileName(path)); } } catch (Exception) { Directory.CreateDirectory("./Scripts"); foreach (string path2 in Directory.GetFiles("./Scripts")) { this.Scriptlist.Items.Add(Path.GetFileName(path2)); } } try { a = Convert.ToBoolean(new Settings().SettingsConfig.Read("ScriptsFolder", "Configuration")); if (a == false) { this.Size = new Size(500, 300); } else { this.Size = new Size(658, 300); } } catch (Exception) { } toolStripMenuItem3.Text = "Scripts Folder = " + a.ToString(); if (File.Exists("Settings.AJax")) { string tm = new Settings().SettingsConfig.Read("Topmost", "Configuration"); TopMost = Convert.ToBoolean(tm); toolStripMenuItem4.Text = "Topmost = " + TopMost.ToString(); string wr = new Settings().SettingsConfig.Read("WordWrap", "Configuration"); Scriptbox.WordWrap = Convert.ToBoolean(wr); toolStripMenuItem2.Text = "WordWrap = " + Scriptbox.WordWrap.ToString(); Scriptbox.Text = File.ReadAllText(@"bin\\AJax.lua"); } else { toolStripMenuItem4.Text = "Topmost = True"; toolStripMenuItem2.Text = "WordWrap = False"; } if (File.Exists(@"bin\\AJax.lua")) { await Task.Delay(500); Scriptbox.Text = File.ReadAllText(@"bin\\AJax.lua"); } Synapse = SxLib.InitializeOffscreen(directory); Synapse.LoadEvent += Loader; Synapse.AttachEvent += Attacher; Synapse.Load(); }
private async void SplashScreen_OnLoaded(object sender, RoutedEventArgs e) { Title = Globals.RandomString(Globals.Rnd.Next(10, 32)); new Thread(async() => { Thread.CurrentThread.IsBackground = true; string hexFrom = "#FFFFFF"; string hexTo = $"#{rand.Next(0x1000000):X6}"; while (loading) { var @from = hexFrom; var to = hexTo; Dispatcher.Invoke(() => { designMethods.FontColor(loadTextX, @from, to); }); hexFrom = hexTo; hexTo = $"#{rand.Next(0x1000000):X6}"; await Task.Delay(900); } }).Start(); foreach (FrameworkElement element in logos.Children) { designMethods.FadeIn(element); } designMethods.Shift(loadLogo, loadLogo.Margin, new Thickness(262, 62, 262, 98)); designMethods.Shift(loadText, loadText.Margin, new Thickness(270, 248, 302, 60)); designMethods.Shift(loadTextX, loadTextX.Margin, new Thickness(422, 248, 268, 60)); designMethods.Shift(statusText, statusText.Margin, new Thickness(0, 255, 0, 20)); await Task.Delay(500); designMethods.Resize(loadEllipse, 300, 300); // do all loading here // var ProcList = Process.GetProcessesByName( Path.GetFileName(AppDomain.CurrentDomain.FriendlyName)); var Current = Process.GetCurrentProcess(); foreach (var Proc in ProcList) { if (Proc.Id == Current.Id) { continue; } try { Proc.Kill(); } catch (Exception) { } } var SLib = SxLib.InitializeWPF(this, Path.Combine(Directory.GetParent(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).FullName) + "\\"); SLib.LoadEvent += async SEvent => { switch (SEvent) { case SxLibBase.SynLoadEvents.CHECKING_WL: statusText.Content = "checking whitelist..."; break; case SxLibBase.SynLoadEvents.CHANGING_WL: statusText.Content = "changing whitelist..."; break; case SxLibBase.SynLoadEvents.DOWNLOADING_DATA: statusText.Content = "downloading data..."; break; case SxLibBase.SynLoadEvents.CHECKING_DATA: statusText.Content = "checking data..."; break; case SxLibBase.SynLoadEvents.DOWNLOADING_DLLS: statusText.Content = "downloading dlls..."; break; case SxLibBase.SynLoadEvents.READY: { statusText.Content = "ready!"; await Task.Delay(1000); designMethods.Shift(loadLogo, loadLogo.Margin, new Thickness(262, 42, 262, 118)); designMethods.Shift(loadText, loadText.Margin, new Thickness(270, 228, 302, 80)); designMethods.Shift(loadTextX, loadTextX.Margin, new Thickness(422, 228, 268, 80)); designMethods.Shift(statusText, statusText.Margin, new Thickness(0, 235, 0, 40)); foreach (FrameworkElement element in logos.Children) { designMethods.FadeOut(element); } designMethods.Resize(loadEllipse, 1000, 1000); await Task.Delay(900); loading = false; ExploitScreen exploit = new ExploitScreen(); exploit.Show(); Close(); break; } default: throw new ArgumentOutOfRangeException(nameof(SEvent), SEvent, null); } }; SLib.Load(); Globals.SxLib = SLib; }