Example #1
0
        private async void Slurp_Load(object sender, EventArgs e)
        {
            DiscordHandler.DiscordID();
            DiscordHandler.DiscordStart();
            ConsoleH.AllocConsole();
            ConsoleH.Welcome();
            //browser//
            WebClient wc = new WebClient();

            wc.Proxy = null;
            try
            {
                RegistryKey registryKey  = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
                string      friendlyName = AppDomain.CurrentDomain.FriendlyName;
                bool        flag2        = registryKey.GetValue(friendlyName) == null;
                if (flag2)
                {
                    registryKey.SetValue(friendlyName, 11001, RegistryValueKind.DWord);
                }
                registryKey  = null;
                friendlyName = null;
            }
            catch (Exception)
            {
            }
            webBrowser1.Url = new Uri(string.Format("file:///{0}/Monaco/Monaco.html", System.IO.Path.GetDirectoryName(Application.ExecutablePath)));
            await Task.Delay(500);

            webBrowser1.Document.InvokeScript("SetTheme", new string[]
            {
                "Dark"

                /*
                 * There are 2 Themes Dark and Light
                 */
            });
            addBase();
            addMath();
            addGlobalNS();
            addGlobalV();
            addGlobalF();
            webBrowser1.Document.InvokeScript("SetText", new object[]
            {
                "-- Slurp Juice --"
            });
            //
            ListH.PopulateListBox(scriptsList, @"C:\Visual Studio Projects\Slurp Juice\Lua", "*.lua");
            ListH.PopulateListBox(scriptsList, @"C:\Visual Studio Projects\Slurp Juice\Lua", "*.txt");
            executorPanel.Hide();
            settingsPanel.Hide();
            scriptsPanel.Hide();
            homePanel.Show();
            webBrowser1.Hide();
            CheckVersion();
        }