PareX

Monaco Script List

May 29th, 2019
4,301
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Load:if (this.listBox1.SelectedIndex != -1)
  2.             {
  3.                 this.webBrowser1.Document.InvokeScript("SetText", new object[1]
  4.                 {
  5.           (object) System.IO.File.ReadAllText("scripts\\" + this.listBox1.SelectedItem.ToString())
  6.                 });
  7.             }
  8.             else
  9.             {
  10.                 int num = (int)MessageBox.Show("Please select a script from the list before trying to loading it in tab.", "Name");
  11.             }
  12. Execute:if(this.listBox1.SelectedIndex != -1)
  13.             {
  14.                 api.SendLimitedLuaScript(System.IO.File.ReadAllText("scripts\\" + this.listBox1.SelectedItem.ToString()));
  15.             }
  16. Refresh:listBox1.Items.Clear();//Clear Items in the LuaScriptList
  17.             Functions.PopulateListBox(listBox1, "./Scripts", "*.txt");
  18.             Functions.PopulateListBox(listBox1, "./Scripts", "*.lua");
  19. Functions:public static void PopulateListBox(ListBox lsb, string Folder, string FileType)
  20.         {
  21.             DirectoryInfo dinfo = new DirectoryInfo(Folder);
  22.             FileInfo[] Files = dinfo.GetFiles(FileType);
  23.             foreach (FileInfo file in Files)
  24.             {
  25.                 lsb.Items.Add(file.Name);
  26.             }
  27.         }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×