コード例 #1
0
ファイル: SLNetComEvents.cs プロジェクト: rcoscali/METAbolt
 protected virtual void OnScriptDialogReceived(OpenMetaverse.ScriptDialogEventArgs e)
 {
     if (ScriptDialogReceived != null)
     {
         ScriptDialogReceived(this, e);
     }
 }
コード例 #2
0
        public override void Self_OnScriptDialog(object sender, ScriptDialogEventArgs e)
        {
            var objectName = e.ObjectName;
            var buttons = e.ButtonLabels;
            EventQueue.Enqueue(
                () =>
                {
                    client.SendPersonalEvent(SimEventType.SCRIPT, "On-Script-Dialog", e.Message, objectName, e.ImageID, e.ObjectID, e.FirstName,
                                 e.LastName,
                                 e.Channel, buttons);
                    if (AcceptOffersAnimationsObjects && buttons.Count > 0)
                    {
                        int buttonIndex = (new Random()).Next(buttons.Count);
                        string buttonlabel = buttons[buttonIndex];

                        int maxTries = buttons.Count * 2;
                        string buttonlabelToLower = buttonlabel.ToLower();
                        while (maxTries-- > 0 && (buttonlabelToLower.Contains("cancel") || buttonlabelToLower.Contains("ignore") || buttonlabelToLower.Contains("mute")))
                        {
                            buttonIndex = (new Random()).Next(buttons.Count);
                            buttonlabel = buttons[buttonIndex];
                            buttonlabelToLower = buttonlabel.ToLower();
                        }

                        client.Self.ReplyToScriptDialog(e.Channel, buttonIndex, buttonlabel, e.ObjectID);
                    }
                }
                );
        }
コード例 #3
0
ファイル: SLNetCom.cs プロジェクト: rcoscali/METAbolt
 private void Self_OnDialog(object sender, OpenMetaverse.ScriptDialogEventArgs ea)
 {
     try
     {
         if (netcomSync != null)
         {
             netcomSync.BeginInvoke(new OnScriptDialogRaise(OnScriptDialogReceived), new object[] { ea });
         }
         else
         {
             OnScriptDialogReceived(ea);
         }
     }
     catch
     {
         ;
     }
 }
コード例 #4
0
ファイル: AgentManager.cs プロジェクト: RavenB/gridsearch
 /// <summary>Raises the ScriptDialog event</summary>
 /// <param name="e">A SctriptDialogEventArgs object containing the
 /// data returned from the data server</param>
 protected virtual void OnScriptDialog(ScriptDialogEventArgs e)
 {
     EventHandler<ScriptDialogEventArgs> handler = m_ScriptDialog;
     if (handler != null)
         handler(this, e);
 }
コード例 #5
0
ファイル: TabsConsole.cs プロジェクト: Nuriat/radegast
        void Self_ScriptDialog(object sender, ScriptDialogEventArgs e)
        {
            if (instance.MainForm.InvokeRequired)
            {
                instance.MainForm.BeginInvoke(new MethodInvoker(() => Self_ScriptDialog(sender, e)));
                return;
            }

            // Is this object muted
            if (null != client.Self.MuteList.Find(m => (m.Type == MuteType.Object && m.ID == e.ObjectID) // muted object by id
                || (m.Type == MuteType.ByName && m.Name == e.ObjectName) // object muted by name
                )) return;

            instance.MainForm.AddNotification(new ntfScriptDialog(instance, e.Message, e.ObjectName, e.ImageID, e.ObjectID, e.FirstName, e.LastName, e.Channel, e.ButtonLabels));
        }
コード例 #6
0
 void Self_ScriptDialog(object sender, ScriptDialogEventArgs e)
 {
     if(Dialogs.ContainsKey(e.ObjectID))Dialogs.Remove(e.ObjectID);
     Dialogs.Add(e.ObjectID,new DialogMenu(e));
     httpCallback(CallBackEvent.dialog, e.ObjectID.ToString(), Dialogs[e.ObjectID]);
     total_dialogs = Dialogs.Count;
 }
コード例 #7
0
 public DialogMenu(ScriptDialogEventArgs e)
 {
     buttons = e.ButtonLabels;
     channel = e.Channel;
     name = e.ObjectName;
     uuid = e.ObjectID.ToString();
     owner_uuid = e.OwnerID.ToString();
     message = e.Message;
 }
コード例 #8
0
ファイル: Events.cs プロジェクト: AlphaStaxLLC/AjaxLife
 public void Self_ScriptDialog(object sender, ScriptDialogEventArgs e)
 {
     Hashtable item = new Hashtable();
     item.Add("MessageType", "ScriptDialog");
     item.Add("Message", e.Message);
     item.Add("ObjectName", e.ObjectName);
     item.Add("ImageID", e.ImageID);
     item.Add("ObjectID", e.ObjectID);
     item.Add("FirstName", e.FirstName);
     item.Add("LastName", e.LastName);
     item.Add("ChatChannel", e.Channel);
     item.Add("Buttons", e.ButtonLabels);
     enqueue(item);
 }
コード例 #9
0
 void Self_ScriptDialog(object sender, ScriptDialogEventArgs e)
 {
     Gtk.Application.Invoke(delegate
     {
         ScriptDialogue d = new ScriptDialogue(e.Message, e.ObjectName, e.ImageID, e.ObjectID, e.FirstName, e.LastName, e.Channel, e.ButtonLabels);
         d.Show();
     });
 }
コード例 #10
0
ファイル: AllEvents.cs プロジェクト: drzo/opensim4opencog
 public virtual void Self_OnScriptDialog(object sender, ScriptDialogEventArgs e) { OnEvent("On-Script-Dialog", paramNamesOnScriptDialog, paramTypesOnScriptDialog, e); }