InventoryLSL Class, represents a Linden Scripting Language object
Inheritance: InventoryItem
コード例 #1
0
ファイル: ScriptEditor.cs プロジェクト: nooperation/radegast
        public ScriptEditor(RadegastInstance instance, InventoryLSL script, Primitive prim)
        {
            InitializeComponent();
            Disposed += new EventHandler(SscriptEditor_Disposed);

            this.instance = instance;
            this.script = script;
            this.prim = prim;

            rtb.SyntaxHighlightEnabled = instance.GlobalSettings["script_syntax_highlight"].AsBoolean();
            lblScripStatus.Text = string.Empty;
            lblScripStatus.TextChanged += (object sender, EventArgs e) =>
                instance.TabConsole.DisplayNotificationInChat(lblScripStatus.Text, ChatBufferTextStyle.Invisible);
            Dock = DockStyle.Fill;
            this.TabStop = false;

            if (prim == null)
            {
                cbRunning.Visible = false;
            }

            // Download script
            if (script != null)
            {
                scriptName = script.Name;
                if (prim != null)
                {
                    client.Assets.RequestInventoryAsset(script.AssetUUID, script.UUID, prim.ID, prim.OwnerID, script.AssetType, true, Assets_OnAssetReceived);
                    client.Inventory.RequestGetScriptRunning(prim.ID, script.UUID);
                    client.Inventory.ScriptRunningReply += OnScriptRunningReplyReceived;
                }
                else
                {
                    client.Assets.RequestInventoryAsset(script, true, Assets_OnAssetReceived);
                }
                rtb.Text = lblScripStatus.Text = "Loading script...";
            }
            else
            {
                rtb.Text = " "; //bugs in control grrrr
                rtb.SelectionStart = 0;
            }

            Radegast.GUI.GuiHelpers.ApplyGuiFixes(this);
        }
コード例 #2
0
ファイル: ScriptEditor.cs プロジェクト: Booser/radegast
 public ScriptEditor(RadegastInstance instance, InventoryLSL script)
     : this(instance, script, null)
 {
 }