Esempio n. 1
0
        private void Execwindow_Loaded(object sender, RoutedEventArgs e)
        {
            if (checkBlacklisted() == true)
            {
                MessageBox.Show("Sorry you blacklisted!", "SpiderReborn", MessageBoxButton.OK, MessageBoxImage.Error);
                Environment.Exit(0);
            }
            this.handlers = default(DiscordRPC.DiscordRPC.EventHandlers);
            DiscordRPC.DiscordRPC.Initialize("610846708271677440", ref this.handlers, true, null);
            this.handlers = default(DiscordRPC.DiscordRPC.EventHandlers);
            DiscordRPC.DiscordRPC.Initialize("610846708271677440", ref this.handlers, true, null);
            this.presence.details        = "SpiderReborn [Full Lua Executor]";
            this.presence.state          = "Made by HackerTa, Tony_Gamer, Gustas, SUMER, Chxse";
            this.presence.largeImageKey  = "logo";
            this.presence.smallImageKey  = "large";
            this.presence.largeImageText = "SpiderReborn";
            DiscordRPC.DiscordRPC.UpdatePresence(ref this.presence);
            DirectoryInfo di = new DirectoryInfo("./Bin/Scripts");

            FileInfo[] f = di.GetFiles("*.txt");
            foreach (FileInfo fi in f)
            {
                ScriptList.Items.Add(fi.Name);
            }
            DirectoryInfo din = new DirectoryInfo("./Bin/Scripts");

            FileInfo[] file = din.GetFiles("*.lua");
            foreach (FileInfo fil in file)
            {
                ScriptList.Items.Add(fil.Name);
            }
            using (StreamReader s = new StreamReader("./Bin/Languages/Lua.xml"))
            {
                using (XmlTextReader reader = new XmlTextReader(s))
                {
                    TextEditor.SyntaxHighlighting = ICSharpCode.AvalonEdit.Highlighting.Xshd.HighlightingLoader.Load(reader, HighlightingManager.Instance);
                }
            }
            string Text = File.ReadAllText("./Bin/Auth/Text.bin");

            if (Text == "")
            {
                TextEditor.Text = "----Thank you for using SpiderReborn!";
            }
            else
            {
                TextEditor.Text = Text;
            }
        }
 public static extern void Initialize(string applicationId, ref DiscordRPC.EventHandlers handlers, bool autoRegister, string optionalSteamId);